Back to Blog

n8n for beginners: build your first automation workflow

Start n8n, build a two-node workflow, test it with real data and publish it. Then build a second workflow that turns a website inquiry into a CRM contact, with error handling from day one.

Benjamin WagnerBenjamin Wagnerby Benjamin Wagner
n8nWorkflow AutomationCRM IntegrationTutorial

To learn n8n, build one small workflow end to end: a trigger that receives data, one node that does something with it, a test run, and the Publish step that makes it run without you. Everything larger in n8n is the same pattern with more nodes. This tutorial walks through that first workflow, the test URL trap many beginners hit, error handling, and a second workflow that sends website inquiries into a CRM.

At a glance

Where to run it
n8n Cloud for a quick start, or the free self-hosted Community Edition in Docker if you can run a server.
First workflow
Webhook trigger, an If node that checks the data, an email node. Test it, then publish it.
Common mistake
Calling the test URL after publishing. A published workflow only listens on the production URL.
Before you rely on it
Add an error workflow so a failed run reaches you instead of failing silently.
CRM example
Form data into a CRM contact through the HTTP Request node, shown with the Customermates REST API.

The six words you need

n8n's documentation uses a small vocabulary. Once these terms make sense, the editor does too.

TermWhat it meansWhere you see it
WorkflowA chain of nodes that runs from left to rightThe canvas
TriggerThe first node, which starts a run: a schedule, a webhook call, an app event, or a manual clickThe first node on the canvas
NodeOne step: fetch data, check a condition, send a message, call an APIEverything on the canvas
ExpressionA placeholder that pulls data from earlier nodes, such as {{ $json.email }}Any field, after switching it to expression mode
CredentialA stored login or API key that nodes reuseCredentials menu, or "Create new credential" in a node
ExecutionOne complete run of a workflow, however many nodes it hasThe Executions tab

The last row matters for cost. n8n's pricing page defines an execution as "a single run of your entire workflow", regardless of how many steps it contains or how much data it processes. A ten-node workflow that runs once is one execution.

Cloud or self-hosted: where to run n8n

You have two options. n8n Cloud needs nothing but an account. The Community Edition is free and runs on your own machine or server, which you then maintain.

OptionPriceWhat you get
n8n Cloud Starter€20 per month, billed annually2,500 executions per month, 5 concurrent executions, unlimited users
n8n Cloud Pro€50 per month, billed annually10,000 executions per month, more concurrent executions, admin roles, longer workflow history
Community Edition (self-hosted)Free software, you pay for the serverRuns on your infrastructure, under n8n's Sustainable Use License

Prices checked on 8 October 2026 from n8n's pricing page. Monthly billing is also offered and costs more; the page advertises the annual option as a 17% saving. The Cloud trial gives Pro features with a cap of 1,000 executions and needs no credit card.

Two differences change what a beginner can do:

  • Community nodes. n8n Cloud only installs verified community nodes. Unverified ones need a self-hosted instance, according to n8n's community node docs.
  • Licence. The Community Edition is published under the Sustainable Use License, which allows use "for your own internal business purposes or for non-commercial or personal use". Automating your own company is covered. Reselling n8n as a hosted service is not.

Choose Cloud if you want to start today and nobody on the team wants to run a server. Self-host if you need unverified community nodes, want the data on your own infrastructure, or expect enough runs that execution caps would cost more than a small server.

To try the Community Edition locally, Docker is the shortest route. This is a minimal version of the command in n8n's Docker guide:

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

Then open http://localhost:5678. The guide adds timezone settings, and for a server that runs permanently n8n points you to its Docker Compose setup with HTTPS. A local instance is fine for learning. It is not reachable from the internet, which matters once a cloud service has to call your webhook.

Build your first workflow: an inquiry that sends you an email

