Skip to content
312+ businesses automated avg. 14h/week savedManual workflows cost the average team £512/week fix it in 10 daysDeployed in 5–10 business days · 30-day money-back guaranteeDental · Real Estate · Agencies · E-commerce · Covered99.97% uptime SLA · Monitored 24/7 by our ops teamA full-time ops hire costs £45K+/yr PURIST delivers more in daysn8n · Make · Claude AI · 500+ workflow templatesFree automation audit limited to 5 spots this week312+ businesses automated avg. 14h/week savedManual workflows cost the average team £512/week fix it in 10 daysDeployed in 5–10 business days · 30-day money-back guaranteeDental · Real Estate · Agencies · E-commerce · Covered99.97% uptime SLA · Monitored 24/7 by our ops teamA full-time ops hire costs £45K+/yr PURIST delivers more in daysn8n · Make · Claude AI · 500+ workflow templatesFree automation audit limited to 5 spots this week312+ businesses automated avg. 14h/week savedManual workflows cost the average team £512/week fix it in 10 daysDeployed in 5–10 business days · 30-day money-back guaranteeDental · Real Estate · Agencies · E-commerce · Covered99.97% uptime SLA · Monitored 24/7 by our ops teamA full-time ops hire costs £45K+/yr PURIST delivers more in daysn8n · Make · Claude AI · 500+ workflow templatesFree automation audit limited to 5 spots this week
PURIST
312+
Clients automated
14 h/wk
Avg time saved
99.97%
Uptime SLA
< 7 days
Deploy time
PURIST AI
Claude Opus 4.7 · n8n v1.71 · <80ms
What type of business are you running? I'll show you exactly which processes we'd automate first and your estimated ROI.
Powered by n8n + Claude Opus 4.7 Book free audit →
n8n tutorial: build your first production workflow in under an hour (2026)
Guides 24 min read · 3,256 words

n8n tutorial: build your first production workflow in under an hour (2026)

n8n is the most powerful free automation platform available in 2026 but the learning curve trips up most beginners. This tutorial takes you from zero to a running production workflow in under 60 minutes.

P

Purist

June 2026

What Is n8n and Why It Dominates Production Automation in 2026

[n8n](/pages/glossary/n8n) is an open-source workflow automation platform that lets you connect apps, APIs, and services through a visual node-based editor. Unlike Zapier or Make, n8n can be self-hosted on your own infrastructure meaning zero per-execution fees, complete data sovereignty, and no vendor lock-in. It also ships with a JavaScript code node that gives you the full power of a programming language when visual nodes aren't enough.

After 500+ production deployments, PURIST uses n8n as our primary automation platform for most client engagements. The reasons are consistent: it handles complex branching logic cleanly, error handling is configurable at the node level, and the self-hosted version processes millions of executions per month at essentially zero marginal cost. For businesses serious about automation at scale, n8n is not just a choice it is the choice that makes financial sense at volume.

This tutorial will take you from a fresh n8n installation to a running production workflow. We will build a lead notification system: when a contact form is submitted, n8n captures the data, validates it, enriches the contact with company information, creates a CRM record, and sends a Slack notification to your sales team. This is the most commonly requested first automation across all industries, and it illustrates the core concepts that apply to every workflow you will ever build.

Setting Up n8n: Cloud vs Self-Hosted

You have two options for getting n8n running. n8n Cloud is the managed hosted version no server management required, starts at $20/month, and is ready in under 5 minutes. This is the right choice for this tutorial if you want to focus on learning n8n rather than DevOps.

Self-hosted n8n runs on your own server using Docker. The full setup takes 20-30 minutes if you have basic server administration familiarity. For production systems handling sensitive data (healthcare, financial services), self-hosted is the required path under GDPR and industry compliance frameworks.

n8n Cloud Setup (Recommended for Beginners)

Navigate to n8n.io, sign up for an account, and select the Starter plan. You'll be in the n8n editor within 5 minutes. The free trial gives you full access to all features for 14 days more than enough to complete this tutorial and build several additional workflows.

Self-Hosted Setup with Docker

If you are running this tutorial on a VPS or local machine with Docker installed, the quickest path to a running n8n instance is a single Docker command. Create a docker-compose.yml file with the n8n service definition, your timezone configuration, a persistent volume for workflow data, and a port mapping to expose the editor on port 5678. Run docker-compose up -d and n8n will be accessible at http://localhost:5678 within 30 seconds.

For a production self-hosted instance, add a reverse proxy (Nginx or Caddy), an SSL certificate via Let's Encrypt, and configure environment variables for your database connection (Postgres is recommended over the default SQLite for any serious production workload).

