AI & Automation 10 min read

n8n Tutorial for Beginners: Automate Website Leads to Google Sheets and WhatsApp

Learn n8n from zero: install it with Docker or n8n Cloud, understand triggers, nodes and expressions, then build a real workflow that saves website leads to Google Sheets and alerts your team on WhatsApp.

Umer Hasan

Umer Hasan

Co-Founder & CTO at Zapprex

n8n Tutorial for Beginners: Automate Website Leads to Google Sheets and WhatsApp
Table of contents

What is n8n?

n8n is a workflow automation tool: you connect apps and APIs with visual “nodes” to automate tasks — like Zapier or Make, but you can also self-host it on your own server and write JavaScript or Python when you need custom logic. Its source is available under a fair-code licence, which is free to self-host for your own internal business use.

At a glance: Step 2: Learn the four core ideas — Workflow, Trigger node, Action nodes, Items and expressions
At a glance: Step 2: Learn the four core ideas

Step 1: Install n8n

The quickest options are n8n Cloud (hosted, paid) or running it yourself with Docker:

Run n8n locally with Dockerbash
docker volume create n8n_data

docker run -it --rm --name n8n -p 5678:5678 \
  -v n8n_data:/home/node/.n8n \
  docker.n8n.io/n8nio/n8n

# open http://localhost:5678 and create your owner account

Tip: For production self-hosting, run n8n behind HTTPS with a domain, use PostgreSQL instead of the default SQLite, back up the data volume and set an encryption key in the environment.

Step 2: Learn the four core ideas

  • Workflow: a canvas of connected nodes that runs from left to right.
  • Trigger node: starts the workflow — a webhook, a schedule, a new email, a form submission.
  • Action nodes: do things — HTTP Request, Google Sheets, Gmail, Slack, WhatsApp Business Cloud, databases and hundreds more.
  • Items and expressions: data flows between nodes as items (JSON). Use expressions such as {{ $json.email }} to map fields from previous nodes.

Step 3: Build the lead workflow

Step 3: Build the lead workflow: 7 steps
  1. 1

    Add a Webhook trigger: set method to POST and copy the test URL. Your website form will send leads here.

  2. 2

    Send a test lead: submit your form (or use curl) so n8n captures sample data you can map.

  3. 3

    Clean the data with Edit Fields (Set): keep name, phone, email, service and message; trim spaces and format the phone number.

  4. 4

    Add an IF node: route leads with a valid phone number to WhatsApp alerts; send others to email only.

  5. 5

    Append to Google Sheets: connect your Google account and map each field to a column, adding a timestamp with {{ $now }}.

  6. 6

    Notify the team: use the WhatsApp Business Cloud node (or Slack/Telegram) to send “New lead: {{ $json.name }} – {{ $json.service }}”.

  7. 7

    Activate: switch the workflow to Active and update your website to use the production webhook URL.

Send a test lead to your webhookbash
curl -X POST "https://n8n.example.com/webhook-test/new-lead" \
  -H "Content-Type: application/json" \
  -d '{"name":"Riya","phone":"+919800000000","email":"riya@example.com","service":"Website"}'

Step 4: Make it reliable

“Start with one workflow that saves your team an hour a day. Automation earns trust one reliable workflow at a time.”

— Umer Hasan, CTO
  • Error workflow: set an error workflow that alerts you when any execution fails.
  • Retries: enable “Retry on fail” on nodes that call external APIs.
  • Secure the webhook: require a secret header or use authentication on the Webhook node.
  • Deduplicate: check whether a phone or email already exists before adding a row.
  • Executions log: review past runs to debug and see exactly what data passed through each node.

Topics

n8nn8n TutorialWorkflow AutomationNo-Code Automation
Umer Hasan
Written by

Umer Hasan

Co-Founder & CTO at Zapprex

Leads engineering, cloud infrastructure and AI automation at Zapprex Technologies, with 7+ years of full-stack and mobile experience.

FAQ

Questions readers ask

n8n can be self-hosted free of charge for internal business use under its fair-code licence. n8n Cloud and enterprise features are paid plans.

Have a project in mind?

Let's build something that moves your business forward.

Share your idea, process or problem — we will come back with a clear plan, timeline and cost range. No technical spec needed.

  • Founder reply within 1 business day
  • NDA on request · 100% code ownership
  • Talk directly to the engineers