Anticode Open builder

How to get website form submissions in Slack (or Discord)

Create an incoming webhook in Slack for one channel, paste its URL into your form tool, and every submission posts there as a message. Most of the thought goes into where it posts: a small private channel for the people who answer enquiries, not the company's general channel, because each message carries someone's name, email and words.

Updated · By the Anticode team

Why a chat channel helps

Email notifications get filtered, buried or read by one person who's on holiday. A message in a team channel is seen within minutes by whoever's around, and someone can reply in a thread with "I've got this" so two people don't call the same lead. It works best as a second channel alongside a stored copy of each submission, not as the only record.

Plan the channel first

  • Make it private and invite only the people who act on enquiries. Everyone in the channel can read every submission, and anyone added later can scroll back through them.
  • Keep it single-purpose, such as #website-enquiries. Leads mixed into general chat get lost.
  • Decide retention. Slack keeps messages according to your workspace's retention settings, which may be forever. Personal data from forms is subject to the same rules as anywhere else, so set a retention period for that channel if your plan allows.
  • Think about fields. A booking or contact form usually needs name, email and message to be useful. Avoid sending anything sensitive, such as health details from a clinic's enquiry form, into chat at all.

Set up a Slack incoming webhook

  1. Create the channel and invite the right people.
  2. In Slack's app settings, create an app for your workspace (or use an existing one) and turn on Incoming Webhooks.
  3. Choose Add New Webhook to Workspace, pick the channel, and authorise it. Slack shows a URL beginning https://hooks.slack.com/services/.
  4. Copy the URL and paste it into your form tool's Slack setting.
  5. Send a test. A message should appear in the channel within a minute or so.

Slack's documentation on sending messages with incoming webhooks notes two things worth knowing. The webhook always posts to the channel chosen when it was created; you can't redirect it later. And the URL contains a secret: anyone who has it can post to that channel, so never put it in a public page, a shared document or a code repository. Slack looks for leaked webhook URLs and revokes them.

Discord and Telegram work the same way

In Discord, someone with the Manage Webhooks permission creates a webhook under Integrations in the server or channel settings and picks its channel. It gives a URL starting https://discord.com/api/webhooks/. Paste it in the same way. Telegram uses a bot token and a chat ID instead of a URL: you create a bot, add it to a group or channel, and give the form tool both values. The privacy points above apply to all three.

Mistakes to avoid

  • Posting to #general. Every new joiner, contractor and guest can read every enquiry.
  • Treating the channel as the database. Messages can be deleted, edited or expire. Keep the stored submissions and use chat for alerts.
  • Letting mentions through. A visitor who writes @channel or @everyone in a message could ping your whole team. Good integrations escape these; check yours.
  • Forgetting to remove the webhook when someone who set it up leaves, or when you change channels. Delete old webhooks in Slack's app settings.
  • Pasting the URL in chat to share it. It's a credential; treat it like a password.

Check it works

Send a real test through the live form, not only the form tool's test button, and check the message shows the fields you expect. Add @channel to the message text to see whether it pings anyone. Then check the stored copy of the same submission matches. Repeat after any change to the form.

Slack, Discord and Telegram with Anticode

In Anticode, open Connectors in the dashboard and choose Slack, Discord or Telegram. Paste the webhook URL (or, for Telegram, the bot token and chat ID); Anticode checks it looks like a real address for that service before saving. Credentials are sealed and write-only, so nobody can read the URL back out. Once it's saved, Send a test posts a sample message. Connectors are saved to your account, so they apply to every site you publish.

Each submission from your published site's contact, booking and newsletter forms (and any custom forms) is posted, tagged with the site's name, with its fields, sent once and without retries; if Slack is unreachable at that moment, the message is missed, but the submission is still saved and sealed in your project. You can't pick individual fields to send, or route different forms or sites to different channels, so use a channel that suits all of them. For the CRM side, see sending website leads to a CRM.

Questions people ask

Is it safe to put customer details in Slack?

It can be, in a private channel with a short retention period and only the people who need it. Avoid sensitive categories of data in chat altogether.

Can someone else use my webhook?

Anyone with the URL can post to that channel. Keep it secret; if it leaks, delete the webhook in Slack and create a new one.

Can I send different forms to different channels?

Many form tools allow it with separate webhooks. In Anticode, connectors apply account-wide, so all forms post to the same channel.

Sources

  1. Slack: Sending messages using incoming webhooks, checked