n8n for beginners: build your first AI automation
n8n is a workflow automation tool: you join apps together as boxes on a canvas, and the workflow runs by itself when something happens. You can add an AI step that reads, summarises or sorts text with a model like GPT, Claude or Gemini. In this lesson you build one real workflow: a form is submitted, an AI summarises it, and the summary lands in your email or Slack.
- 1
What is n8n, in plain words?
n8n (say "n-eight-n") lets you automate boring, repeated work without writing a full program. You drag boxes onto a canvas, connect them with lines, and each box does one job: read a form, call an AI model, send an email. n8n describes itself as a "fair-code workflow automation platform with native AI capabilities".
Fair-code means the source code is public on GitHub, but it uses n8n’s own Sustainable Use License rather than a classic open-source licence. You can use n8n in two ways. n8n Cloud is hosted for you, so there is nothing to install. Self-hosting means you run it on your own computer or server, which needs some technical setup (npm, Docker or a server).
Key idean8n is a visual way to say: "when this happens, do these steps", with AI as one of the steps.
- 2
Triggers, nodes and executions: the only three words you need
A workflow is "a collection of nodes that automate a process". A node is one box on the canvas. The first box is always a trigger node, which starts the workflow when something happens: a form is submitted, a new row is added to a Google Sheet, or it is 8 AM.
Each time the workflow runs from start to finish, that is one execution. This matters because n8n Cloud plans are priced by executions per month, not by how many steps a workflow has.
- Credentials: saved logins that let n8n talk to Gmail, Slack or an AI provider.
- Expressions: small snippets like {{ $json.feedback }} that pull data from an earlier node.
- Test vs publish: you test while building, then publish so it runs on its own.
- Trigger (something happens)
- Node: do a step
- Node: AI step
- Node: send the result
- 3
How does the AI part work?
n8n’s AI nodes come as "cluster nodes": a main (root) node with smaller sub-nodes plugged into it. For a first workflow, use the Basic LLM Chain node. It sends one prompt to a model and passes the answer to the next node. You plug a chat model sub-node into it, such as OpenAI, Anthropic or Google Gemini.
The AI Agent node is the bigger cousin. n8n’s docs describe an agent as "a chain that knows how to make decisions": it can choose tools, use memory and take several steps. Start with a chain. Move to an agent when the task needs choices, like you saw in the AI agents lesson.
To call a model you need access to it. On n8n Cloud Starter and Pro, "Gateway credits" let you run supported models without your own API key, and new Cloud users get a small amount of free credit. When self-hosting, you add your own API key from the model provider as a credential.
Key ideaBasic LLM Chain = one prompt in, one answer out. AI Agent = a model that decides what to do next.
- 4
Build it: form, AI summary, email
Here is a real first workflow. A student club collects feedback with a form. Instead of reading every response, an AI writes a two-line summary with a mood label and emails it to the organiser.
Add an n8n Form Trigger node and create two fields: Name and Feedback (a Textarea). n8n builds the form page for you. Then add a Basic LLM Chain, set Prompt to "Define below", and paste the prompt below. Plug in a chat model sub-node. Finally add a Gmail node with the "Send a message" operation, or a Slack node with "Send a message", and drag the chain’s output into the message body.
Using Google Forms instead? Its responses go into a Google Sheet. Swap the first node for the Google Sheets Trigger with the "Row added" event, and the rest stays the same.
- n8n Form Trigger
- Basic LLM Chain + chat model
- Gmail or Slack: send a message
Prompt for the Basic LLM Chain (the {{ }} parts pull in the form answers) Summarise this event feedback in at most 2 short sentences. Then add one label on a new line: Positive, Neutral or Negative. Name: {{ $json.Name }} Feedback: {{ $json.Feedback }} - 5
Test it, publish it, and what it costs
Click Execute workflow and open the form’s test URL. Submit a sample answer and watch each node turn green. Click a node to see exactly what data went in and out. That is how you debug in n8n. When it works, publish the workflow and share the production URL. Production runs no longer show in the editor, but you can see them in the Executions tab.
Prices, as of Nov 2026, from n8n’s official pages. The self-hosted Community edition is listed as free, "with almost the complete feature set". n8n Cloud starts with a free trial (1,000 executions on the trial). Starter is €20 a month billed annually with 2,500 executions a month, and Pro is €50 a month billed annually with 10,000. The self-hosted Business plan is €667 a month billed annually. AI model usage is billed separately, by Gateway credits or by your own provider.
Key ideaAlways test with fake data first. A published workflow runs every time the trigger fires, including AI calls that cost money.
Straight from the source
The original idea, then the same idea taken apart, then how you use it today.
- 1 · Understand
- They split AI systems into two kinds. Workflows run models and tools along "predefined code paths" that you design, while agents choose their own steps. Many useful jobs only need a workflow.
- 2 · Break it down
- Prompt chaining: one step’s output feeds the next, like form answer, then AI summary, then email. That is the workflow you build in this lesson.
- Routing: a first step sorts the input, then sends it down the right path, such as complaints to one team and praise to another.
- Parallelization: several model calls run at once on parts of the job, or on the same job to compare answers.
- Orchestrator-workers and evaluator-optimizer: one model splits a task for helper models, or one model writes while another checks and asks for fixes.
- 3 · Use it
- In n8n, start with a fixed chain of nodes. Add a sorting step when inputs need different handling, and reach for the AI Agent node only when you truly cannot list the steps in advance.
- 1 · Understand
- Oberhauser wants n8n to be the layer that ties AI models, tools and services together, so "you can actually connect everything to anything." Because nobody knows which model will win, n8n lets you plug in whichever one suits your job.
- 2 · Break it down
- The name: n8n is short for "nodemation", a blend of node (the boxes on the canvas, and Node.js) and automation. He explains in the README that he could not find a good, free short name.
- Any model: the chat model is a swappable part, so you can move from OpenAI to Claude or Gemini without rebuilding the workflow.
- Fair-code: the source is public and free to self-host, but it is not classic open source. He says the licence is there so other companies cannot sell n8n’s code commercially.
- 3 · Use it
- Build your workflow so the AI model is one plug-in part. Try the same prompt with two different chat models and keep the one that gives better summaries for the cost.
Words to know
- Workflow
- A set of connected nodes that automate one process from start to finish.
- Trigger node
- The first node, which starts the workflow when something happens, like a form submission or a schedule.
- Execution
- One complete run of a workflow. Cloud plans are priced by executions per month.
- Basic LLM Chain
- An n8n AI node that sends a prompt to a chat model and returns the answer, with no tools or memory.
- Credential
- Saved login details that let n8n connect to an app or AI provider on your behalf.
- Fair-code
- Source code you can read and self-host, shared under n8n’s own Sustainable Use License instead of a standard open-source licence.
Watch
Hand-picked from the people who explain this best. The video loads only when you press play.
The official 2026 quick start. Watch how the form trigger, Basic LLM Chain and test data work, then how the agent part adds memory and tools.
If triggers, nodes and data still feel fuzzy, this first episode of n8n’s own course explains them slowly. The interface has changed a little since 2024.
Try it
Build a 3-node AI feedback summariser
- 1Sign up for the n8n Cloud free trial (no credit card needed for Starter or Pro trials) and create a new workflow.
- 2Add an n8n Form Trigger with two fields: Name (Text) and Feedback (Textarea).
- 3Add a Basic LLM Chain, choose "Define below", paste the prompt from step 4 of this lesson, and plug in a chat model sub-node.
- 4Add a Gmail node, choose "Send a message", send it to yourself, and drag the chain’s output text into the message body.
- 5Click Execute workflow, open the test form URL, and submit "The talk was great but the hall was too hot". Check your inbox for the summary and label.
Check yourself
Pick an answer to see if you are right, and why.
Done? Keep going
Mark this lesson complete to keep your place. Progress is saved on this device, no login.
Questions people ask
Is n8n free?
The self-hosted Community edition is listed as free, and you can stay on it indefinitely. n8n Cloud, where n8n hosts it for you, has a free trial and then paid plans. As of Nov 2026, Starter is €20 a month and Pro is €50 a month, both billed annually. AI model usage is paid separately.
Do I need to know coding to use n8n?
No. n8n’s own quickstart says that apart from n8n you don’t need any coding experience. Knowing a little JavaScript helps later, because expressions like {{ $json.Name }} use it, but your first workflows only need drag, drop and copy-paste.
What is the difference between the AI Agent node and the Basic LLM Chain in n8n?
The Basic LLM Chain sends one prompt to a model and returns the answer. The AI Agent node lets the model decide which tools to use and in what order, and it can use memory. n8n’s docs note that agents can use memory but chains cannot.
Sources and further reading
- n8n pricing
- n8n docs: Build your first workflow (quickstart)
- n8n docs: Choose how to use n8n (Cloud vs self-hosted)
- n8n docs: Key concept glossary
- n8n on GitHub (README and license)
- n8n docs: Integrate AI
- n8n docs: Understand AI components
- n8n docs: What chains do
- n8n docs: What agents do
- n8n docs: AI examples
- n8n docs: Basic LLM Chain node
- n8n docs: n8n Form Trigger node
- n8n docs: Google Sheets Trigger node
- n8n docs: Gmail node
- n8n docs: Slack node
- n8n docs: Gateway credits
- n8n Learn (official courses)
- Anthropic: Building effective agents (Dec 2024)
- Sequoia Training Data: n8n CEO Jan Oberhauser on Building the Universal AI Automation Layer (Aug 2025)