Core n8n Concepts Every Beginner Must Understand

Before building your first workflow, you need to understand five core concepts that n8n's entire architecture is built around. Understanding these now will prevent 90% of the confusion that trips up beginners.

Nodes

Every action in an n8n workflow is a node. A node is a single unit of work: read from a Google Sheet, send a Slack message, make an HTTP request to an API, transform data with JavaScript. Nodes are connected by lines that define the execution sequence. Every workflow is a directed graph of connected nodes.

Items

Data in n8n flows through workflows as items. An item is a JSON object a structured collection of key-value pairs. When a webhook receives a form submission, it creates one item containing all the form fields. When a Google Sheets node reads a spreadsheet, it creates one item per row. When nodes are connected, every item from the upstream node is passed to the downstream node, which processes each item in sequence.

Understanding items is the key to understanding n8n. If you connect a node that outputs 10 items to a Slack message node, the Slack node will send 10 messages one for each item. This behaviour is intentional and extremely powerful once you understand it.

Triggers

Every workflow starts with a trigger node. The trigger defines what event starts the workflow. Common trigger types are: Webhook (a URL that external services call to start the workflow), Schedule (run at a defined time or interval), App Trigger (a new email arrives, a CRM contact is created, a form is submitted), and Manual (run on demand, useful for testing).

Expressions

n8n expressions let you reference data from previous nodes inside any node's configuration fields. Expressions use the syntax {{ $json.fieldName }} to reference a field from the current item, or {{ $node["NodeName"].json.fieldName }} to reference a field from a specific previous node. Expressions are what make workflows dynamic instead of hardcoding a value, you reference the actual data flowing through the workflow.

Credentials

Credentials store authentication information for connected apps and APIs. When you add a Slack node, you create a Slack credential once (using your OAuth token or API key) and then reference it in every Slack node in every workflow. Credentials are stored encrypted in n8n's database and are never visible in plain text in workflow configurations. Always use credential storage rather than hardcoding API keys in workflow nodes.

Building the Lead Notification Workflow: Step by Step

Let's build the workflow. Open the n8n editor and click the + button to create a new workflow. Name it "Lead Capture - Contact Form."

Step 1 Add the Webhook Trigger

Click the + button to add a node. Search for "Webhook" and select the Webhook trigger node. In the node configuration panel on the right, set the HTTP Method to POST and note the webhook URL displayed this is the URL your contact form will send submissions to.

For testing, set the Webhook Response to "Immediately" so the node responds to the form immediately without waiting for the full workflow to complete. In production, you may want to respond after processing so you can return dynamic content to the form page.

Activate the workflow toggle in the top right. Your webhook URL is now live and waiting for submissions.

Step 2 Add a Data Validation Node

Add a Code node after the Webhook trigger. This JavaScript node will validate that required fields are present before any further processing.

In the code node, write logic that checks the incoming item for your required fields (name, email, message, or whichever fields your form collects). If any required field is missing, throw an error with a descriptive message identifying which field is missing. If all fields are present, return the item unchanged for further processing.

This validation node prevents the most common class of production workflow failures: a missing field causing a cryptic error three nodes later, when it would be far easier to catch and report at entry.

Step 3 Add HTTP Request for Contact Enrichment

Add an HTTP Request node. This node will call an enrichment API (Hunter.io, Clearbit, or People Data Labs) to add company information to the contact record based on their email domain.

Configure the node: Method is GET, URL uses an expression to construct the API endpoint with the email from the previous node, and Authentication references your API key credential. Map the response fields to your data schema you want company name, company size, industry, and LinkedIn URL at minimum.

Add error handling: in the node settings, toggle on "Continue on Fail." This means if the enrichment API returns no results or an error, the workflow continues with the data it has rather than stopping. Add an If node after enrichment to check whether the API returned results, and populate fallback values if it did not.

Step 4 Create the CRM Contact

Add your CRM node (HubSpot, Pipedrive, Salesforce, or whichever CRM your team uses). Select the "Create Contact" operation.

Map the contact fields using expressions: firstName from the validated form data, email from the validated form data, company from the enrichment response (or a fallback if enrichment returned nothing), and any custom fields relevant to your qualification process.

Add a second operation on the same CRM node (or a separate node) to check for an existing contact before creating a new one. Most CRMs support a "Find or Create" operation that deduplicates automatically. Duplicate contacts are expensive to clean up investing 10 minutes to configure deduplication in the build prevents hours of cleanup later.

Step 5 Send the Slack Notification

