← All tutorials

AI Automation

Build your first automation: website form to spreadsheet

Capture every enquiry automatically, save it to a sheet and alert your team, with no manual copying.

Beginner10 min read5 steps

  1. WebhookReceive the form
  2. SheetSave the enquiry
  3. EmailAlert the team
  4. LiveTurn it on

What you need

  • A running n8n server, as set up in the previous tutorial
  • A Google account for the spreadsheet
  • Email (SMTP) details for sending the alert
  1. Add a Webhook trigger

    Create a new workflow and add a Webhook node. Set the method to POST and the path to new-lead. A webhook is a web address that starts your workflow whenever something sends data to it.

  2. Send a test enquiry

    Click Listen for test event in the Webhook node, then run this from a terminal. The data should appear in n8n. Test addresses use /webhook-test/, and live ones use /webhook/.

    curl -X POST http://SERVER_IP:5678/webhook-test/new-lead \
      -H "Content-Type: application/json" \
      -d '{"name":"Test Customer","email":"[email protected]","message":"We need a quote for 5 PCs"}'
  3. Save it to Google Sheets

    Add a Google Sheets node with the action to append a row, connect your Google account and choose your sheet. Create columns named Name, Email and Message, then map each to the incoming data using the expressions below.

    Name:    {{ $json.body.name }}
    Email:   {{ $json.body.email }}
    Message: {{ $json.body.message }}
  4. Alert your team by email

    Add a Send Email node and connect your SMTP account. Fields from the Webhook node can be used in the subject and body, so whoever reads the alert has what they need.

    Subject: New enquiry from {{ $('Webhook').item.json.body.name }}
    Body:    {{ $('Webhook').item.json.body.message }}
  5. Activate it

    Save the workflow and switch it to active. Point your website form at the production address, which replaces /webhook-test/ with /webhook/, then send one real test to confirm it arrives.

    A public webhook can be called by anyone. Add authentication in the Webhook node before you connect it to a live website.

Want this set up for your business?

We can plan, build and hand it over to your team.

Discuss your setup ↗
Next tutorialAdd AI: sort customer enquiries automatically →