All docs
1 min read

Slack recipe

Two ways: native Slack integration (no code), or a generic webhook to a Slack incoming-webhook URL.

Option A — Native Slack integration

  1. Open the form's Webhooks page.
  2. Click Add integration → Slack.
  3. Authorize Formspring to post to a channel.

We render submissions in a clean Slack-native format (form name + key fields highlighted, "View in dashboard" button).

Option B — Generic webhook to a Slack incoming webhook

  1. In Slack, Apps → Incoming webhooks → Add to Slack. Pick the channel. Copy the webhook URL.
  2. In Formspring, Webhooks → Add webhook. Paste the URL. Save the signing secret.
  3. Run a small handler somewhere (Cloudflare Worker, Lambda, etc.) that:
    • Verifies the Formspring signature.
    • Reformats the submission into Slack's blocks API.
    • POSTs to the Slack URL.
export default async function handler(req) {
  // 1. Verify signature (see Signing docs)
  // 2. Build a Slack message
  const body = await req.json();
  const text = Object.entries(body.payload)
    .map(([k, v]) => `*${k}:* ${v}`)
    .join('\n');

  await fetch(process.env.SLACK_WEBHOOK_URL, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ text: `New submission to *${body.form_id}*\n${text}` }),
  });

  return new Response('', { status: 200 });
}

What's next