n8n workflow automation platform for AI agents and complex automations, step by step

Profesional crea un flujo automatizado con nodos conectados en un portátil Microsoft Surface

n8n is a workflow automation platform that connects applications, APIs, and artificial intelligence (AI) models through a canvas of visual steps. You can use it for simple or complex automations, such as moving form entries into a spreadsheet or summarizing emails with a language model. It runs as a managed cloud service or on a machine you control.

What you’ll take from this

You’ll know whether this tool fits your work, and you’ll have a first AI workflow ready to try. If you want a foundation in applied AI first, take a look at Founderz’s Certificate Program in Artificial Intelligence and Innovation.

  • Understand how a workflow chains steps together
  • Choose between the managed service and self-hosted automation
  • Copy a prompt to classify messages with AI
  • Decide when a simpler workflow automation tool is enough
  • Set up the Community Edition on your computer with Docker or npm

What is n8n, the AI workflow automation platform?

n8n is a source-available automation platform created in 2019 by Jan Oberhauser, according to Wikipedia. Each step in a workflow is a node that you connect to the others in the workflow editor, a visual canvas that runs in your web browser.

In practice, n8n is a low-code tool for business process automation. Picture an operations team that copies orders from the CRM to the billing spreadsheet every Monday. n8n takes that repetitive task off their plate without waiting for IT to build a custom integration.

How do you create an AI workflow step by step?

Every workflow starts with a trigger node, which decides when it runs. Each following step receives the output of the previous one, then transforms it or sends it to another application. You assemble the whole chain by dragging blocks onto the canvas.

  1. Choose what starts the run, such as a new email in Gmail (the Gmail Trigger fires on “Message Received”) or a set time with the Schedule Trigger.
  2. Add action steps for Google Sheets, Slack, or GitHub.
  3. Add an AI step with an LLM, or large language model, trained on huge amounts of text, to classify or summarize the output of the previous step. OpenAI’s ChatGPT runs on this type of model.
  4. Click Execute Workflow to test it with real inputs, then publish it so it runs on its own.

What is n8n used for and which tools can you connect?

Teams use n8n to automate repetitive tasks across several applications through its integrations. Examples include sorting emails, sending form leads into databases, or posting alerts in Slack. You can also build AI agents that check your information before they respond.

A common use case is a sales team that receives inquiries through a form. A webhook receives each inquiry, an AI step classifies it with this prompt, and Google Sheets stores it.

Prompt

Classify the message into one category (quote, support, billing, or other) and one urgency level (high, medium, low). Reply only with JSON: {"category":"","urgency":"","summary":""}. Message:

In the editor, drag the webhook’s message field right after “Message:” so the prompt receives each inquiry. With the input “I need a quote for 40 licenses before Friday,” the expected result is category quote, urgency high, and a short summary. Review the first classifications by hand, because the model can get ambiguous messages wrong.

Real workflow automation examples

These examples show the kind of jobs teams hand over to an automation. Treat them as starting points to adapt to your own apps, not finished recipes.

  • Collect invoices from a shared inbox, save each PDF attachment to a shared folder, and log the sender and date in a spreadsheet.
  • Prep your calls by pulling the CRM notes and latest emails for each meeting on your calendar into one summary an hour before it starts.
  • Route support tickets by urgency with the classification prompt above, and alert the person on duty in Slack.
  • Send a weekly report that pulls figures from a spreadsheet and has a language model draft the commentary for you to review.

How do you set up an AI agent?

To set one up, add the AI Agent node and connect a chat model, a memory, and the tools it can use through the Tool connection. It decides which tool to call based on the request. Start with only a few tools and review its answers before you let it work on its own.

Which hosting fits your team, cloud or self-hosted?

With n8n Cloud, the company manages the hosting for you. With the self-hosted version, you run it on your own machine or a rented server and decide where the information is stored. You are then responsible for updates, backups, and security. The choice comes down to who maintains the stack.

Aspectn8n CloudSelf-hosted
Who manages the hostThe providerYou or your IT team
SetupCreate an accountDocker or npm
Data locationThe provider’s serviceYour infrastructure
CostSubscription based on planFree license plus hosting costs

