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.
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.
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.
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.
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.
<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>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:45The message format is configurable in your form settings. You can include or exclude any field, and set a custom icon for the webhook bot.
page_source field to distinguish themDiscord 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.
Create a free MyFormCapture form endpoint and skip building your own backend.
Start Free TrialNo credit card required · 5-minute setup