n8n v2.0 AI Workflow Canvas
n8n v2.0 GA release with native AI workflow canvas, LLM nodes, vector retrieval, and RAG templates.
Workflow Steps
- 1
Create trigger node
- 2
Add LLM node (OpenAI/Anthropic/Ollama)
- 3
Configure prompt and tools
- 4
Add vector retrieval node
- 5
Connect output to destination
Download
Documentation
n8n v2.0 AI Workflow Platform
Overview
n8n v2.0 is the first stable general availability (GA) release of the leading open-source workflow automation platform, officially launched on July 24, 2026. With over 58,000 GitHub stars and a massive ecosystem of 1000+ integrations, n8n v2.0 represents a milestone in making AI workflow automation accessible to teams of all sizes.
The v2.0 release introduces the AI Workflow Canvas, a native visual interface for building AI workflows with LLM nodes (OpenAI, Anthropic, local Ollama), vector retrieval nodes, and pre-built RAG pipeline templates. This transforms n8n from a traditional automation tool into a comprehensive AI workflow platform.
Features
- AI Workflow Canvas: Native LLM nodes with OpenAI, Anthropic, and local Ollama support
- Vector Retrieval Nodes: Built-in vector database nodes for semantic search
- RAG Pipeline Templates: Pre-built retrieval-augmented generation workflows
- Dataθ‘ηΌεΎ (Data Lineage): Visualize data flow and field mappings across nodes
- Cost Estimator: Per-node token/API cost display for AI workflows
- 1000+ Integrations: Connect with virtually any external service
- Visual Workflow Builder: Drag-and-drop interface with error handling
- Enterprise Features: Version control, team collaboration, access management
Installation
# Install via npm (recommended)
npm install -g n8n
# Start n8n
n8n start
# Or via Docker
docker run -d --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n n8n/n8n
# For local model support (Ollama)
docker run -d --name ollama -p 11434:11434 ollama/ollama
Quick Start
Create Your First AI Workflow
- Launch n8n:
n8n startand open http://localhost:5678 - Create New Workflow: Click "Create New Workflow"
- Add Trigger Node: Select "Schedule Trigger" or "Webhook Trigger"
- Add LLM Node: Search for "OpenAI" or "Anthropic" and add to canvas
- Configure LLM Node:
Model: gpt-4 Prompt: Summarize this article: {{ $json.article_text }} Temperature: 0.7 - Add Output Node: Send results to Slack, email, or API
Example: AI News Summarizer Workflow
# Workflow: AI News Summarizer
trigger: "Webhook"
steps:
- node: "HTTP Request"
action: "GET"
url: "https://newsapi.org/v2/top-headlines"
- node: "OpenAI"
action: "Summarize"
prompt: "Summarize the following news articles in 3 bullet points"
input: "{{ $json.articles }}"
- node: "Slack"
action: "Send Message"
message: "{{ $json.summary }}"
Core Concepts
AI Workflow Canvas
The AI Workflow Canvas is a specialized visual editor for AI workflows with:
- Drag-and-drop LLM nodes: OpenAI, Anthropic, Ollama, and custom model nodes
- Vector database nodes: Connect to Pinecone, Qdrant, Chroma, or local vector stores
- RAG templates: Pre-built workflows for document retrieval and generation
- Agent nodes: Deploy full AI agents as workflow steps
Data Lineage Visualization
The new "Data Lineage Graph" shows:
Input β Transform β LLM β Filter β Output
β β β β β
Field: Field: Token: Count Payload:
text text 512 42 JSON
Cost Estimator
The enterprise cost estimator shows per-node costs:
| Node | Input Tokens | Output Tokens | Cost (USD) |
|---|---|---|---|
| OpenAI GPT-4 | 1,000 | 500 | $0.03 |
| Anthropic Claude | 800 | 400 | $0.02 |
| Vector Search | N/A | N/A | $0.001 |
| Total | 1,800 | 900 | $0.051 |
Advanced Features
RAG Pipeline Template
# Pre-built RAG pipeline
workflow: "Document Q&A RAG"
nodes:
- name: "Document Loader"
type: "File Upload"
- name: "Text Splitter"
type: "Document Splitter"
chunk_size: 1000
chunk_overlap: 200
- name: "Embedding Generator"
type: "OpenAI Embeddings"
model: "text-embedding-3-small"
- name: "Vector Store"
type: "Pinecone"
index: "documents"
- name: "Retriever"
type: "Vector Search"
top_k: 5
- name: "LLM Generator"
type: "OpenAI"
prompt: |
Based on the following context, answer the question:
Context: {{ $json.retrieved_documents }}
Question: {{ $json.question }}
- name: "Response Formatter"
type: "Template"
output: "{{ $json.answer }}"
Agent Node Configuration
node: "Agent"
config:
type: "ReAct"
model: "gpt-4"
tools:
- "search_web"
- "read_file"
- "write_file"
max_iterations: 10
prompt: "Research the topic and write a report"
Error Handling in AI Workflows
workflow: "AI Content Generator"
error_handling:
retry_policy:
max_retries: 3
backoff: "exponential"
retry_on:
- "rate_limit_exceeded"
- "temporarily_unavailable"
fallback:
on_failure: "Use cached response"
cache_ttl: "24h"
Dynamic Workflow Execution
# Dynamic node execution based on AI output
def execute_workflow(context):
ai_output = call_llm_node(context.get("input"))
if ai_output.get("classification") == "urgent":
return execute_urgent_workflow(ai_output)
elif ai_output.get("classification") == "normal":
return execute_normal_workflow(ai_output)
else:
return execute_batch_workflow(ai_output)
Local AI Integration (Ollama)
# Local model workflow
nodes:
- node: "Ollama"
model: "llama3.1:8b"
prompt: "Analyze this data: {{ $json.data }}"
- node: "Ollama Embeddings"
model: "nomic-embed-text"
text: "{{ $json.document }}"
Examples
Example 1: AI-Powered Data Pipeline
# Python workflow with n8n API
import requests
workflow_id = "123"
payload = {
"data": {
"input": {
"data": {"articles": [...]}
}
}
}
response = requests.post(
f"http://localhost:5678/workflows/{workflow_id}/execute",
json=payload
)
Example 2: Multi-Step AI Content Pipeline
- Research: LLM node gathers information from web search
- Outline: LLM node creates structured outline
- Write: LLM node generates content section by section
- Review: LLM node reviews and improves content
- Publish: API node publishes to WordPress/GitHub
Example 3: AI Customer Support Workflow
- Trigger: Webhook receives customer query
- RAG: Retrieve relevant knowledge base articles
- Classification: LLM classifies query type
- Routing: Route to appropriate agent or knowledge base
- Response: Generate personalized response
Pros
- β 1000+ Integrations: Largest integration library in workflow automation
- β AI-Native Canvas: Purpose-built for AI workflow development
- β Visual Debugging: Data lineage graph for easy troubleshooting
- β Cost Estimator: Enterprise token cost visibility
- β Self-Hostable: Full data control with Docker deployment
- β Active Community: 58,000+ GitHub stars, large ecosystem
Cons
- β Complex Learning Curve: Many features can overwhelm beginners
- β Resource Intensive: Requires significant memory for large workflows
- β Fair-Code License: Commercial use requires paid license
- β AI Feature Maturity: AI nodes added in v2.0, less mature than core automation
When to Use
- Enterprise AI Workflows: Complex AI pipelines with multiple integrations
- RAG Applications: Document retrieval and generation workflows
- Multi-Step Automation: Workflows combining AI and traditional automation
- Cost-Conscious AI: Token cost visibility and optimization
- Self-Hosted AI: Local model support with Ollama
- Team Collaboration: Multi-user workflow development and deployment
