N8N: Visual Workflows with AI Nodes

You build an AI workflow in N8N that automatically processes data and executes actions.

Why this lesson matters

Custom GPTs are handy, but they only work inside ChatGPT. What if you want an agent that responds automatically to an incoming email, a form or a webhook? Then you need a workflow tool. N8N is the most powerful open-source option: free, self-hosted, and with built-in AI nodes.

In this lesson you get to know N8N and build a workflow in which AI automatically classifies emails and forwards them to the right department.

What is N8N?

N8N (pronounced "n-eight-n") is an open-source workflow automation tool. Think Zapier, but:

  • Free if you host it yourself
  • Visual: you build workflows by dragging and connecting nodes
  • Strong: more flexibility than Zapier or Make
  • AI-native: built-in nodes for OpenAI, Anthropic, and a dedicated AI Agent node
Going deeper

N8N also has a cloud version if you don't want to self-host. That starts at $20/month. The self-hosted version is completely free and runs on any machine with Docker.

Basic concepts

text
┌──────────┐    ┌──────────┐    ┌──────────┐
│ Trigger  │───→│  Node 1  │───→│  Node 2  │
│ (start)  │    │(process) │    │ (action) │
└──────────┘    └──────────┘    └──────────┘
ConceptExplanationExample
NodeA building block that does 1 taskFetch an email, analyse text
ConnectionThe arrow between nodesData flows from left to right
TriggerThe start node -- what kicks off the workflow?New email, webhook, schedule
CredentialsLogin details for external servicesGmail password, OpenAI API key
ExecutionOne run of the workflowEvery incoming email = 1 execution

AI nodes in N8N

N8N has dedicated nodes for AI:

OpenAI node: Send a prompt to an OpenAI model and get an answer back. Handy for classification, summaries, translation.

Anthropic node: The same, but with Claude. Often better for longer texts and analyses.

Keep reading

Leave your name and email address and you can read the rest

You get the whole lesson right away, and every other lesson stays open after that. No password, no confirmation email.

Your address stays with us. No selling to third parties, and you unsubscribe in one click.