Blog

Slack12 min read

Send form submissions to Slack

Ikiform posts every submission to a Slack channel natively: connect your workspace once, pick a channel, and failed posts retry. Or build a small relay for a custom message.

Preet SutharFounder, Ikiform

A channel that lights up with each new lead or support request is one of the most useful things to wire to a form. Ikiform posts to Slack natively: connect your Slack workspace once, pick a channel, and each submission arrives as a message 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.

How a submission gets from your form to Slackyour formany html form,framework or serverIkiformstores it, posts as theIkiform appSlackthe channel you pickedpostmessageHow a submission gets from your form to Slackyour formany html form, framework orserverIkiformstores it, posts as the IkiformappSlackthe channel you pickedpostmessage
  1. A visitor submits your form, and it posts to Ikiform.
  2. Ikiform stores the submission and posts it to the channel you picked, as the Ikiform app.
  3. If Slack fails, Ikiform retries on the webhook schedule and logs every attempt.
No relay and no code. Ikiform formats the message and posts it to Slack itself.

Connect Slack 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 allowed to add apps to your Slack workspace. Integrations are included on every plan and don't use any of your webhook endpoints.

  1. Open the form's Integrations tab

    In the dashboard, open the form, choose the Integrations tab, then Add integration.

  2. Choose Slack and connect your workspace

    Pick Slack. The first time, Ikiform sends you to Slack to add the Ikiform app to your workspace. Approve it, and you come back to the same form with the channel list open.

    Slack permissionWhat Ikiform uses it for
    chat:writePosting messages as the Ikiform app
    chat:write.publicPosting in public channels without an invite
    channels:readListing public channels so you can pick one
    groups:readListing private channels the app was added to
    team:readNaming the connection after your workspace
  3. Pick a channel

    Search the list, choose a channel, then choose Add. Any public channel works without inviting the app first.

    Private channels show up in the list after you add the Ikiform app to them in Slack. The list can take up to a minute to catch up.
  4. Send a test

    On the new Slack card, choose Send test. A sample message 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

PartWhat it shows
First lineNew submission to Contact, with the form name in bold
One block per fieldThe field name in bold with the value under it. A field named first_name shows as First name.
Last lineWhen it was submitted, in each reader's own time zone, and a View in Ikiform link
  • Up to 40 fields are shown. If a form has more, the last line says how many are left in Ikiform.
  • Very long values are cut to fit Slack's limits. Empty fields show (empty), and fields whose names start with _ are left out.
  • A visitor who types @here, @channel or @everyone can't ping anyone, and <, > and & are escaped, so they can't add links. Link previews are off.

When a post fails

Every post is a run with its own attempts. If Slack 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 happenedWhat to do
The Ikiform app was removed from the Slack workspace, or its access was revokedEvery form using that workspace stops posting. Choose Reconnect on the card, then replay the failed runs.
The channel was archived or deleted, or the app was removed from a private channelOnly this integration stops. Choose Choose another channel on the card. Ikiform then offers to replay what failed in the last 7 days.

Add more channels

Slack is connected once per workspace. To post another form, or the same form, to a different channel, choose Add integration again and pick Slack. You go straight to the channel list, with no second Slack 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 workspace in the same dialog adds a second Slack workspace.
  • Disconnecting Slack from its app page in Ikiform removes the Ikiform app from your Slack workspace, 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 buttons, a set field order or a thread per form, or when you'd rather keep the Slack side on your own server. The rest of this guide posts each submission through a Slack incoming webhook and a small relay you deploy.

How a submission gets from your form to Slackyour formany html form,framework orserverIkiformstores it,signs awebhookrelayworker orroute handleryou deploySlackincomingwebhook poststo onechannelpostsignedapi callHow a submission gets from your form to Slackyour formany html form, framework orserverIkiformstores it, signs a webhookrelayworker or route handler youdeploySlackincoming webhook posts to onechannelpostsignedapi call
  1. A visitor submits your form, and it posts to Ikiform.
  2. Ikiform stores the submission and sends a signed webhook to your relay.
  3. The relay checks the signature, turns the submission into Block Kit and posts it to the Slack webhook URL.
  4. Slack answers the relay, and the relay answers Ikiform.
Ikiform signs the delivery. The relay checks it, turns it into Block Kit, and posts it to Slack.

Why there's a relay

Slack's incoming webhooks accept a message shaped as { "text": ... } or { "blocks": [...] }. Ikiform sends a submission event shaped as { "type": ..., "data": ... }, and Slack answers that with 400 no_text.

Ikiform sends its own JSON shape to every endpoint and can't send a custom or templated body. Slack expects its own shape, so pasting the Slack URL straight into Ikiform doesn't work. A small relay in between verifies the signature and reformats the message.

The relay is about 60 lines. It also keeps the Slack URL private, and it 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 Slack is one step in a longer workflow.

