n8n is the self-hostable alternative when you want Zapier-style flows without per-task pricing or a third party seeing your data. Cloud version exists too if you don't want to run it yourself.
Setup
1. Add a Webhook node
In your n8n workflow: Add node → Webhook.
- HTTP Method: POST
- Path: something unique like
formspring-contact - Response Mode: Immediately (respond 200 fast; do work after)
- Authentication: None (we'll do HMAC ourselves)
Save and execute the workflow once to get the test URL. For production, copy the production URL.
2. Verify the signature
The signature covers the timestamp and the raw body joined by a dot: HMAC_SHA256(secret, "<t>.<raw body>"), sent as X-Formspring-Signature: t=<unix>,v1=<hex>. See Signing.
Recommended: the Formspring Trigger node. It replaces the Webhook node, checks the signature and timestamp, and starts one execution per submission id even when Formspring retries. The package lives in the Formspring repository under packages/formspring-automation/n8n; it is not listed in the n8n community node directory, so install it from that folder (self-hosted n8n) rather than from the in-app search. Add a Formspring Signing Secret credential with the secret shown once when you created the webhook.
Alternative: a Code node right after a Webhook node whose raw body is available:
const crypto = require('crypto');
const header = $input.first().json.headers['x-formspring-signature'] ?? '';
const raw = $input.first().json.rawBody; // the exact bytes received, as a string
const secret = $env.FORMSPRING_SECRET;
const m = /^t=(\d+),v1=([a-f0-9]{64})$/.exec(header);
if (!m) throw new Error('Malformed signature');
if (Math.abs(Date.now() / 1000 - Number(m[1])) > 300) throw new Error('Stale timestamp');
const expected = crypto.createHmac('sha256', secret).update(`${m[1]}.${raw}`).digest();
const received = Buffer.from(m[2], 'hex');
if (!crypto.timingSafeEqual(received, expected)) throw new Error('Invalid signature');
return [{ json: JSON.parse(raw) }];
If your n8n version does not give a Code node the unparsed body, use the Formspring Trigger node instead; a re-serialised body never matches the signature.
Store FORMSPRING_SECRET in n8n's environment (n8n cloud: workflow variables; self-hosted: .env).
3. Wire it up in Formspring
Webhooks → Add webhook → Generic. Paste the n8n production URL.
4. Build downstream steps
Common patterns:
- HTTP Request → forward to your API with auth.
- Set + Postgres/MySQL → insert into your DB directly.
- IF → branch on
body.type(created vs flagged) or onbody.payload.emaildomain. - Email → send a templated reply via SMTP/SendGrid/Postmark.
- AI → run the message through an LLM for classification, then route.
Self-hosted vs cloud
| Self-hosted | n8n cloud | |
|---|---|---|
| Per-execution cost | Free (your infra) | Metered |
| Data residency | Yours | n8n's |
| Setup effort | Docker + reverse proxy | Sign up |
| Best for | Sensitive data, high volume | Quick start, low ops |
For Formspring-style payloads on a moderately busy form, self-hosted on a small VM (1 vCPU, 2 GB RAM) handles thousands of submissions per day comfortably.
Idempotency
The Webhook node fires once per HTTP request. If a Formspring retry hits, the same submission id (data.id) arrives again. The Formspring Trigger node drops repeats for you. With a plain Webhook node, add an IF node early that queries your dedupe table (or a Redis SET NX) on data.id and short-circuits if already processed.
Marketplace status
This is a webhook recipe with an installable node definition. It is not listed in the n8n community node directory.
