How to Use n8n: A Practical Guide to Building Your First Automations

A hands-on n8n guide: cloud vs self-hosting, triggers, nodes, expressions, error handling and a step-by-step lead-capture workflow you can build today.

Short answer: n8n is a visual workflow automation tool you can run in the cloud or host yourself. You build a workflow by connecting a trigger (a form submission, a schedule, a webhook) to a chain of nodes that transform data and call other apps. Its strengths are self-hosting, code when you need it, and predictable costs at high volume.

What is n8n and who is it for?

n8n (pronounced “n-eight-n”) is a node-based automation platform, similar in spirit to Zapier or Make, but with two big differences: you can self-host it on your own server, and you can drop into JavaScript or Python whenever the visual nodes aren’t enough. That makes it a good fit for:

  • Businesses with privacy requirements that want customer data to stay on infrastructure they control.
  • High-volume workflows where per-task pricing on other platforms gets expensive.
  • Developers and technical teams who want to call any API, write custom logic and version their workflows.
  • AI workflows, since n8n has built-in AI Agent, LLM and vector store nodes.

n8n is “fair-code” under its Sustainable Use License: free to self-host for your own business use, with paid cloud and enterprise plans.

n8n Cloud vs self-hosting

n8n CloudSelf-hosted
SetupSign up and start buildingDocker on a VPS (DigitalOcean, Hetzner, AWS, etc.)
MaintenanceHandled for youYou handle updates, backups and SSL
CostMonthly plan based on executionsServer cost only for the community edition
Data locationn8n’s infrastructureYour server

To try self-hosting locally, Docker is the fastest route:

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

Then open http://localhost:5678. For production, put it behind a reverse proxy with HTTPS, use PostgreSQL instead of the default SQLite, and back up your N8N_ENCRYPTION_KEY. Without it, your saved credentials can’t be decrypted.

The core concepts in five minutes

  • Workflow: the canvas holding your automation. Each one starts with a trigger.
  • Trigger nodes: what starts a run. Common ones are Webhook, Schedule Trigger, Form Trigger and app triggers like “new WooCommerce order” or “new Gmail message”.
  • Action nodes: do something in an app, such as creating a CRM contact, sending a Slack message or adding a row to Google Sheets.
  • Logic nodes: If, Switch, Merge, Loop Over Items, Wait and Edit Fields (Set) shape the flow and the data.
  • Items: n8n passes data between nodes as a list of JSON items. Most nodes run once per item, which is how one workflow handles 1 or 1,000 records.
  • Expressions: pull data from earlier nodes with {{ $json.email }} or {{ $('Webhook').item.json.name }}.
  • Credentials: API keys and OAuth logins stored encrypted and reused across workflows.

Step by step: a WordPress lead-capture workflow

Here is a workflow I build often: a contact form on a WordPress site sends the enquiry to n8n, which qualifies it with AI, saves it, and alerts you.

  1. Add a Webhook trigger. Set the method to POST and copy the test URL. In your form plugin (Gravity Forms, Fluent Forms, WPForms or Contact Form 7 with a webhook add-on), send submissions to that URL.
  2. Listen for a test event. Click “Listen for test event”, submit your form once, and n8n shows the incoming fields. Now every later node can reference them.
  3. Clean the data with Edit Fields. Map only what you need: name, email, budget and message. Trim whitespace and lowercase the email.
  4. Classify with AI. Add an OpenAI, Anthropic or Basic LLM Chain node and ask it to return JSON such as {"score": 1-5, "type": "website|seo|support", "summary": "..."}. Turn on structured output so the result is always parseable.
  5. Branch with If or Switch. Leads scoring 4 or 5 go one way; everything else goes another.
  6. Save and notify. Create the contact in your CRM (HubSpot, Pipedrive, or a Google Sheet to start), then send hot leads to Slack or email with the AI summary.
  7. Reply to the webhook. Use a Respond to Webhook node so the form gets a fast success response.
  8. Activate it. Switch the form to the production webhook URL and activate (publish) the workflow. Test URLs only work while the editor is listening.

Error handling: the part most tutorials skip

Automations fail: an API times out, a token expires, a field arrives empty. Build for it from day one:

  • Create an error workflow that starts with an Error Trigger node and emails or messages you the workflow name, failing node and error. Assign it in each workflow’s settings.
  • Turn on “Retry on fail” for nodes that call external APIs, with a short wait between tries.
  • Use “Continue on error” only where a failure is acceptable, and route the error output somewhere visible.
  • Check executions. The Executions list shows every run with the data at each node, which makes debugging fast.

Tips for workflows that last

  • One workflow, one job. Split big automations into smaller ones and call them with the Execute Workflow node.
  • Name every node (“Score lead with AI”, not “OpenAI1”). Your expressions and your future self will thank you.
  • Use the HTTP Request node for any app without a built-in node. If it has an API, n8n can talk to it.
  • Use the Code node sparingly, for transformations that would otherwise take five visual nodes.
  • Keep secrets in credentials, never hard-coded in nodes or expressions.
  • Export workflows as JSON and keep them in Git so you can review changes and roll back.

Five n8n automations worth building first

  1. Form enquiries to CRM, with AI lead scoring and Slack alerts.
  2. New WooCommerce orders to Google Sheets, accounting software and a personalised thank-you email.
  3. A daily digest of support emails grouped by topic, with draft replies.
  4. New blog posts turned into draft social posts and a newsletter section for approval.
  5. Uptime and form monitoring that alerts you when your site or contact form stops working.

Not sure whether n8n or Make suits you better? Read my guide to Make or the broader AI automation guide for small businesses. If you’d rather have it built for you, see my automation services or tell me about your workflow.

Renie Namocot

About the author

Renie Namocot is a full-stack web developer from the Philippines who specialises in WordPress, Shopify and custom web applications. Renie has built sites and apps for clients across Australia, the US, UK, Germany, New Zealand and Singapore. More about Renie →

Keep reading

More articles.

All articles →
Contact

Have a project in mind?

Whether it’s a WordPress rebuild, a new Shopify theme or a custom web app, I’d like to hear about it. I usually reply within 24 hours.

Start a project