Every website form should do four things the second someone hits submit: validate the lead, save it somewhere you will actually look, notify you instantly, and reply to the human. Most forms do one of these. Here is a workflow that does all four, and you can steal the whole thing below.
Access
Download it from my GitHub
What it does
A webhook receives the form POST. An IF node checks the email exists. Good leads get appended to Google Sheets, you get an email with the details, and the lead gets an auto-reply. Bad submissions get a clean 400 response instead of silently rotting in a database.
Build it (10 minutes)
1. Webhook trigger. Add a Webhook node, POST method, path lead-capture. Set response mode to "Respond to Webhook" so you control the reply.
2. Validate. Add an IF node: string {{ $json.email }} exists. This one check kills 90% of junk.
3. Log it. Google Sheets node, Append operation, map name, email, phone, message, plus created_at set to {{ $now.toISO() }} and status set to new.
4. Notify yourself. Gmail node to your own address. Subject: {{ 'New lead: ' + ($json.name || $json.email) }}. Body: the fields, plain text, scannable in 5 seconds on a phone.
5. Auto-reply. Gmail node to {{ $json.email }}. Keep it short: thanks, we reply within one business day.
6. Respond. Two Respond to Webhook nodes: 200 with a thank-you on the true branch, 400 with "Missing required field: email" on the false branch.
The one pattern that makes this maintainable
Put a Set node right after the trigger and call it CONFIG. Every value the buyer (or future you) might change, your email, the sheet ID, the reply text, lives there as named fields. Downstream nodes reference {{ $('CONFIG').item.json.owner_email }}. One node to edit, zero hunting through the canvas six months later.
Test before you activate
Keep it inactive, hit Execute Workflow, and POST test data with curl:
curl -X POST <your-webhook-url> -H 'Content-Type: application/json' \
-d '{"name":"Test","email":"test@example.com","message":"hello"}'
Watch every node turn green. Check the sheet row and both emails. Then activate.
I packaged this workflow plus four more (Stripe failed-payment recovery, blog-to-social repurposer, review request drip, dead-lead reactivation) into a tested template pack with docs and setup checklists. Here's the full set: 5 Production-Ready n8n Workflows.
Top comments (0)