Integrations
Published: 27-Jul-2026

How to Send a Discord Alert for a New Form Submission

Post Discord channel alerts when someone submits your site form. Use webhooks through a form backend so you do not expose secrets in frontend JavaScript.

MFC

MyFormConnect Team

If your team already uses Discord, routing new form submissions there is a natural fit. A message in a dedicated channel is harder to miss than an email buried in a shared inbox, and the whole team sees it at once. This guide shows how to set up Discord alerts for new form submissions — safely, without putting your webhook URL in the browser.

How Discord webhooks work

Discord lets you create a webhook URL for any channel. When you POST a JSON payload to that URL, Discord delivers it as a message. It's simple and powerful — but the URL itself is the authentication. Anyone who has the URL can send messages to your channel.

Why you can't use the webhook in frontend JavaScript

Putting the webhook URL in client-side code means it's visible in your page source and browser network requests. Once leaked — intentionally or by accident — anyone can send messages to your Discord channel indefinitely. Bot operators scan GitHub repositories and page sources specifically looking for exposed webhook URLs.

The webhook URL must stay on a server.

The safe approach: form endpoint as relay

Your HTML form posts to a form endpoint. The endpoint stores the submission and then calls the Discord webhook server-side — your page and your visitors never see the webhook URL. If you rotate the webhook URL for any reason, you update it in the dashboard rather than in your site's code.

Step 1: Create the Discord webhook

  1. Open Discord and go to the server where you want alerts
  2. Create a dedicated channel, e.g. #form-submissions or #leads
  3. Right-click the channel → Edit ChannelIntegrationsWebhooks
  4. Click New Webhook, give it a name (e.g. "MyFormConnect"), and copy the webhook URL

Step 2: Connect Discord in your form settings

  1. Create a form in MyFormCapture
  2. Go to Integrations → Discord
  3. Paste the webhook URL
  4. Optionally configure which fields appear in the notification message
  5. Save and copy the form endpoint URL

Step 3: Add the form to your page

<form action="https://myformconnect.io/f/YOUR_FORM_ID" method="POST">

  <label for="name">Name</label>
  <input id="name" name="name" type="text" required />

  <label for="email">Email address</label>
  <input id="email" name="email" type="email" required />

  <label for="message">Message</label>
  <textarea id="message" name="message" rows="5" required></textarea>

  <!-- Identify which form/page this submission came from -->
  <input type="hidden" name="page_source" value="Contact page" />

  <input type="hidden" name="_redirect" value="https://yoursite.com/thank-you" />

  <button type="submit">Send message</button>

</form>

What the Discord alert looks like

Each submission triggers a Discord embed in your chosen channel. A typical message looks like:

📬 New form submission

Name: Jan de Vries
Email: [email protected]
Message: Interested in your enterprise plan — can we set up a call?
From: Contact page
Received: 27 Jul 2026 at 14:45

The message format is configurable in your form settings. You can include or exclude any field, and set a custom icon for the webhook bot.

Keeping the channel clean

  • Enable spam protection on your form — Discord alerts for spam submissions are noisy and unhelpful
  • If you have multiple forms, connect each to a separate channel or use the page_source field to distinguish them
  • Disable the Discord integration for any form you take offline — stale webhooks occasionally get triggered by old indexed form pages

Keeping the team in the loop

Discord alerts work best alongside email notifications, not instead of them. Use Discord for real-time awareness — someone on the team sees the message and can respond quickly. Use email as the durable record. Both notifications come from the same submission; the endpoint handles both in parallel.

Enable spam filtering before you connect Discord. A single spam wave can flood a channel with tens of messages in a few minutes, which quickly trains your team to ignore the notification channel entirely.

Ready to collect form submissions?

Create a free MyFormCapture form endpoint and skip building your own backend.

Start Free Trial

No credit card required · 5-minute setup