Skip to Content

n8n for Beginners: Automate Your First Workflows

What n8n is, the ideas behind it, a first workflow built step by step, APIs, errors, AI agents, hosting and security
November 7, 2026 by
n8n for Beginners: Automate Your First Workflows
Hassan Tabbal

n8n is a visual tool for automating work between apps. This n8n tutorial for beginners shows you how to build your first workflow. You place nodes on a canvas and connect them, and n8n moves data from one step to the next, for example from a web form to a Google Sheet and a Slack message. You can use n8n in the cloud or install it on your own server for free under its fair-code licence, and when an app has no ready-made node, you can still reach it through its API with the HTTP Request node.

What n8n is, and what it costs

n8n's code is public on GitHub and published under the Sustainable Use License, which n8n calls fair-code. You may use and change it for your own company's internal work and for personal projects, and you can build and run workflows for clients and charge for that work. Hosting n8n so that your clients build their own workflows, or rebranding it as your own product, needs a commercial licence from n8n. Some team features, such as single sign-on and Git version control, are part of the paid Business and Enterprise plans.

You have two ways to run it:

  • n8n Cloud: n8n hosts it for you. Plans are billed by the number of workflow executions per month, and one execution counts once however many steps it has. There's a free trial with no credit card.
  • Self-hosted: the Community Edition runs on your own computer or server at no licence cost. You look after the server, updates and backups yourself.

Prices and limits change, so check n8n's pricing page before you choose.

Six ideas to understand first

  • Workflow: connected nodes that do one job, such as sending website leads to the CRM.
  • Trigger: the node that starts a workflow. It can be a schedule, a webhook (a URL another system calls), a form, a new email or a manual click.
  • Node: one step. Some nodes talk to an app (Google Sheets, Slack, Gmail, Odoo), others change data (Edit Fields, IF, Merge, Code).
  • Credentials: the saved logins and API keys that nodes use. n8n stores them encrypted, apart from the workflow, so sharing a workflow doesn't share your passwords.
  • Items and expressions: data passes between nodes as a list of items, and each item holds JSON. A node runs once for every item it receives. Inside a field you write an expression between double curly brackets, such as {{ $json.email }}, to use a value from the previous node.
  • Executions: each run of a workflow is saved with the data at every step. When something goes wrong, the Executions tab is where you look first.

The items idea is the one beginners miss most. If a Google Sheets node returns 50 rows, the next node runs 50 times. That's usually what you want, and it also explains 50 Slack messages where you expected one.

Your first n8n workflow, step by step

In this example, someone fills in a "Request a demo" form, n8n cleans the data, adds a row to a Google Sheet and posts a message in your sales channel on Slack.

1. Start with a trigger

Create a new workflow and add the n8n Form Trigger. Give the form a title and three fields named Name, Email and Company, and make Email required. n8n gives you a test URL for the form. Open it, submit a sample entry, and the data appears in the node's output panel.

If the data comes from your own website instead, use a Webhook node set to POST. You can send it a test request from a terminal:

curl -X POST "https://your-n8n.example.com/webhook-test/demo-request" \
  -H "Content-Type: application/json" \
  -d '{"Name": "Rana Haddad", "Email": " Rana@Example.com ", "Company": "Cedar Foods"}'

The test URL works only while you're listening in the editor. The production URL (with /webhook/ instead of /webhook-test/) starts working once you publish the workflow.

2. Clean and enrich the data

Add an Edit Fields (Set) node and create the fields you want to keep, using expressions:

name        {{ $json.Name.trim() }}
email       {{ $json.Email.trim().toLowerCase() }}
company     {{ $json.Company }}
domain      {{ $json.Email.trim().toLowerCase().split('@')[1] }}
received_at {{ $now.toFormat('yyyy-LL-dd HH:mm') }}

$now is a Luxon date, so you can format it as you like. Run the node and check the output before moving on.

3. Decide with an IF node

Add an IF node that checks whether {{ $json.domain }} is one of the free mail providers, such as gmail.com or hotmail.com. Business emails leave through the "false" branch and carry on.

4. Save to Google Sheets

Add a Google Sheets node with the operation Append Row. Create a Google credential when n8n asks for one, choose your spreadsheet and sheet, and map each column to a field from the previous node.

5. Tell the team on Slack

Add a Slack node with Send Message, pick the channel, and write a message such as New demo request: {{ $json.name }} from {{ $json.company }} ({{ $json.email }}).

6. Test, then publish

Run the workflow with a few entries, including messy ones. When it behaves, click Publish. Since n8n 2.0, saving and publishing are separate: changes you save don't go live until you publish them again.

Call any API with the HTTP Request node

Sooner or later you'll need a service that has no ready-made node. The HTTP Request node can call any REST API. You set the method (GET, POST, PUT, DELETE), the URL, query parameters, headers and a JSON body, and the response comes back as items you can use in the next node.

  • Most API documentation shows a curl example. Use Import cURL in the node to fill in the fields from it.
  • Put API keys in a credential (Header Auth, Bearer, OAuth2, or the predefined credential of a known service), never typed into the URL or headers.
  • For APIs that return results page by page, use the node's Pagination option instead of building a loop yourself.

When the data needs more than an expression can do, add a Code node. It runs JavaScript (or Python, on setups that support it). This one cleans every email in one go:

// Code node, mode: Run Once for All Items
return $input.all().map(item => ({
  json: {
    ...item.json,
    email: String(item.json.email || '').trim().toLowerCase(),
  },
}));

