Discord12 min read
Send form submissions to Discord
Ikiform posts every submission to a Discord channel natively as an embed: add the Ikiform bot once, pick a channel, and failed posts retry. Or build a small relay for a custom message.
Discord works well as a shared inbox for a small team or a community. Ikiform posts to Discord natively: add the Ikiform bot to your server once, pick a channel, and each submission arrives as an embed with every field and a link back to it.
Build your own relay only if you want a different message layout, or if submissions have to pass through your own code first. That path is further down, under Build your own relay instead.
- A visitor submits your form, and it posts to Ikiform.
- Ikiform stores the submission and the Ikiform bot posts it to the channel you picked as an embed.
- If Discord fails, Ikiform retries on the webhook schedule and logs every attempt.
Connect Discord in Ikiform
This is the recommended way. There's nothing to deploy or host. You need to be an owner or admin of the Ikiform workspace, and Discord only lets you add a bot to a server where you have the Manage Server permission. Integrations are included on every plan and don't use any of your webhook endpoints.
Open the form's Integrations tab
In the dashboard, open the form, choose the Integrations tab, then Add integration.
Choose Discord and add the bot
Pick Discord. The first time, Ikiform sends you to Discord to add the Ikiform bot to a server. Pick the server, approve it, and you come back to the same form with the channel list open.
The bot asks for four permissions and nothing else: View Channels, Send Messages, Embed Links and Read Message History.
Pick a channel
Search the list, choose a channel, then choose Add. The list is grouped by category and shows only text and announcement channels where the bot can view the channel, send messages and embed links. Private channels have a lock icon.
If a channel is missing, give the Ikiform bot's role View Channel, Send Messages and Embed Links in it. Forum channels aren't listed. The list can take up to a minute to catch up.Send a test
On the new Discord card, choose Send test. A sample embed for Ada Lovelace arrives in the channel within a minute. The integration is on as soon as you add it, so your next real submission posts too.
What the message looks like
| Part | What it shows |
|---|---|
| Title | New submission to Contact, linked to the submission in Ikiform |
| One field per input | The field name above the value. A field named first_name shows as First name. Short values sit side by side. |
| Timestamp | When it was submitted, in each reader's own time zone |
- Up to 25 fields fit in an embed. If a form has more, the footer says how many are left in Ikiform.
- Long values are cut to fit Discord's limits. Empty fields show
(empty), and fields whose names start with_are left out. - Mentions are turned off, so a visitor who types
@everyone,@hereor a user id can't ping anyone. Markdown in answers is escaped and shows as typed.
When a post fails
Every post is a run with its own attempts. If Discord is down, slow or rate-limits Ikiform, the run is retried 8 times over about 3 d 6 h, the same schedule as webhooks.
- Activity on the integration's card lists every run, its attempts and the error. Open a failed run and choose Retry to send it again now.
- Replay failed in Activity sends every failed run from the last 24 hours, 3 days or 7 days again.
- If the connection breaks, the card shows what to fix and Ikiform emails you once. After you fix it, replay the runs that failed.
- Pause in More actions stops new runs until you choose Resume. Submissions that arrive while an integration is paused or broken aren't sent to it, but they're still in Ikiform.
- Submissions marked as spam aren't sent. If you mark one Not spam, it's sent then.
| What happened | What to do |
|---|---|
| The Ikiform bot was removed from the server | Every form using that server stops posting. Choose Reconnect on the card to add the bot again, then replay the failed runs. |
| The channel was deleted, or the bot lost access to it | Only this integration stops. Fix the bot's permissions in that channel, or choose Choose another channel on the card. Ikiform then offers to replay what failed in the last 7 days. |
Add more channels
Discord is connected once per server. To post another form, or the same form, to a different channel, choose Add integration again and pick Discord. You go straight to the channel list, with no second Discord approval. Each channel is its own integration with its own Activity. A form can't add the same channel twice.
- Change channel in More actions moves an integration to another channel.
- Connect another server in the same dialog adds the bot to a second Discord server.
- Disconnecting Discord from its app page in Ikiform makes the bot leave the server, and every form using it stops posting.
Build your own relay instead
A relay is worth it when you want a message Ikiform doesn't send, such as plain text, a set field order or posts into a thread, or when you'd rather use a channel webhook than a bot. The rest of this guide posts each submission through a Discord webhook and a small relay you deploy.
- A visitor submits your form, and it posts to Ikiform.
- Ikiform stores the submission and sends a signed webhook to your relay.
- The relay checks the signature, turns the submission into an embed and posts it to the Discord webhook URL.
- Discord answers the relay, and the relay answers Ikiform.
Why there's a relay
A Discord webhook expects a message with at least one of content, embeds, components, file or poll. Ikiform sends a submission event shaped as { "type": ..., "data": ... }, which has none of them, so Discord refuses it with 400.
The relay also keeps the Discord URL private and checks Ikiform's signature, so nobody else can post to your channel through it. If you'd rather not deploy code, use the native integration above, or n8n, Zapier or Make when Discord is one step in a longer workflow.
Before you start on a relay
- An Ikiform form that already receives submissions.
- The Manage Webhooks permission on the Discord server.
- Somewhere to run the relay: a Cloudflare account with a domain on it, or a Next.js app on Vercel or any other host.
What Ikiform sends to a webhook
Every delivery is a POST with a JSON body. The body has the same shape for every endpoint, and you can't change it. A submission looks like this:
{
"id": "dlv_01k7v2d4n8r2p6s0w3y5b7c9e1",
"type": "submission.created",
"timestamp": "2026-10-23T12:00:00.000Z",
"api_version": "2026-10-17",
"data": {
"submission_id": "sub_01k7v2c9t3e8m5q4x6z0a1b2c3",
"form": { "id": "frm_xxxxxxxxxxxxxxxx", "name": "Contact" },
"fields": { "name": "Ada", "email": "ada@example.com", "message": "Hello" },
"meta": {
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
"origin": "https://example.com",
"referrer": "https://example.com/contact",
"country": "GB",
"subject": null,
"reply_to": "ada@example.com"
},
"created_at": "2026-10-23T12:00:00.000Z",
"truncated": false
}
}The form's values are in data.fields, keyed by the input name. A test from the dashboard sends an endpoint.test event instead, with data.endpoint_id and data.message and no fields. The full reference is on Webhooks.
Set up the relay
Create a Discord webhook
- Open Server Settings, then Integrations, then Webhooks.
- Choose New Webhook. Give it a name, such as
Ikiform, and pick the channel. - Choose Copy Webhook URL. It looks like
https://discord.com/api/webhooks/123/abc.
Check it works before going further:
Terminal curl -X POST "$DISCORD_WEBHOOK_URL?wait=true" \ -H "Content-Type: application/json" \ -d '{"content":"Hello from the terminal"}'With
?wait=true, Discord answers200with the message it created. Without it, Discord answers204even when the message wasn't saved, so the relay always adds it. Treat the URL as a secret: anyone who has it can post to that channel.Write the relay
Pick the platform you already use. Both versions verify the signature with
@ikiform/sdk, build the embed, and turn Discord errors into answers Ikiform retries.src/index.tsimport { verifyWebhook, type WebhookEvent, WebhookVerificationError } from "@ikiform/sdk/webhooks"; interface Env { IKIFORM_WEBHOOK_SECRET: string; DISCORD_WEBHOOK_URL: string; } function valueText(value: unknown): string { if (value === null || value === undefined || value === "") return "(empty)"; if (Array.isArray(value)) return value.map(valueText).join(", "); if (typeof value === "object") return JSON.stringify(value); return String(value); } function clip(text: string, max: number) { return text.length > max ? `${text.slice(0, max - 1)}…` : text; } function withWait(url: string) { const target = new URL(url); target.searchParams.set("wait", "true"); return target.toString(); } interface EmbedField { name: string; value: string; inline: boolean; } function toDiscord(event: WebhookEvent) { const allowed_mentions = { parse: [] }; if (event.type === "endpoint.test") { return { content: "Ikiform test event received. Submissions will appear here.", allowed_mentions }; } const { form, fields, submission_id, created_at, truncated } = event.data; const title = clip(`New submission: ${form.name}`, 256); const description = truncated ? "Too large to show here. Open it in Ikiform." : undefined; let budget = 6000 - title.length - submission_id.length - (description?.length ?? 0); const embedFields: EmbedField[] = []; for (const [name, value] of Object.entries(fields).slice(0, 25)) { const field = { name: clip(name.trim() || "(unnamed)", 256), value: clip(valueText(value).trim() || "(empty)", 1024), inline: false, }; if (field.name.length + field.value.length > budget) break; budget -= field.name.length + field.value.length; embedFields.push(field); } return { allowed_mentions, embeds: [{ title, description, fields: embedFields, footer: { text: submission_id }, timestamp: created_at }], }; } export default { async fetch(request: Request, env: Env) { if (request.method !== "POST") return new Response(null, { status: 405 }); const payload = await request.text(); let event: WebhookEvent; try { event = await verifyWebhook({ payload, headers: request.headers, secret: env.IKIFORM_WEBHOOK_SECRET }); } catch (error) { if (error instanceof WebhookVerificationError) return new Response(error.reason, { status: 400 }); throw error; } const response = await fetch(withWait(env.DISCORD_WEBHOOK_URL), { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(toDiscord(event)), }); if (response.status === 429) { const retryAfter = response.headers.get("retry-after") ?? "30"; return new Response("Discord rate limit", { status: 503, headers: { "retry-after": retryAfter } }); } if (!response.ok) return new Response(`Discord answered ${response.status}`, { status: 502 }); return new Response(null, { status: 204 }); }, };- form.name: Contact becomes title: New submission: Contact.
- fields.name: Ada becomes field: name / Ada.
- fields.email: ada@example.com becomes field: email / ada@example.com.
- fields.message: Hello becomes field: message / Hello.
- submission_id becomes footer: sub_….
- created_at becomes timestamp.
Up to 25 fields per embed. allowed_mentions is empty, so nobody gets pinged. For the sample submission above, the relay posts this to Discord:
Discord message { "allowed_mentions": { "parse": [] }, "embeds": [ { "title": "New submission: Contact", "fields": [ { "name": "name", "value": "Ada", "inline": false }, { "name": "email", "value": "ada@example.com", "inline": false }, { "name": "message", "value": "Hello", "inline": false } ], "footer": { "text": "sub_01k7v2c9t3e8m5q4x6z0a1b2c3" }, "timestamp": "2026-10-23T12:00:00.000Z" } ] }- Discord allows 25 fields per embed, 256 characters per field name, 1,024 per value and 6,000 across the whole embed. The relay cuts long values and stops adding fields before the total runs out.
- Discord trims whitespace and refuses empty values, so an empty input shows as "(empty)".
allowed_mentionswith an emptyparselist means a visitor who types@everyoneor a user id can't ping anyone.- A
429from Discord becomes a503with the sameRetry-After, so Ikiform waits before it tries again. Any other Discord error becomes a502, which Ikiform retries.
Deploy it
Cloudflare Worker
Terminal mkdir ikiform-discord && cd ikiform-discord npm init -y npm install @ikiform/sdk npm install -D wranglerSave the Worker code as
src/index.ts, then set the route inwrangler.jsonc:wrangler.jsonc { "$schema": "node_modules/wrangler/config-schema.json", "name": "ikiform-discord", "main": "src/index.ts", "compatibility_date": "2026-10-01", "routes": [{ "pattern": "hooks.example.com", "custom_domain": true }] }Ikiform refusesworkers.devURLs, so the Worker needs a hostname on a domain you have on Cloudflare, likehooks.example.com. Thecustom_domainroute creates the DNS record and certificate for you on deploy.Add both secrets and deploy:
Terminal npx wrangler secret put IKIFORM_WEBHOOK_SECRET npx wrangler secret put DISCORD_WEBHOOK_URL npx wrangler deployYour relay URL is
https://hooks.example.com/.Next.js
Add
@ikiform/sdkto the app, save the route handler, and setIKIFORM_WEBHOOK_SECRETandDISCORD_WEBHOOK_URLin your host's environment variables. On Vercel the relay URL ishttps://your-app.vercel.app/api/ikiform/discord. Use the production domain: Vercel's deployment protection blocks requests to protected preview URLs.Add the endpoint in Ikiform
- In the Ikiform dashboard, open Webhooks and choose Add endpoint.
- Paste your relay URL into URL.
- Under Forms, pick one form, or All forms in the workspace.
- Add a Description if you like, such as "Discord #submissions", then choose Add endpoint.
- Copy the signing secret. It starts with
whsec_and is shown in full only once.
There's no event picker. An endpoint gets
submission.createdfor every accepted submission on the forms you chose, andendpoint.testwhen you send a test. A workspace on Pro can have up to 3 endpoints.Add the secret to the relay
Set
IKIFORM_WEBHOOK_SECRETto thewhsec_secret. On Cloudflare runnpx wrangler secret put IKIFORM_WEBHOOK_SECRETagain; it takes effect right away. On Vercel, update the variable and redeploy.
Ikiform only delivers to public https:// URLs on port 443. IP addresses, localhost, internal hostnames, workers.dev and pages.dev are refused when you save the endpoint.
Test the relay
Open the endpoint in Ikiform and choose Send test. Ikiform sends one endpoint.test event with no retries, and the result shows up in the endpoint's delivery log within a few seconds. Then send a real submission from your form, or from a terminal:
curl https://ikiform.com/f/frm_xxxxxxxxxxxxxxxx \
-H "Content-Type: application/json" \
-d '{"name":"Ada","email":"ada@example.com","message":"Hello from curl"}'A 201 with "ok": true means Ikiform stored it. The delivery appears on the endpoint page, and the message lands in Discord.
The test event posts a short line to the channel. A real submission posts the embed, with the submission id in the footer and the submission time next to it.
How relay delivery works
| The receiver answers | Ikiform |
|---|---|
Any 2xx within 15 seconds | Marks the delivery succeeded |
| A redirect | Doesn't follow it, and counts a failure |
429 or 503 with Retry-After | Waits that long, up to the next step of the schedule |
410 Gone | Fails the delivery and disables the endpoint |
| Anything else, or no answer in 15 seconds | Retries |
Failed deliveries are retried 8 times over about 3 d 6 h, with the same webhook-id each time. If every delivery to an endpoint fails for 5 days, Ikiform disables it and emails the workspace owners.
- Discord accepts the request: the relay answers 204, and Ikiform marks the delivery succeeded.
- Discord is rate limited (429): the relay answers 503 with Discord's Retry-After, and Ikiform waits that long before it tries again.
- Discord answers with any other error: the relay answers 502, and Ikiform retries, 8 retries over about 3 d 6 h.
Each Discord webhook has its own rate limit. A burst of submissions can hit it, and the relay passes Discord's Retry-After back to Ikiform, so the extra messages arrive a little later rather than not at all.
404, it was deleted. Discord asks clients to stop calling deleted webhooks, so create a new one and update DISCORD_WEBHOOK_URL rather than letting retries run.Troubleshooting the relay
| Problem | What to do |
|---|---|
400 no_matching_signature | The secret is wrong, or the body was parsed and re-serialized before verifying. Use the whsec_ secret of this endpoint and the raw body exactly as received. After Roll secret, update it within 24 hours. |
502 with Discord answered 400 | Discord refused the message. Check the relay's logs for Discord's error body. A forum channel needs thread_name or thread_id, so post to a text channel instead. |
502 with Discord answered 401 or 404 | The webhook was deleted or its token is wrong. Create a new webhook and update DISCORD_WEBHOOK_URL. |
Delivery log shows timeout | Nothing answered within 15 seconds. Answer first and do slow work after, or make sure the tool responds right away. |
| Endpoint is disabled | Every delivery failed for 5 days, the URL answered 410, or its hostname started resolving to a private address. Fix the cause, then turn Enabled back on and Retry now the failed deliveries. |
| The same submission arrives twice | A retry after a slow or failed answer. Every retry carries the same webhook-id, so skip ids you've already handled. |
| No delivery at all | Check that the endpoint covers this form, that it's enabled, and that the submission wasn't marked as spam or held because the workspace is over its monthly limit. |
Next steps
- Send each form to its own channel. With the native integration that's one more channel per form. With relays it's one Discord webhook and one Ikiform endpoint per channel, and Pro allows 3 endpoints.
- Post into a thread by adding
thread_idto the webhook URL. The relay keeps any query string you put there. - Skip duplicates by storing the
webhook-idheader, as in Receiving webhooks.
| Discord reference | Link |
|---|---|
| Execute webhook | docs.discord.com |
| Embed limits | docs.discord.com |
| Rate limits | docs.discord.com |
| Intro to webhooks | support.discord.com |
Stuck on a step, or want a guide for another tool? Email hello@ikiform.com.