n8n is a workflow automation platform that connects apps, moves data between them and, increasingly, runs AI agents inside those workflows. This complete beginner course from JavaScript Mastery explains how n8n works, then builds a real project: an AI-powered inbox manager that categorises incoming emails, creates tasks for issues and drafts replies.
This page walks through the concepts and the project structure, so you can follow along or apply the same approach to your own processes.
WHAT IS N8N?
n8n lets you build automations visually by connecting nodes. Each node does one thing, such as receiving an email, reading a spreadsheet, calling an API or asking an AI model a question. Nodes are linked into a workflow that runs when a trigger fires, for example when a new email arrives or at a set time each day.
n8n can be used as a cloud service or self-hosted on your own server, which gives more control over data and costs.
CORE CONCEPTS
- Triggers: what starts a workflow, such as a new message, a form submission, a webhook or a schedule.
- Nodes: the individual steps, from app actions to data transformations.
- Credentials: secure connections to your accounts, such as Gmail, Slack or a database.
- Data flow: each node passes its output to the next, where it can be filtered, transformed or routed.
- Integrations: hundreds of built-in connectors, plus generic HTTP requests for any API.
- AI Agent node: combines a language model, memory and tools so the workflow can handle open-ended decisions.
THE PROJECT: AN AI INBOX MANAGER
1. Categorise new emails (from 49:53). A trigger watches the inbox. An AI step reads each new email and assigns a category, such as support issue, sales enquiry or newsletter.
2. Create issue tasks (from 1:03:37). Emails classified as problems automatically become tasks in a project management tool, with the key details extracted.
3. Generate draft replies (from 1:22:38). The agent writes a suggested response and saves it as a draft, so a person can review and send it.
The design keeps a human in control of what is sent, while removing the repetitive sorting and first-draft work.
KEY TAKEAWAYS
- n8n workflows are built from triggers and nodes connected in sequence.
- AI agents inside n8n handle steps that need judgement, such as classifying or drafting.
- Start with one clear process, such as inbox triage, and expand from there.
- Keeping replies as drafts is a simple way to add human review to an AI workflow.
FAQ
IS N8N FREE?
n8n offers a self-hosted community edition and paid cloud plans. Costs depend on how you host it and how many workflows you run.
DO I NEED TO CODE TO USE N8N?
No for most workflows. The visual editor covers common tasks, and code nodes are available when you need custom logic.
WHAT IS THE DIFFERENCE BETWEEN N8N, MAKE AND ZAPIER?
All three automate work between apps. n8n stands out for self-hosting and flexibility, Make for its visual scenario builder, and Zapier for its very large app library and ease of use.
CAN N8N RUN AI AGENTS?
Yes. The AI Agent node connects a language model to tools and memory, so a workflow can make decisions and take actions.



