Practical building · Module 3
Workflow automation with n8n
n8n (pronounced "n-eight-n") is a workflow automation platform that lets you connect different apps and services.
Previously
Multi-agent systems
In practice, when tasks cross more than a couple of domains, a single agent often degrades quickly.
This module
Workflow automation with n8n
n8n (pronounced "n-eight-n") is a workflow automation platform that lets you connect different apps and services.
Next
Model Context Protocol (MCP)
The Model Context Protocol (MCP) is an open protocol for connecting AI clients to external tools and data sources.
Progress
Mark this module complete when you can explain it without rereading every paragraph.
Why this matters
Using Docker (Recommended): # macOS / Linux docker run -it --rm --name n8n \ -p 5678:5678 \ -v n8n_data:/home/node/.n8n \ n8nio/n8n # Windows PowerShell docker run -it --rm --name n8n ` -p 5678:5678.
What you will be able to do
- 1 Explain what n8n is and when it is the right tool.
- 2 Build a simple workflow that includes an AI step and a human check.
- 3 Integrate a workflow with at least one external service.
Before you begin
- Core concepts completed or equivalent understanding
- Basic confidence with workflow and integration terms
Common ways people get this wrong
- Double execution. If retries cause duplicate side effects, you get billing errors and angry users.
- Brittle integrations. External APIs change. Design for versioning, timeouts, and backoff.
Main idea at a glance
Email Classification Workflow
Stage 1
Email Arrives
A new email triggers the workflow. This is the entry point.
I think most workflows should start with a clear trigger event.
3.3.1 What is n8n?
n8n (pronounced "n-eight-n") is a workflow automation platform that lets you connect different apps and services. Think of it as building with LEGO blocks, but for software.
Key features
Visual drag-and-drop interface
400+ built-in integrations
Native AI capabilities
Self-hosted or cloud options
Fair-code licence (free for personal use)
3.3.2 Installing n8n
Using Docker (Recommended):
# macOS / Linux
docker run -it --rm --name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
n8nio/n8n# Windows PowerShell
docker run -it --rm --name n8n `
-p 5678:5678 `
-v n8n_data:/home/node/.n8n `
n8nio/n8nAccess n8n at http://localhost:5678
3.3.3 Building an AI Workflow
Let us build an email classification and auto-responder.
Mental model
Workflows as reliable plumbing
Automation works when steps are observable, idempotent, and safe to retry.
-
1
Trigger
-
2
Workflow steps
-
3
Tools and APIs
-
4
State store
-
5
Outcome
Assumptions to keep in mind
- Steps can be retried. If a step can run twice safely, you can build reliable recovery.
- Failures are visible. A silent failure is the worst kind. Log and alert on broken runs.
Failure modes to notice
- Double execution. If retries cause duplicate side effects, you get billing errors and angry users.
- Brittle integrations. External APIs change. Design for versioning, timeouts, and backoff.
Check yourself
Quick check. Workflow automation
0 of 4 opened
When is a visual workflow tool like n8n a good fit
When you need to connect services, automate steps, and keep the flow easy to inspect and change.
Why add a human review step in an AI workflow
To catch mistakes before they reach users, especially when the cost of being wrong is high.
Scenario. A workflow can send emails. Name one guardrail you should add
Restrict recipients, require confirmation, log outputs, or use a staging mode before production.
What is a trigger in a workflow
The event that starts the workflow, such as a new email or a scheduled time.
Artefact and reflection
Artefact
A workflow diagram and a short note explaining the boundaries.
Reflection
Where in your work would explain what n8n is and when it is the right tool. change a decision, and what evidence would make you trust that change?
Optional practice
Build one workflow that uses a trigger, an AI step, and an output step.