Public
Fire a Slack message into one channel with a single HTTP request
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

slack-ping-from-webhook

Fire a Slack message into one channel with a single HTTP request. No event handling, no bot conversation logic — just a tiny sender backed by a bot token.

Send

  • GET ?text=hello
  • POST with {"text":"hello"} (JSON), text=hello (form), or a raw text body

Everything posts to the single channel set by CHANNEL at the top of main.ts.

Setup (~2 min)

  1. Open this val's HTTP endpoint and click Create the Slack app — the manifest (a bot user + chat:write + channels:join) is prefilled. Then Install to Workspace.
  2. Copy the Bot User OAuth Token (xoxb-…) into the SLACK_BOT_TOKEN env var.
  3. Set CHANNEL at the top of main.ts to your channel's ID — open the channel in Slack and grab the C… from the URL (or View channel details → Channel ID, copy button at the bottom).
  4. (Optional) Set WEBHOOK_SECRET to require ?key=… on every call. Leave it blank to keep the endpoint open.

Notes

  • Public channels the bot isn't in are auto-joined on the first send. Private channels and DMs must invite it first (/invite @webhook-pinger).
  • The channel is hardcoded on purpose — a caller can't redirect the message somewhere it shouldn't go.
  • Grow it: this is a send-only base with room to climb. Add scopes to the manifest in main.ts and re-create the app to unlock threads (thread_ts), Block Kit attachments, reactions, multiple channels, or even inbound events.