Key takeaways
- An n8n workflow is a set of connected nodes: a trigger starts it, and each node fetches, transforms or sends data.
- n8n is a source-available workflow automation tool you can self-host or use in the cloud, with code steps when you need them.
- AI workflows add LLM nodes; agentic workflows let an AI Agent node choose tools to reach a goal.
- Sub-workflows let one workflow call another, so you build reusable pieces.
- Start from a template, then add error handling and logging before you rely on it.
An n8n workflow is an automation built from connected nodes: a trigger node starts it, for example a new form submission, a schedule or a webhook, and the following nodes fetch, transform, decide and send data across apps and APIs. n8n is a workflow automation tool that you can self-host or use as a cloud service, with code steps in JavaScript or Python when visual nodes are not enough. This page explains how workflows run, AI and agentic workflows, sub-workflows, publishing, examples, templates and a first tutorial.
What is an n8n workflow?
An n8n workflow is a visual automation made of nodes connected on a canvas. Each node does one job, such as receiving a webhook, reading a Google Sheet, calling an API, filtering items or sending a Slack message, and data flows from node to node.
Also asked as: what is n8n workflow · how does n8n workflow works · what is publish workflow in n8n
Workflows can be simple, such as "when a form is submitted, add a row to a sheet and email a confirmation", or complex, with branches, loops, error handling and AI steps. Data moves between nodes as items in JSON format, and you can reference any earlier node's output in later fields with expressions. Every run is recorded as an execution, so you can inspect what happened at each step, which makes debugging much easier than with scripts scattered across servers.
How does an n8n workflow work?
A trigger node starts an execution, which passes items through each connected node in order. Nodes call services with stored credentials, transform data with expressions or code, branch with IF and Switch nodes, and the execution log records inputs and outputs at every step.
Key concepts:
- Triggers: webhooks, schedules, app events, manual runs, chat messages.
- Items: n8n processes a list of JSON items; most nodes run once per item.
- Expressions: insert values from earlier nodes into fields.
- Credentials: stored securely and reused across workflows.
- Error workflows: a separate workflow that runs when another fails.
In test mode you run workflows manually and inspect data; once published, the production trigger runs automatically.
What is the n8n workflow automation tool?
n8n is a workflow automation platform for connecting apps, APIs and AI models without writing a whole application. It offers hundreds of integrations, a visual editor, code nodes, self-hosting and a cloud version.
Also asked as: what is n8n workflow automation tool
It is popular with developers because it is source-available under n8n's Sustainable Use License, can be self-hosted with Docker for data control, and lets you drop into JavaScript or Python when needed. That licence allows free self-hosting for your own use but restricts reselling n8n as a service, so it is fair-code rather than open source in the strict sense. Compared with Zapier, n8n gives more control and lower cost at scale; compared with code-only orchestrators, it is much faster to build and easier to hand to non-developers.
What is an n8n AI workflow?
An n8n AI workflow uses language model nodes as steps: classifying messages, extracting fields from documents, summarising content, generating replies or answering questions from a vector store, with the rest of the workflow handling data and actions.
Also asked as: what is n8n ai workflow
A typical example: a Gmail trigger receives a support email, an LLM node classifies it and extracts the order number as JSON, an IF node checks the confidence, and the workflow either looks up the order and drafts a reply for approval or routes it to a person. n8n supports major model providers and local models through Ollama, plus vector stores for retrieval. Treat AI steps carefully: require structured output, validate it, and keep deterministic rules for decisions with money or legal effect, the approach I used in DocuLens AI.
What is an n8n agentic workflow?
An agentic workflow in n8n uses the AI Agent node: you give it a model, instructions, memory and a set of tools, such as other nodes, HTTP requests or sub-workflows, and it decides which tools to call to complete a request.
Also asked as: what is n8n agentic workflow
That differs from a fixed workflow where you define every step. For example, a chat agent for a college office could have tools to search the notice board, look up a student's application status and create a ticket, choosing among them based on the question. Keep agents narrow, describe each tool clearly, limit what tools can change, add human approval for sensitive actions, and log every run. When the steps are predictable, a regular workflow is more reliable and cheaper than an agent.
What is a sub-workflow in n8n?
A sub-workflow is a workflow called by another workflow through the Execute Workflow node. It receives input from the parent, runs its own steps and returns output, letting you reuse logic and keep workflows small and readable.
Also asked as: what is a sub workflow n8n
Use sub-workflows for repeated tasks, such as "normalise a customer record", "send a formatted Slack alert" or "look up a user by email", that many workflows need. They are also how you give an AI Agent node complex tools: wrap the logic in a sub-workflow and expose it as a tool. Define clear inputs and outputs, test the sub-workflow on its own, and version it carefully, since changes affect every parent that calls it.
What does publishing a workflow mean in n8n?
Publishing, called activating in some versions, makes a workflow live: its production trigger starts listening, so webhooks, schedules and app events run it automatically without you pressing a button.
Before publishing, test with real sample data, check that credentials work in production, and add an error workflow that alerts you on failure. Note that webhook triggers have separate test and production URLs; external services must call the production URL once the workflow is live. After changes, re-test and republish. Monitor executions for the first days, because real data is messier than test data. If you self-host, make sure your instance is reachable and backed up.
What are some n8n workflow examples?
Common examples include saving form submissions to a sheet and notifying a team, syncing contacts between a CRM and email tool, posting new blog articles to social channels, sending daily reports, triaging support emails with AI, and backing up data on a schedule.
Examples for students and small teams:
- Hackathon registrations: form to sheet, validation, confirmation email, team channel alert.
- Daily digest: fetch RSS feeds, summarise with an LLM, send to Telegram.
- Lead capture: website form to CRM, with a follow-up email two days later.
- Document intake: PDF arrives by email, extract fields, add to a database for review.
- Uptime alert: check a website every five minutes and message you if it is down.
Where can I find n8n workflow templates?
n8n's website has a large library of community workflow templates that you can import with one click, covering AI agents, marketing, sales, IT operations and more. You can also import workflows shared as JSON files.
Treat templates as starting points: read every node before running one, replace credentials with your own, check what data it sends where, and add error handling. Community templates vary in quality and may call paid services or expose data if you do not adjust them. Once a template works for you, rename nodes clearly and add notes on the canvas so you, or a teammate, can understand it months later.
Is there an n8n workflow tutorial for beginners?
Yes. n8n's documentation includes beginner courses and step-by-step tutorials. A first workflow takes about thirty minutes.
A beginner tutorial:
- Run n8n locally with Docker or start a cloud trial.
- Add a Schedule trigger set to every morning.
- Add an HTTP Request node to fetch weather or news from a public API.
- Add a Set or Code node to format a short message.
- Add a Telegram, Slack or email node to send it to yourself.
- Test, check each node's output, then publish.
Next, add an LLM node to summarise the content, and an error workflow to alert you when something fails.




