serverserv serverserv

Website form to Google Sheets and Slack: free n8n workflow template

By the serverserv team · 3 min read · Updated

Every time someone fills in your website's contact form, this workflow tidies up the entry, checks the email address, adds a row to Google Sheets and posts the lead in Slack, then tells the form it worked. Nothing gets lost in an inbox.

Download the template

Free download
7 nodes · tested on n8n 2.35 · MIT licence · no credentials included
Download JSON
yesnoLead formWebhookClean up leadEdit FieldsHas a valid email?IfAdd row to sheetGoogle SheetsPost to SlackSlackReply: thank youRespond to WebhookReply: check the emailRespond to Webhook
How the workflow is wired, from the trigger at the top.

How it works

  1. The Lead form webhook receives the form as JSON or normal form fields.
  2. Clean up lead trims every field, lowercases the email and caps the length of each value, so one bad submission cannot fill your sheet with junk.
  3. Has a valid email? checks the address. Bad ones get a 400 reply your form can show as an error.
  4. Good leads are added to Google Sheets and posted in your Slack channel, and the form gets an {"ok": true} reply.

Nodes used: Webhook, Edit Fields, If, Google Sheets, Slack, Respond to Webhook.

What you need

  • An n8n instance reachable over HTTPS, so your website can post to it
  • A Google account for Google Sheets
  • A Slack workspace where you can add the n8n app

Set it up

  1. Import the workflow and open Add row to sheet. Connect Google Sheets and paste your sheet URL. Give the sheet a header row: name, email, phone, message, page, received_at.
  2. Open Post to Slack, connect Slack and pick the channel for new leads.
  3. Open Lead form, copy the production URL and set it as your form's action, or post to it from your form's JavaScript.
  4. Activate the workflow and send a test entry from your website.

New to importing? In n8n, open a new workflow, then either paste the copied JSON onto the canvas or use the menu (the three dots) and choose Import from file. Credentials are never included, so you connect your own accounts after importing.

Ways to customise it

  • Add a Send Email node after the sheet to send the person an automatic thank-you.
  • Swap Google Sheets for Airtable, HubSpot or Pipedrive. The cleaned fields stay the same.
  • Add the AI lead scoring template to rank leads before they reach Slack.

Security notes

A public webhook URL can be found and spammed. Turn on Header Auth in the webhook and send that header from your site's server, or add a hidden honeypot field and drop entries where it is filled in. The template already limits field lengths and checks the email format.

Where to run it

Templates with webhooks or triggers need n8n running all the time and reachable over HTTPS. You can run n8n on your own computer to try it, but for real use it belongs on a server. serverserv n8n Hosting gives you n8n pre-installed on your own KVM server with HTTPS, from $14.99 a month with no execution limits, and we will set up your first workflow for you, this one included.

Questions

Does this work with WordPress, Webflow or a plain HTML form?

Yes. Any form that can send a POST request works. For a plain HTML form, set the form's action to the webhook's production URL and its method to POST. Plugins such as Contact Form 7 or WPForms can post to a webhook too.

Why does the form get a JSON reply?

So your form can show a thank-you or an error message. If your form expects a redirect instead, change the Respond to Webhook nodes to redirect to your thank-you page.

Is this n8n template free to use?

Yes. It is free under the MIT licence, for personal and business use. You need your own n8n instance and your own accounts for the connected apps.

Sources

Plans from $3.99/moSee plans