Error handling and retries

Workflows fail for ordinary reasons, such as an API that's down for a minute, an expired token or an empty field. Plan for it from the start.

  • Retry On Fail: in a node's settings, turn it on for calls to outside services and choose how many tries and how long to wait between them.
  • On Error: choose whether the workflow stops, continues, or continues through a separate error output that you can route to a fallback step, such as saving the item for later.
  • Error workflow: build one small workflow that starts with the Error Trigger node and sends you an email or chat message with the workflow name, the failed node and a link to the execution. Then select it under Workflow Settings in every important workflow.
  • Stop and Error: this node fails the run on purpose when data is wrong, such as an order with no customer, so you hear about it.

AI nodes and agents in n8n

n8n includes an AI Agent node that you connect to a chat model (OpenAI, Anthropic, Google Gemini, a local model through Ollama and others), to memory so it remembers the conversation, and to tools, which can be other nodes or whole workflows. It reads a request, picks a tool and answers with the result.

Learn the basic nodes first, because an agent is only as reliable as its tools, and those tools are ordinary workflows. Give it the fewest tools that do the job, and have a person approve anything that sends money, deletes data or writes to customers. If your business runs on Odoo, Odoo 20 also has agents of its own, explained in our article on Odoo 20 AI agents.

n8n hosting choices

For learning, run n8n on your own computer with Docker:

docker volume create n8n_data
docker run -it --rm --name n8n -p 5678:5678 \
  -e GENERIC_TIMEZONE="Asia/Beirut" -e TZ="Asia/Beirut" \
  -v n8n_data:/home/node/.n8n \
  n8nio/n8n

Then open http://localhost:5678. For real work you have three common choices:

  • n8n Cloud is the least work, because n8n runs the server and the updates.
  • A virtual server you manage (a VPS from any cloud provider) with Docker Compose, PostgreSQL as the database and a reverse proxy for HTTPS. It costs less at volume and keeps the data on your server, and the upkeep is yours.
  • A managed platform that offers n8n as a one-click app sits in between. Check who applies updates and how backups work before you rely on it.

Security points for self-hosted n8n

  • Update often. In January 2026 n8n fixed a critical flaw (CVE-2026-21858) in self-hosted versions older than 1.121.0: an attacker with no login could read files on the server, and published research showed how to turn that into a full takeover. Pin a version, read the release notes and update on a schedule.
  • Protect webhooks. A production webhook URL is open to anyone who finds it. Add Header Auth or Basic Auth on the Webhook node, and check the data that comes in.
  • Guard the encryption key. Credentials are encrypted with a key kept in the .n8n folder (or set with N8N_ENCRYPTION_KEY). Lose it and every saved credential becomes unreadable. Leak it with a database copy and they can all be decrypted.
  • Limit rights. Anyone who can edit workflows can reach every system the credentials allow, so give each credential only the access it needs.
  • Back up and test restores. Back up the database and the .n8n folder, and restore one now and then to prove it works.
  • Watch saved executions. They hold real customer data, so set how long they're kept and who can see them.

Common beginner mistakes

  • Forgetting that nodes run once per item, then getting duplicate emails or rows. Use Aggregate or the node's "Execute Once" setting when you need a single run.
  • Testing with the test webhook URL and wondering why the live site does nothing after publishing.
  • Pasting API keys into fields instead of credentials, then sharing the workflow.
  • No error workflow, so failures go unnoticed for days.
  • Keeping default node names. "HTTP Request3" means nothing a month later.

Practice projects

  1. A daily schedule that reads tomorrow's events from Google Calendar and sends you a summary by email.
  2. A contact form that saves leads to a sheet, skips duplicates and alerts you on Slack or Telegram.
  3. A weather or exchange-rate alert that calls a public API with the HTTP Request node and messages you when a value crosses a limit.
  4. An inbox helper that sorts incoming support emails with an AI model and drafts replies for a person to review.

n8n's template library has examples for most of these. Build your own version first, and you'll learn far more.

FAQ

Is n8n free?

The self-hosted Community Edition has no licence cost for internal business and personal use. You pay for the server you run it on. n8n Cloud and the self-hosted Business and Enterprise plans are paid.

Is n8n open source?

Its source code is public, but it uses the Sustainable Use License, which n8n calls fair-code. It allows internal and personal use and limits selling n8n itself as a service, so it doesn't meet the formal open-source definition.

Do I need to know how to code to use n8n?

No, many workflows use only ready-made nodes and simple expressions. Basic JavaScript and a grasp of JSON and APIs will take you much further.

What's the difference between n8n and Zapier or Make?

All three connect apps. n8n can be self-hosted, counts a whole workflow run as one execution and lets you add code anywhere in a workflow, which suits technical users and high volumes. Zapier has more ready-made integrations and is quicker for very simple tasks.

Learn automation with Winners Academy

Winners Academy is NavyBits' hands-on training for fresh graduates and IT students in Lebanon. Its courses are built on real projects and mentored by NavyBits engineers, and you get a certificate with a unique ID when you finish. There are no courses running right now, and new ones are expected soon. See the Winners Academy page, and send us a message to hear when the next course opens.

If you run a business and would rather have these workflows built and looked after for you, see our AI agents and automation services or book a free 30-minute call.

n8n for Beginners: Automate Your First Workflows
Hassan Tabbal November 7, 2026
Share this post
WhatsApp usAI agent replies 24/7
Book a free 30-minute call