The workflow receives a JSON payload, as a website form would send it, checks that it contains an email address, and emails you the details. It has three nodes and teaches every core concept.

  1. Create the workflow and add a Webhook trigger

    Create a new workflow and add the Webhook node as the trigger. Set the HTTP method to POST and give the path a readable name such as inquiry. The node shows two URLs, a test URL and a production URL. Copy the test URL.

  2. Send it test data

    Click Listen for test event. n8n now waits for a call. From a terminal, send a sample inquiry to the test URL:

    curl -X POST "<your test URL>" \
      -H "Content-Type: application/json" \
      -d '{"firstName":"Lisa","lastName":"Meyer","email":"lisa@example.com","message":"Can we talk about a retainer?"}'

    The node's output panel now shows the four fields. Pin this output so later test runs reuse it without another curl call.

  3. Add an If node

    Connect an If node and add one condition: {{ $json.body.email }} is not empty. Webhook data arrives under body, which is the detail that trips many people writing their first expression. Items that pass go out on the true branch.

  4. Add an email node on the true branch

    Add a Gmail node (or Send Email with SMTP credentials). Create the credential when the node asks for it. In the subject, write New inquiry from {{ $json.body.firstName }} {{ $json.body.lastName }}, and put the message and email address in the body.

  5. Run the whole workflow

    Click Execute workflow and send the curl call again. Each node that ran shows its item count, and clicking a node shows exactly what went in and what came out. If the email arrives, the logic works.

  6. Publish it and switch to the production URL

    Click Publish. From now on the workflow listens on the production URL, and that is the address your form must call. Production runs do not appear on the canvas; you find them in the Executions tab.

Test URL or production URL?

Mixing up the two URLs is a frequent cause of "my webhook doesn't work" questions. n8n's Webhook node documentation separates the two:

Test URLProduction URL
Active whenYou click Listen for test event or Execute workflowThe workflow is published
Data shown on the canvasYesNo, check the Executions tab
Use it forBuilding and debuggingThe real form, app or CRM webhook

If a call to the production URL returns an error, check first whether the workflow is published, then whether the caller uses the right method (POST here).

Add error handling before you rely on it

A published workflow does not notify anyone when it fails unless you tell n8n where to report failures. Two settings cover most cases.

  1. An error workflow. Create a separate workflow that starts with the Error Trigger node and sends you an email with the failed workflow's name and the error message. Then open the original workflow, go to Options > Settings, and choose it under Error workflow. The error handling docs list the data the Error Trigger receives.
  2. Node settings. Every node has a settings tab. For calls to external APIs, turn on Retry On Fail. For steps that may fail without harm, such as a logging step, set On Error to Continue so the rest of the run still completes.

Name things while you are at it. "Inquiry: website form to CRM" in an error email tells you where to look. "My workflow 3" does not.

Second workflow: website inquiry into a CRM

The useful version of the first workflow stores the inquiry where your team works with it. The pattern is the same for any CRM with a REST API: authenticate with an API key, map the form fields to the CRM's field names, send one HTTP request. The example below uses Customermates, the CRM that publishes this guide, because its API details are public.

  1. Create an API key

    In Customermates, open Settings → API keys, click Add and choose Standard API key. The key acts with the permissions of the user who created it, so create it as a user who may create contacts. Details are in API keys.

  2. Store it as an n8n credential

    In n8n, create a Header Auth credential with the header name x-api-key and the key as its value. Every node that talks to the CRM reuses it, so a rotated key is changed in one place.

  3. Replace the email node with an HTTP Request node

    First look up the IDs once: POST <your Customermates address>/api/v1/model/discover with {} returns the Contacts type ID, and POST /api/v1/model/read with that ID in typeIds returns the field IDs and the current schema revision. Then, on the If node's true branch, add an HTTP Request node: method POST, URL <your Customermates address>/api/v1/records/mutate, authentication through the Header Auth credential, and a JSON body:

    {
      "expectedRevision": 12,
      "idempotencyKey": "inquiry-{{ $execution.id }}",
      "mutation": {
        "action": "create",
        "typeId": "<Contacts type ID>",
        "fields": [
          { "fieldId": "<First name field ID>", "value": { "kind": "text", "value": "{{ $json.body.firstName }}" } },
          { "fieldId": "<Last name field ID>", "value": { "kind": "text", "value": "{{ $json.body.lastName }}" } }
        ],
        "identities": [{ "provider": "mail", "value": "{{ $json.body.email }}" }]
      }
    }

    Replace 12 and the IDs in angle brackets with the values from model/read. The email address goes into identities with the provider mail, which is how Customermates links a contact to its email conversations. The idempotency key makes a retried run return the first result instead of creating a second contact. To keep the message, append it to the contact's notes afterwards with an update mutation.

  4. Keep the notification

    After the HTTP Request node, keep the email node so someone sees the new contact. Then test with the pinned data, check the contact in the CRM, and publish.