If you handle personal data, the EU’s Regulation (EU) 2016/679 sets fines for the most serious infringements. These can reach €20 million or 4% of total worldwide annual turnover for the preceding financial year, whichever is higher (Article 83(5)). Agree with your data protection officer on where to host your workflows.

Is n8n free, and what does the Community Edition include?

n8n offers a free self-hosted version, the Community Edition, plus paid plans that go up to an Enterprise tier, hosted by the provider or by you. Strictly speaking, it is not open source. It is source-available under the Sustainable Use License, a fair-code license that restricts uses such as offering the software as a service to third parties. Confirm pricing and terms on the official website.

When should you choose n8n over Zapier or Make?

Choose n8n when you need more flexibility than simpler automation tools offer. That includes branching logic, custom code, or control over where your information runs. For a two-step automation between common apps, either of those alternatives may be enough.

Beginners tend to stumble over two things. One is the JSON format that carries information between steps, and the other is API credentials. According to Eurostat (2025), 19.95% of EU enterprises used AI in 2025, 6.47 percentage points more than in 2024.

How do workflow executions and scaling work?

An execution is a single run of a workflow, according to n8n’s documentation. Manual executions happen when you test from the editor. Production executions start automatically, for example on a schedule or when a webhook fires. The Executions tab on each workflow lists its past runs, and the Overview page shows every run on the instance.

That list is where you debug. Filter by status such as Failed or Success, open a run to see what each step received, and retry the ones that failed. Check it daily during the first week of any new automation, because expired credentials and empty fields tend to surface there first.

For heavier production loads, n8n offers queue mode. A main instance receives webhooks and incoming events, Redis (an in-memory data store) holds the pending executions in a queue, and separate worker processes run them. You scale by adding or removing workers. The documentation recommends Postgres, a relational database, over SQLite for this setup. Consider it once one machine can no longer keep up with your busiest hours.

How do you install the Community Edition on your computer?

To try the Community Edition locally, you need Docker on your computer. After that, a single command starts n8n, and the interface opens in your browser.

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

Open http://localhost:5678 and create your owner account. Pick a task you already do by hand every week for your first workflow. If you’re interested in more autonomous approaches, compare it with AutoGPT in this guide to AutoGPT.

Can you use npm instead of Docker?

Yes, if Node.js is already on your computer. npm, the package manager that ships with Node.js, adds n8n globally with one command, and a second command starts it on the same local address, http://localhost:5678. Use this route for quick local tests rather than anything your team depends on.

npm install n8n -g
n8n start

The hosting documentation marks npm installation as deprecated from version 3.0 and recommends Docker Compose or the one-line setup instead. If the workflows will run part of your business, plan the deployment on Docker from day one.

Frequently asked questions

These are the most common questions people ask before installing n8n.

Do I need to know how to code in Python or JavaScript to use n8n?

Not for basic workflows, because you drag blocks and fill in fields. Writing some JavaScript or Python code, or understanding APIs, lets you go further with the Code node and with HTTP calls to services that have no dedicated integration. Start with the visual blocks and add code only when a use case calls for it.

What are the benefits of n8n?

It combines a visual interface with optional code, can be self-hosted, and includes AI steps for models and agents. Its cost and complexity depend on how you host it and how many workflows you run. If you only have a few simple use cases, a simpler tool may be a better fit.

Which process should you automate first?

Start with a repetitive process that has clear rules, such as sending form leads to a spreadsheet or alerting your team in Slack. Before you open n8n, sketch each step of the workflow on paper and note which data goes in and which comes out.

Further reading

These sources cover the definition of n8n, AI adoption in European enterprises, and the legal framework for personal data.

If you want to design AI automations for your business with sound judgment, the next step is Founderz’s Certificate Program in Artificial Intelligence and Innovation, developed in collaboration with Microsoft. You can request information or view the curriculum. When you finish, you earn the Founderz and Microsoft certification. Along the way, you also collect official Microsoft badges.

Paul Delaney

Paul Delaney wants people to get more out of AI and use it with confidence instead of fear. He shares his experience with business leaders, managers and younger professionals so they can move their careers forward. Paul leads SEO, AEO and GEO strategy at Founderz. He has worked in education marketing since 1998, with more than 20 years in digital channels. He has been using AI in his day-to-day work since 2021 and engineering prompts since the GPT-2 era.