The n8n Developer Guide & Examples
A comprehensive n8n guide covering the n8n platform, open source vs. cloud, key developer concepts, and five high-impact workflow examples for professional services firms. Includes n8n community resources and best practices.
The n8n Developer Guide & Examples
n8n is an open-source workflow automation platform with native AI agent support. It runs as a visual canvas where nodes represent actions and connections represent data flow. Every workflow has a trigger (what starts it) and a chain of nodes that execute in response.
Unlike Zapier or Make, n8n can be fully self-hosted - your data never touches n8n's servers. Unlike LangChain, it requires no Python expertise. It occupies the space between no-code simplicity and engineering-grade control.
Canvas: The main workspace. Nodes are placed on the canvas and connected by dragging from one node's output to another's input. Data flows left to right.
Nodes: Each node is one action - an HTTP request, a data transform, a send email, an AI call. Nodes are configured in a sidebar panel that appears when clicked. Most configurations require filling in fields, not writing code.
Executions: Every time a workflow runs, n8n records an execution log. The log shows the data that entered each node and the data that exited it. This is how you debug: click any node in a past execution to see exactly what it received and what it returned.
Credentials: API
Expressions: n8n expressions access data from previous nodes using {{ $json.fieldName }} syntax. If the previous node returned { "email": "client@firm.com" }, the expression {{ $json.email }} returns client@firm.com. This is the primary way to wire data between nodes without code.
The Code Node: For transformations that cannot be expressed as expressions, a JavaScript or Python code block can be inserted as a node. Write the transform as a function that receives the current node's input data and returns the output data.
n8n Open Source vs. Cloud
n8n offers two deployment modes:
Self-hosted (Open Source)
- Run on any server (DigitalOcean, AWS, GCP, local)
- Free at the server cost level (~$18/month for a DigitalOcean Droplet)
- Unlimited executions, unlimited workflows, unlimited users
- You own the data - no data passes through n8n's servers
- You are responsible for updates, backups, and uptime
n8n Cloud
- Managed hosting - n8n handles infrastructure, updates, and uptime
- Starts at €20/month for 2,500 executions
- No server management required
- Data is processed on n8n's EU servers (GDPR-compliant)
- Scales by execution volume
Recommendation: For professional services firms handling client data, self-hosted is the appropriate choice unless there is no technical resource available for server maintenance. The $18/month server cost vs. €20+/month cloud cost is not the deciding factor - data residency is.
For server setup instructions, see How to Set Up a Virtual Machine & AI Server.
Key n8n Developer Concepts
Workflow Triggers Every workflow starts with a trigger node:
- Webhook: Workflow runs when an HTTP POST is received at the webhookWebhookClick to read the full definition in our AI & Automation Glossary.URL. Use for form submissions, CRMwebhookClick to read the full definition in our AI & Automation Glossary.events, and external system events.CRMClick to read the full definition in our AI & Automation Glossary.
- Schedule: Workflow runs at a fixed time (every 5 minutes, every weekday at 7 AM). Use for monitoring, digest delivery, and batch processing.
- Email Trigger: Workflow runs when a new email arrives in a connected inbox. Use for email-based data extraction and routing.
Data Structure
n8n represents data as arrays of JSON items. Each node can receive multiple items and output multiple items. The {{ $json }} expression references each item's JSON. {{ $items() }} references the full array. Understanding this is critical for workflows that process lists of records.
Error Handling Every node has an error output. Connect the error output to an error handler node - typically a Slack notification or a database write - to capture failures. Workflows without error handling fail silently in production.
The AI Agent Node The AI Agent node in the Advanced AI section is n8n's autonomous agent implementation. Connect it to:
- A Chat Model node (OpenAI, Anthropic, Ollama) as the reasoning engine
- Tool nodes as the available actions
- A Memory node for conversation persistence
The agent handles the Reason → Act → Observe loop automatically.
5 High-Impact n8n Workflow Examples
Example 1: CRM Email Logger
Trigger: Gmail / Outlook trigger (poll every 5 minutes)
Nodes: Contact lookup (HubSpot HTTP Request) → IF (contact found?) → AI Node (extract summary, action items, sentiment) → HubSpot activity create → Slack exception post (if contact not found)
Impact: Eliminates manual CRM
Example 2: Inbound Lead Qualifier
Trigger: Webhook
Example 3: Daily Operations Digest
Trigger: Schedule (weekdays 6:30 AM)
Nodes: HubSpot query (deals with no activity 14+ days) → HubSpot query (overdue tasks) → AI Node (generate digest) → Gmail send (to each partner)
Impact: Partners start every day knowing exactly which accounts need attention without pulling a CRM
Example 4: Document Q&A (RAG Pipeline)
Trigger: Webhook
Example 5: Resume Screening Agent
Trigger: Email trigger (inbox monitoring for resume attachments) Nodes: Extract PDF text → AI Node (score against role criteria) → IF (score >= threshold) → HubSpot candidate create → Email send (next step instructions) → Slack notification (to recruiter) Impact: Screens 60 resumes/hour at a consistent quality standard. Full implementation: Play 6.
n8n Community & Resources
n8n Community Forum: community.n8n.io - the primary support channel. Most integration questions have been answered here. Search before posting; the forum has deep archives.
n8n Templates: The n8n template library (accessible from the n8n canvas) contains 1,500+ pre-built workflows. Start with a template for your use case and modify from there rather than building from scratch.
n8n Changelog: n8n releases approximately bi-weekly. Review the changelog when updating - new AI nodes and integrations are frequently introduced. Self-hosted instances require manual update via docker pull n8nio/n8n && docker restart n8n.
This Resource Site: All 12 Plays in this playbook use n8n as the workflow orchestration layer. The Guides section contains specific connection guides for Gmail, HubSpot, Salesforce, Slack, and 30+ other platforms.
Frequently Asked Questions
What is n8n and how does it work? n8n is an open-source workflow automation platform with native AI agent support. Every workflow has a trigger (what starts it) and a chain of nodes that execute in sequence. Unlike Zapier or Make, n8n can be fully self-hosted - your data never touches n8n's servers. Unlike LangChain, it requires no Python expertise.
Is n8n free to use? n8n is open-source and free to self-host. You pay only for the server it runs on - approximately $18/month for a DigitalOcean Droplet. n8n Cloud starts at €20/month for 2,500 executions. For most professional services firms, self-hosted is the appropriate choice for data residency.
What is the difference between n8n and Zapier? Three key differences: (1) Data residency - n8n self-hosted keeps all data on your server; Zapier routes data through Zapier's infrastructure. (2) Pricing - n8n self-hosted is effectively free at scale; Zapier charges per task and becomes expensive above 1,000 tasks/month. (3) Capability - n8n has native AI Agent nodes, code execution, and complex branching that Zapier cannot replicate.
How do I connect n8n to my CRM
What are the best n8n workflow examples for professional services?
The five highest-impact workflows: CRM

Reviewed by Revenue Institute
This guide is actively maintained and reviewed by the implementation experts at Revenue Institute. As the creators of The AI Workforce Playbook, we test and deploy these exact frameworks for professional services firms scaling without new headcount.
Get the Book
Related Reading
Getting Started
'n8n Cloud vs. Self-Hosted: Which Is Right for You?'
n8n Fundamentals
n8n Interface Tour (Video or Annotated Screenshots)
Security & Compliance
n8n Security Hardening Guide
Implementation Guide
How to Set Up a Virtual Machine & AI Server
Platform Comparisons
Zapier vs. n8n: Which Automation Platform is Best for Professional Services?
Need help turning this guide into reality?
Revenue Institute builds and implements the AI workforce for professional services firms.
Work with Revenue Institute