A no-fluff guide from The Testing Academy: spin n8n up locally, learn the node model, build your first end-to-end workflow, then automate the boring QA chores with AI nodes and MCP.
A node-based workflow tool. Drag a trigger, drag actions, draw arrows, hit run. Self-hosted, source-available, free for personal use, with paid Cloud + Enterprise tiers.
n8n = Zapier you can run on your laptop. Each rectangle on the canvas is a node — an HTTP call, a database query, a Slack post, a Playwright run. Connect them, pass JSON between them, and you have a workflow. That's it.
Five words. Learn them once, the rest of n8n is just discovering more nodes.
| Term | What it means | Example |
|---|---|---|
| Workflow | One canvas with one or more triggers + nodes wired together. | "Nightly Playwright run" |
| Node | A single step. Has inputs, options, and produces JSON items. | HTTP Request, Slack, Postgres, OpenAI Chat |
| Trigger | The first node — what kicks the workflow off. | Cron, Webhook, Manual, Schedule |
| Item | One JSON object flowing through. Many items = the next node runs once per item. | { "test": "login.spec.ts", "status": "fail" } |
| Expression | Inline JS using {{ $json.field }} to reach prior data. | {{ $json.url }} |
Fastest path on a dev laptop. Needs Node 20+ and a free tcp port.
n8n needs a recent Node. Run node --version. If you're below 20, install via nvm.
Spawn n8n into your terminal directly. First boot creates ~/.n8n with sqlite + encryption key.
It serves at http://localhost:5678. First run prompts you to create an owner account.
# 1. check node
node --version # v20.x or v22.x
# 2. spawn n8n (no install needed)
npx n8n
# or install globally — then run as `n8n` anywhere
npm install -g n8n
n8n start
# 3. open editor
open http://localhost:5678
~/.n8n/database.sqlite. Back it up before nuking your home folder.# run on a custom port
N8N_PORT=5680 n8n start
# expose webhooks to the internet for OAuth callbacks
n8n start --tunnel
Best for teams + servers. One docker-compose.yml, persistent volume, auto-restart.
version: "3.8"
services:
n8n:
image: docker.n8n.io/n8nio/n8n:latest
restart: always
ports:
- "5678:5678"
environment:
- N8N_HOST=localhost
- N8N_PORT=5678
- N8N_PROTOCOL=http
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=change-me
- GENERIC_TIMEZONE=Asia/Kolkata
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data: {}
docker compose up -d
docker compose logs -f n8n
docker compose down. Always mount /home/node/.n8n.If you don't want to babysit a server, n8n Cloud gives you a hosted instance with HTTPS, auto-updates, and managed credentials. Free tier available; paid tiers scale executions + concurrent workflows.
| Method | Setup time | Cost | Best for |
|---|---|---|---|
Local npx n8n | 1 min | Free | Solo devs, demos, learning |
| Docker (self-host) | 5 min | Free | Teams, persistent workflows |
| n8n Cloud | 0 min | Paid (free trial) | Don't-want-to-ops, reliable webhooks |
| Kubernetes / Helm | 30 min | Infra cost | Enterprise, multi-tenant |
Goal: every morning at 9 AM, hit a public flaky-test report API, summarise the failures with a model, post to Slack. End-to-end in eight clicks.
Click + Add first step → search Schedule. Set cron = 0 9 * * * (9 AM every day).
Method GET, URL https://app.thetestingacademy.com/api/flaky-tests. Set Response → JSON.
Filter to only failures: return items.filter(i => i.json.status === 'fail');
Prompt: "Summarise these flaky tests as 3 bullet points for a stand-up: {{ $json.tests }}".
Channel #qa-standup, Text {{ $json.summary }}. Authenticate once, reuse forever.
Toggle the workflow to Active. Done — n8n now wakes up daily, fetches, summarises, posts.
// runs once per workflow execution; receives all incoming items
const failures = items.filter((i) => i.json.status === 'fail');
return failures.map((f) => ({
json: {
name: f.json.name,
file: f.json.spec,
duration: f.json.duration_ms
}
}));
n8n ships first-class LLM nodes — OpenAI, Anthropic, Ollama (local), HuggingFace, plus a generic LangChain agent and a Model Context Protocol (MCP) client.
Pick a model, paste a system prompt, pipe items in. Output lands as $json.message.content.
Wire a memory + tools + an LLM. Ask the agent to investigate; it loops calls until it answers.
Hit your local http://localhost:11434 Ollama with Llama 3, Mistral, or Phi. No data leaves the laptop.
Add a Model Context Protocol server (e.g. our Playwright MCP) — the LLM can drive a real browser inside the workflow.
Combine Vector Store (Postgres + pgvector / Pinecone) with a Q&A chain — answers grounded in your test docs.
Expose any HTTP endpoint as a tool. Model decides when to invoke; n8n logs every call for replay.
Six workflows that pay for themselves the same week.
When a workflow misbehaves, four things rescue you.
Right-click a node → Pin data. Subsequent runs use the pinned JSON instead of re-calling the upstream API. Cuts iteration time from 30s to 30ms.
Hit Execute node. Runs that one node with the data it would have received from upstream pinned data. No need to run the whole workflow.
Settings → Executions. See every run, its status, and the exact JSON that flowed between nodes. Replay any failed run with one click.
Set a workflow as the global error workflow in settings. When any other workflow throws, this one fires — perfect for “page on-call when ETL breaks”.
A 30-minute path from "installed n8n" to "n8n is part of my stack".
The best automation tool is the one you actually wire up by Friday. n8n's not magic — it's a node graph with great defaults. Open it, drag a Cron, drag an HTTP Request, ship.
— The Testing Academy/student/live-test/ai-for-qa-part-5-n8n/session.