Add a Slack node. Select the "Send Message" operation, choose your credential, and select the channel where lead notifications should appear.

Construct the message using n8n's block kit format (for structured Slack messages) or plain text. A well-formatted lead notification includes contact name, email, company, the message they wrote, and a direct link to the CRM record just created. Use expressions to populate each of these fields from the data flowing through the workflow.

For high-value leads (identified by company size from enrichment, or by product/service interest from the form), add conditional logic that also sends a direct Slack DM to the relevant sales owner in addition to the channel notification.

Step 6 Add Error Handling

This is the step most tutorials skip. Add an error trigger node in n8n, this is a dedicated node type that fires whenever any node in the workflow throws an error that is not caught by node-level error handling.

Connect the error trigger to a Slack node that sends an alert to your operations channel with the workflow name, the error message, and the execution ID so you can find the failed execution in the n8n logs. This gives you real-time awareness of failures without having to check logs manually.

For the most critical nodes (CRM creation, the enrichment call), also configure node-level error handling by clicking the node settings and defining what happens on failure. The options are to stop the workflow (rarely the right choice), continue with the error output (send the failed item to a separate path for manual review), or retry a defined number of times before failing.

Every workflow you build should have at minimum one Slack alert for errors. Silent failures are the most expensive failures in production automation you only discover them when a customer complains or a report comes up empty.

Understanding n8n's Data Flow: The Most Common Source of Confusion

The concept that trips up n8n beginners more than any other is how data flows between nodes when multiple items are involved. Understanding this correctly will prevent an entire category of workflow logic errors.

When the upstream node produces multiple items, by default every downstream node receives and processes every item. This is called "item looping" and it happens automatically without any explicit configuration. A Webhook trigger that receives a form submission with three product selections creates three items if you split by array. Each downstream node then runs once per item.

To merge items back together after processing them independently, use the Merge node with the "Combine" operation. To process all items as a batch in a single JavaScript code node, use $input.all() instead of $input.first().

When building workflows that read from spreadsheets, databases, or API endpoints that return arrays, always check whether you want to process each row independently (the default n8n behaviour) or process all rows together as a collection. The wrong assumption here produces workflows that send 200 Slack messages when you wanted one, or create 200 CRM contacts when you wanted a batch import.

n8n Error Handling: The Architecture That Keeps Systems Running

Production n8n workflows require three layers of error handling to be considered reliable. Node-level handling catches failures in individual nodes. Workflow-level error triggers catch anything that slips through. And a centralised error logging workflow receives error events from every other workflow in the system and writes structured records to a database table.

The centralised error log is especially important as your workflow count grows beyond five or six. When you have 20 running workflows, manually checking each one's execution log is impractical. A single error log table that aggregates failures across all workflows, with a dashboard query that shows error frequency by workflow over the last 24 hours, gives you system-wide visibility in seconds.

We cover the full error handling architecture in our article on building a 24/7 error handling system for automations. For this tutorial, the minimum viable implementation is: add a Workflow Error Trigger node to every production workflow, connect it to a Slack notification node, and include the workflow name, error message, and execution ID in every alert.

Integrating Claude AI Into Your n8n Workflows

One of n8n's most powerful capabilities in 2026 is native AI agent integration via the Claude and OpenAI nodes. This opens a category of workflows that rule-based logic cannot handle: workflows that need to understand natural language input, classify intent, extract structured data from unstructured text, or generate contextual responses.

To add Claude to an n8n workflow, add an "Anthropic" node (available in n8n 1.0+) and configure it with your Anthropic API key credential. Select the model (claude-opus-4 for complex reasoning tasks, claude-haiku-3-5 for high-volume classification where cost matters), and construct your prompt using expressions that inject the relevant context from the workflow data.

For production use, always use Claude's tool-use (structured output) feature rather than asking Claude to return free-form JSON. Define a function schema with typed fields and required constraints. Claude's response will structurally conform to that schema, eliminating an entire class of JSON parsing failures that occur when asking for free-form structured output.

A Practical Claude Integration: Lead Intent Classification

Extend the lead notification workflow with a Claude classification step after the validation node. Pass the contact's message to Claude with a prompt that asks it to classify the lead intent (demo request, pricing question, general enquiry, competitor comparison), assess urgency (high/medium/low), and extract any specific product or service mentions.

Configure Claude to return structured output with fields: intent_category (string, enum), urgency_level (string, enum), product_mentions (array of strings), and confidence_score (number, 0-1). In the downstream workflow logic, route high-urgency demo requests to an immediate Slack DM to the sales owner, medium-urgency leads to the team channel, and low-urgency enquiries to a weekly digest.