The reverse direction works too. Under Settings → Webhooks → Add, Customermates sends a POST to an n8n Webhook node when a subscribed event happens, for example record.created for the Contacts list or record.updated for the Deals list. Set a secret so n8n can verify the signature. The webhooks reference shows the payload. One practical catch: Customermates Cloud cannot reach an n8n instance on localhost, so this direction needs n8n Cloud or a self-hosted n8n with a public HTTPS address.

A few details from the n8n integration docs save debugging time:

  • Links change only through link and unlink mutations. Legacy relation arrays such as organizationIds are not accepted.
  • updateMany and deleteMany take at most 100 records per request, so split larger batches.
  • Webhook deliveries are not strictly ordered. Use the payload timestamp to order them and the event ID to drop duplicates.

There is also a Customermates community node, @customermates/n8n-nodes-crm, with an action node for CRM records and a trigger node for webhook events. It has its own release schedule, so check that it supports the current record API before you use its CRM actions. Because n8n Cloud only installs verified community nodes, plan on the HTTP Request route there and use the community node on a self-hosted n8n.

Where Customermates fits, and where it does not

n8n is a separate product. It is not included in any Customermates plan; you run it yourself or subscribe to n8n Cloud. REST, webhooks and MCP work on every Customermates Cloud plan, from €12 per user per month (see pricing), and in the self-hosted open-source edition.

Not every CRM automation needs n8n. If the task is "every Monday, review deals that have not moved and draft a note for each", that needs judgement more than wiring. In Customermates Cloud, a routine runs Mate, the in-app assistant, on a schedule or a record event with a saved instruction, and uses hosted AI credits. If you want your own AI client to work in the CRM instead, connect it through MCP. Use n8n when the job is deterministic and crosses several systems: form to CRM to spreadsheet to team chat.

If you only need contacts in a spreadsheet and an email per inquiry, you do not need a CRM for this tutorial at all. A Google Sheets node on the true branch does the job.

Frequently asked questions

How hard is it to learn n8n?

The basics are quick: the first workflow in this tutorial uses three nodes and one expression. The harder part is understanding how data moves between nodes as items, and reading API documentation for the services you connect. Expect to spend most of your learning time in the output panel, comparing what a node received with what it produced.

Do I need to know how to code?

No. The visual editor, expressions and the built-in nodes cover most beginner workflows. The Code node lets you write JavaScript or Python when a transformation gets awkward, but it is optional. You do need to read JSON, because that is what every node shows you.

What does n8n cost per month?

The self-hosted Community Edition is free; you pay for the server. n8n Cloud Starter costs €20 per month and Pro €50 per month, each billed annually, with 2,500 and 10,000 executions per month respectively (checked on 8 October 2026 on n8n's pricing page). Monthly billing costs more.

Is n8n open source?

The source code is public on GitHub, but the licence is the Sustainable Use License, not an OSI-approved open-source licence. It allows internal business, non-commercial and personal use. Files marked as enterprise edition need a separate n8n Enterprise License.

What can I actually do with n8n?

Anything that follows "when this happens, do that" across systems with an API: store form submissions in a CRM, copy new contacts to a spreadsheet, post a team message when a deal changes, or pull data on a schedule and send a summary. With AI nodes it can also call language models inside a workflow.

Where can I continue after this tutorial?

n8n's own first-workflow tutorial builds a scheduled workflow with an If node and credentials. The n8n Academy has the courses Essentials, Integrations and In Practice. For CRM workflows, the Customermates n8n page shows how the CRM and n8n connect.

Customermates

Put customer work in one clear system

Start with the open-source CRM, or use Customermates Cloud to bring supported channels and managed capabilities together.

✓ No credit card required ✓ First 7 days free