Tech AI LabsAI Growth Infrastructure for Business

How to Use n8n to Build Your First AI Automation

By the Tech AI Labs teamChecked 22 November 20266 min read
How to Use n8n to Build Your First AI Automation: a practical workflow overview

Short answer: Sign up for n8n Cloud (or self-host), create a workflow, add a trigger, then add an AI Agent node connected to a language model and the tools it may use. Test with sample data, then activate the workflow so it runs on its own.

n8n is an open-source automation platform that connects apps and services into workflows, and it has become a favorite for AI work because its AI capabilities are built in, not bolted on. This tutorial walks you from an empty canvas to a working AI automation, checked against n8n's official documentation in December 2026.

Two ways to build with AI in n8n

n8n now offers two complementary approaches:

Agents are available on all n8n Cloud plans and on self-hosted instances from version 2.32.3. This tutorial focuses on the workflow route, because it teaches the concepts everything else builds on.

Step 1: Set up n8n

Either way, you will also need an API key from a language model provider (OpenAI, Anthropic, Google or others) to power the AI steps.

Step 2: Understand the building blocks

Every n8n workflow is a chain of nodes on a canvas:

Data flows from node to node as structured items, and each node's output becomes the next node's input.

Step 3: Build a first AI workflow

A classic starter: an automation that reads new form responses and drafts a personalized reply.

  1. 1Create a workflow and add your trigger, for example a form submission or a new spreadsheet row.
  2. 2Add an AI step. Drop in a language model node and write the instruction: "Summarize this request in one sentence and classify it as sales, support or other."
  3. 3Add an action that uses the result, such as drafting a reply, filing the row into the right list, or posting to Slack.
  4. 4Wire the data between nodes using n8n's expression editor, which lets you reference any earlier field by name.

Step 4: Add an AI Agent when the task needs judgment

When a fixed sequence is too rigid, replace the single AI step with the AI Agent node. Connect it to:

Now the model reasons about the request and picks the right tools, instead of following a hard-coded path. n8n's docs describe this as the difference between chains (fixed) and agents (adaptive), and recommend starting fixed, then adding agency only where judgment is genuinely needed.

An n8n workflow with an AI Agent node and tools
Guide diagram: An n8n workflow with an AI Agent node and tools

Step 5: Test, then activate

  1. 1Run the workflow manually with sample data and inspect every node's output.
  2. 2Fix the common failure: a field name that does not match what the next node expects.
  3. 3When the outputs look right, activate the workflow so the trigger fires on its own.
  4. 4Check the execution history for a few days to catch edge cases.

For agents in Preview, n8n itself warns they can make mistakes and their behavior may change, so keep a human review step anywhere the output reaches customers.

Good first automations

Four first n8n automations: inbox triage, meeting prep, content repurposing and lead enrichment
Guide diagram: Four first n8n automations: inbox triage, meeting prep, content repurposing and lead enrichment

If you are designing the prompts inside these nodes, our practical prompt guide and prompt template library will save you trial and error.

FAQ

Is n8n free?

Self-hosted n8n is free and open source. n8n Cloud is the hosted option with paid plans; AI agents are included on all plans, cloud and self-hosted (2.32.3+).

Do I need to code to use n8n?

No. Workflows are visual. Optional Code nodes exist for custom logic, and AI can even help write that code, but most automations need none.

What is the difference between the AI Agent node and the agents feature?

The AI Agent node adds reasoning inside a workflow you design. The agents feature (in Preview) creates a standalone assistant with its own instructions, tools, knowledge base and schedule, living alongside your workflows.

Which AI models does n8n support?

The major providers, including OpenAI, Anthropic and Google, connected with your own API keys.

Is my data safe with self-hosted n8n?

Self-hosting keeps execution data on your own infrastructure, which is why many teams choose it. You still send prompts to your chosen model provider, so check their data terms.

Sources

Key takeaways

Want AI automations built for your business without the learning curve? Book a free 30 minute call with Tech AI Labs and we will design them with you.

FAQ

Quick answers

Is n8n free?

Self-hosted n8n is free and open source. n8n Cloud is the hosted option with paid plans; AI agents are included on all plans, cloud and self-hosted (2.32.3+).

Do I need to code to use n8n?

No. Workflows are visual. Optional Code nodes exist for custom logic, and AI can even help write that code, but most automations need none.

What is the difference between the AI Agent node and the agents feature?

The AI Agent node adds reasoning inside a workflow you design. The agents feature (in Preview) creates a standalone assistant with its own instructions, tools, knowledge base and schedule, living alongside your workflows.

Which AI models does n8n support?

The major providers, including OpenAI, Anthropic and Google, connected with your own API keys.

Is my data safe with self-hosted n8n?

Self-hosting keeps execution data on your own infrastructure, which is why many teams choose it. You still send prompts to your chosen model provider, so check their data terms.

IN THE DIRECTORY

See how this tool compares, what it costs and what it is best for.

Open the tool page →
How to Create Reusable AI Prompt Templates: article illustration
TUTORIALS

How to Create Reusable AI Prompt Templates

Read →
How to Write Perfect AI Prompts: A Practical Guide: article illustration
TUTORIALS

How to Write Perfect AI Prompts: A Practical Guide

Read →
Free vs Paid ChatGPT: What You Get on Each Plan in 2026: article illustration
TUTORIALS

Free vs Paid ChatGPT: What You Get on Each Plan in 2026

Read →

Keep exploring

Move from research to a useful workflow. Check the source, learn the steps, then discuss implementation.

Discuss your workflow