This single Claude node, processing perhaps 20-50 leads per day, eliminates the need for manual lead triage a task that typically takes 15-30 minutes of sales manager time daily. For more on building full AI agents with n8n and Claude, read our complete guide to building an AI agent with n8n and Claude.

When using Claude in production workflows, always include a confidence threshold check. If Claude returns a confidence_score below 0.85, route the lead to a human review queue rather than processing automatically. AI with human oversight is a reliable system. AI without it is an optimistic gamble.

n8n vs Make vs Zapier: When to Choose n8n

The full comparison is covered in our n8n vs Make vs Zapier analysis from 500 production deployments. The summary for this tutorial: choose n8n when you need self-hosted data handling, unlimited executions at scale, complex logic that visual-only tools cannot express, or the ability to write custom JavaScript for data transformation.

Do not choose n8n if you are a non-technical user who needs to be running within a day and has no tolerance for setup complexity. In that case, start with Make or Zapier, learn automation fundamentals, and migrate to n8n when the cost or capability ceiling of those platforms becomes a constraint.

Testing Your n8n Workflow Thoroughly

Do not test your workflow only with the ideal happy-path input. Test every edge case you can think of before going live.

For the lead notification workflow, test the following scenarios: a submission with all fields complete and a valid email (happy path), a submission with the email field empty (should trigger validation error and route to error handler), a submission with an email domain that the enrichment API does not recognise (should continue with fallback values), a duplicate submission from the same email within 60 seconds (should find existing CRM contact and update rather than creating a duplicate), and a deliberate API failure by temporarily removing your Slack credential (should trigger the error notification workflow).

Document the expected outcome for each scenario before running the test. When the actual outcome matches the expected outcome for all scenarios, the workflow is ready for production.

Monitoring and Maintaining Your n8n Workflows

A workflow in production requires ongoing monitoring. The n8n execution log shows every workflow run with status (success, error, waiting), processing time, and a full record of input and output data at every node. Review this log daily for the first two weeks after any new workflow goes live.

Set up a monitoring workflow that runs every 15 minutes and queries n8n's REST API for execution metrics: workflows with error rates above a defined threshold, workflows that have not executed in longer than expected, and workflows with processing times significantly above their historical average. Route alerts to a dedicated monitoring Slack channel.

For long-term maintenance, keep a change log for every workflow. Document what changed, when, and why. When an API you depend on updates its authentication model or response schema (which happens reliably every 6-18 months for most SaaS products), this change log is the difference between a 30-minute fix and a 3-hour debugging session.

n8n Tutorial FAQ

Is n8n really free?

The self-hosted version of n8n is free and open-source under the Sustainable Use License. You can run unlimited workflows and executions at no cost beyond your server infrastructure (typically $10-20/month on a basic VPS). n8n Cloud is the managed hosted version with a paid subscription starting at $20/month that includes 2,500 executions per month on the Starter plan.

How hard is n8n to learn for non-developers?

n8n has a steeper learning curve than Zapier but is entirely learnable for motivated non-developers. The visual editor handles most workflow logic without code. The JavaScript code node is available for complex transformations but is not required for the majority of business automation use cases. Expect 10-20 hours of learning investment before you feel comfortable building and debugging production workflows independently.

Can n8n connect to any app or API?

n8n has 400+ native node integrations covering the most popular business apps. For apps without a native node, the HTTP Request node connects to any REST API or webhook-enabled service. If an app has an API and documentation, n8n can connect to it.

How does n8n handle errors in production?

n8n's error handling operates at three levels: individual node error handling (define what happens when a specific node fails), workflow error triggers (fire when any unhandled error occurs in the workflow), and external monitoring (query n8n's API or database to detect stalled or degraded workflows). Production-grade n8n deployments use all three layers.

What is the difference between n8n and Zapier?

Zapier is a closed-source cloud-only platform with per-task pricing, 6,000+ native app connections, and a gentle learning curve. n8n is open-source, self-hostable, free at any execution volume, with 400+ native integrations and a steeper learning curve. Zapier is optimised for simplicity; n8n is optimised for power and control. For a detailed side-by-side comparison, read our n8n vs Make vs Zapier honest comparison.

Tags

n8n tutorialn8n beginners guiden8n workflow automationlearn n8nn8nautomationworkflowclaude ai
P

The PURIST editorial team covers automation, AI agents, and operations strategy for businesses scaling with n8n, Make, and Claude AI.

Keep reading

More from the blog.

All articles

From audit to deployment

Experience the automation
these articles are about.

Book your free audit