Slack's Workflow Builder can also start from a webhook, but only on paid plans, and its variables read only top-level JSON keys. Ikiform's fields sit under data.fields, so they can't be mapped there.

Before you start on a relay

  • An Ikiform form that already receives submissions.
  • Permission to add apps to your Slack workspace.
  • 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:

submission.created
{
  "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

  1. Create a Slack incoming webhook

    1. Go to api.slack.com/apps, choose Create New App, then From scratch. Name it, for example Ikiform, and pick your workspace.
    2. Open Incoming Webhooks in the app's settings and turn on Activate Incoming Webhooks.
    3. Choose Add New Webhook to Workspace, pick the channel, and confirm.
    4. Copy the webhook URL. It looks like https://hooks.slack.com/services/T000/B000/XXXX.

    Check it works before going further:

    Terminal
    curl -X POST "$SLACK_WEBHOOK_URL" \
      -H "Content-Type: application/json" \
      -d '{"text":"Hello from the terminal"}'

    Slack answers ok and the message shows up in the channel. Treat the URL as a secret: anyone who has it can post to that channel, and Slack revokes URLs it finds in public code.

  2. Write the relay

    Pick the platform you already use. Both versions verify the signature with @ikiform/sdk, format the message, and turn Slack errors into answers Ikiform retries.

    import { verifyWebhook, type WebhookEvent, WebhookVerificationError } from "@ikiform/sdk/webhooks";
    
    interface Env {
      IKIFORM_WEBHOOK_SECRET: string;
      SLACK_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 escape(text: string) {
      return text.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
    }
    
    function clip(text: string, max: number) {
      return text.length > max ? `${text.slice(0, max - 1)}…` : text;
    }
    
    function toSlack(event: WebhookEvent) {
      if (event.type === "endpoint.test") return { text: "Ikiform test event received. Submissions will appear here." };
      const { form, fields, submission_id, truncated } = event.data;
      const lines = Object.entries(fields)
        .slice(0, 40)
        .map(([name, value]) => clip(`*${escape(name)}*\n${escape(valueText(value))}`, 2000));
      const sections = Array.from({ length: Math.ceil(lines.length / 10) }, (_, index) => ({
        type: "section",
        fields: lines.slice(index * 10, index * 10 + 10).map((text) => ({ type: "mrkdwn", text })),
      }));
      const note = truncated ? "Too large to show here. Open it in Ikiform." : `\`${submission_id}\``;
      return {
        text: `New submission on ${escape(form.name)}`,
        blocks: [
          { type: "header", text: { type: "plain_text", text: clip(`New submission: ${form.name}`, 150) } },
          ...sections,
          { type: "context", elements: [{ type: "mrkdwn", text: note }] },
        ],
      };
    }
    
    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(env.SLACK_WEBHOOK_URL, {
          method: "POST",
          headers: { "content-type": "application/json" },
          body: JSON.stringify(toSlack(event)),
        });
        if (response.status === 429) {
          const retryAfter = response.headers.get("retry-after") ?? "30";
          return new Response("Slack rate limit", { status: 503, headers: { "retry-after": retryAfter } });
        }
        if (!response.ok) return new Response(`Slack answered ${response.status}`, { status: 502 });
        return new Response(null, { status: 204 });
      },
    };
    How the relay maps an Ikiform submission to Slack messageIkiform eventSlack messageform.name: Contactheader: New submission: Contactfields.name: Adasection field: name / Adafields.email: ada@example.comsection field: email /ada@example.comfields.message: Hellosection field: message / Hellosubmission_idcontext: sub_… idHow the relay maps an Ikiform submission to Slack messageIkiform eventSlack messageform.name:Contactheader: Newsubmission:Contactfields.name:Adasection field:name / Adafields.email:ada@example.comsection field:email /ada@example.comfields.message:Hellosection field:message /Hellosubmission_idcontext: sub_…id
    1. form.name: Contact becomes header: New submission: Contact.
    2. fields.name: Ada becomes section field: name / Ada.
    3. fields.email: ada@example.com becomes section field: email / ada@example.com.
    4. fields.message: Hello becomes section field: message / Hello.
    5. submission_id becomes context: sub_… id.
    Up to 10 fields per section block. More fields start a new section.

    For the sample submission above, the relay posts this to Slack:

    Slack message
    {
      "text": "New submission on Contact",
      "blocks": [
        { "type": "header", "text": { "type": "plain_text", "text": "New submission: Contact" } },
        {
          "type": "section",
          "fields": [
            { "type": "mrkdwn", "text": "*name*\nAda" },
            { "type": "mrkdwn", "text": "*email*\nada@example.com" },
            { "type": "mrkdwn", "text": "*message*\nHello" }
          ]
        },
        { "type": "context", "elements": [{ "type": "mrkdwn", "text": "`sub_01k7v2c9t3e8m5q4x6z0a1b2c3`" }] }
      ]
    }
    • Slack's limits are 10 fields per section and 2,000 characters per field, so long values are cut and the fields split across sections.
    • &, < and > are escaped, so a visitor can't inject links or mentions.
    • A 429 from Slack becomes a 503 with the same Retry-After, so Ikiform waits before it tries again. Any other Slack error becomes a 502, which Ikiform retries.
  3. Deploy it

    Cloudflare Worker

    Terminal
    mkdir ikiform-slack && cd ikiform-slack
    npm init -y
    npm install @ikiform/sdk
    npm install -D wrangler

    Save the Worker code as src/index.ts, then set the route in wrangler.jsonc:

    wrangler.jsonc
    {
      "$schema": "node_modules/wrangler/config-schema.json",
      "name": "ikiform-slack",
      "main": "src/index.ts",
      "compatibility_date": "2026-10-01",
      "routes": [{ "pattern": "hooks.example.com", "custom_domain": true }]
    }
    Ikiform refuses workers.dev URLs, so the Worker needs a hostname on a domain you have on Cloudflare, like hooks.example.com. The custom_domain route 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 SLACK_WEBHOOK_URL
    npx wrangler deploy

    Your relay URL is https://hooks.example.com/.

    Next.js

    Add @ikiform/sdk to the app, save the route handler, and set IKIFORM_WEBHOOK_SECRET and SLACK_WEBHOOK_URL in your host's environment variables. On Vercel the relay URL is https://your-app.vercel.app/api/ikiform/slack. Use the production domain: Vercel's deployment protection blocks requests to protected preview URLs.

  4. 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 "Slack #leads", 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.created for every accepted submission on the forms you chose, and endpoint.test when you send a test. A workspace on Pro can have up to 3 endpoints.

  5. Add the secret to the relay

    Set IKIFORM_WEBHOOK_SECRET to the whsec_ secret. On Cloudflare run npx wrangler secret put IKIFORM_WEBHOOK_SECRET again; 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:

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 Slack.

If the form has a human check or allowed domains turned on, a post from curl is refused or marked as spam, and spam never sends a webhook. Test from your real site instead.

The test event posts a short line to the channel. A real submission posts the full message, with the submission id at the bottom.

How relay delivery works

The receiver answersIkiform
Any 2xx within 15 secondsMarks the delivery succeeded
A redirectDoesn't follow it, and counts a failure
429 or 503 with Retry-AfterWaits that long, up to the next step of the schedule
410 GoneFails the delivery and disables the endpoint
Anything else, or no answer in 15 secondsRetries

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.

What the relay tells Ikiform when Slack answers2xxok204no contentdonedelivery succeeded429rate limited503same retry-afterwaitsthen tries againother error4xx or 5xx502bad gatewayretries8 retries over about3 d 6 hSlack answersrelay answersIkiformWhat the relay tells Ikiform when Slack answers2xxok204nocontentdonedeliverysucceeded429ratelimited503sameretry-afterwaitsthentriesagainothererror4xx or5xx502badgatewayretries8 retriesoverabout3 d 6 hSlackanswersrelayanswersIkiform
  1. Slack accepts the request: the relay answers 204, and Ikiform marks the delivery succeeded.
  2. Slack is rate limited (429): the relay answers 503 with Slack's Retry-After, and Ikiform waits that long before it tries again.
  3. Slack answers with any other error: the relay answers 502, and Ikiform retries, 8 retries over about 3 d 6 h.

Slack allows about one message per second per webhook. A burst of submissions can hit that, and the relay passes Slack's Retry-After back to Ikiform, so the extra messages arrive a little later rather than not at all.

Troubleshooting the relay

ProblemWhat to do
400 no_matching_signatureThe 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 Slack answered 400Slack refused the message. Check the relay's logs for Slack's error, such as invalid_payload, and that the Slack URL is copied in full.
502 with Slack answered 403 or 404The Slack webhook was revoked, the app was removed, or the channel was archived. Create a new webhook and update SLACK_WEBHOOK_URL.
Delivery log shows timeoutNothing answered within 15 seconds. Answer first and do slow work after, or make sure the tool responds right away.
Endpoint is disabledEvery 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 twiceA retry after a slow or failed answer. Every retry carries the same webhook-id, so skip ids you've already handled.
No delivery at allCheck 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 Slack webhook and one Ikiform endpoint per channel, and Pro allows 3 endpoints.
  • Add a button that links to the submission in your own admin, using data.submission_id.
  • Skip duplicates by storing the webhook-id header, as in Receiving webhooks.
Slack referenceLink
Incoming webhooksdocs.slack.dev
Section block limitsdocs.slack.dev
Escaping textdocs.slack.dev
Rate limitsdocs.slack.dev

Stuck on a step, or want a guide for another tool? Email hello@ikiform.com.