Overview
The n8n-MCP server includes a comprehensive template system with 1000+ pre-built workflows from n8n.io. Templates provide working examples, configuration patterns, and starting points for common automation tasks.
Template Discovery
Templates are stored in SQLite with FTS5 full-text search for fast discovery.
By Keyword
Search template names and descriptions:
{
"searchMode" : "keyword" ,
"query" : "slack notification" ,
"limit" : 20 ,
"fields" : [ "id" , "name" , "description" , "nodes" ]
}
Response:
{
"items" : [
{
"id" : 1234 ,
"name" : "Slack Notification System" ,
"description" : "Send notifications to Slack when events occur" ,
"nodes" : [ "n8n-nodes-base.webhook" , "n8n-nodes-base.slack" ],
"views" : 15000 ,
"created" : "2024-01-15"
}
],
"total" : 45 ,
"hasMore" : true
}
Field Selection: Request only needed fields to reduce response size. Available fields: id, name, description, author, nodes, views, created, url, metadata.
By Nodes
Find templates that use specific nodes:
{
"searchMode" : "by_nodes" ,
"nodeTypes" : [
"n8n-nodes-base.httpRequest" ,
"n8n-nodes-base.slack"
],
"limit" : 10
}
Returns templates containing all specified nodes.
Find examples of node combinations
Discover integration patterns
Learn how nodes work together
Bootstrap new workflows with proven configurations
By Task
Get curated templates for common automation tasks:
{
"searchMode" : "by_task" ,
"task" : "ai_automation" ,
"limit" : 10
}
Available Tasks:
{ "task" : "ai_automation" }
Templates using AI/ML services:
ChatGPT integrations
AI agents
Sentiment analysis
Content generation
Image processing
Data synchronization workflows:
CRM to database sync
Cross-platform data updates
Real-time data replication
ETL pipelines
{ "task" : "slack_integration" }
Slack automation:
Notification systems
Bot interactions
Channel management
Message formatting
{ "task" : "email_automation" }
Email workflows:
Automated responses
Newsletter systems
Alert notifications
Email parsing
{ "task" : "webhook_processing" }
Webhook handlers:
Form submissions
API callbacks
Event receivers
Webhook routers
{ "task" : "data_transformation" }
Data manipulation:
Format conversion
Field mapping
Aggregation
Filtering
{ "task" : "file_processing" }
File operations:
Upload/download
Format conversion
Content extraction
Batch processing
{ "task" : "api_integration" }
API integrations:
REST API clients
GraphQL queries
Authentication patterns
Error handling
{ "task" : "database_operations" }
Database workflows:
CRUD operations
Queries
Migrations
Backups
Scheduled tasks:
Cron jobs
Recurring reports
Periodic checks
Time-based triggers
Filter templates by complexity, setup time, and required services:
{
"searchMode" : "by_metadata" ,
"complexity" : "simple" ,
"maxSetupMinutes" : 30 ,
"requiredService" : "openai" ,
"targetAudience" : "developers"
}
Metadata Filters:
simple - 2-5 nodes, straightforward logic
medium - 6-15 nodes, some conditional logic
complex - 16+ nodes, advanced patterns
{ "complexity" : "simple" } // Quick to understand and deploy
Estimated time to configure and deploy: {
"minSetupMinutes" : 5 ,
"maxSetupMinutes" : 30
}
Ranges: 5-480 minutes (5 min to 8 hours)
External services needed: { "requiredService" : "openai" } // or "slack", "gmail", "aws", etc.
Helps filter to templates you can actually use based on available credentials.
{ "targetAudience" : "developers" } // or "marketers", "sales", "support"
Find templates designed for your skill level and use case.
Template Structure
Minimal Response
interface TemplateMinimal {
id : number ;
name : string ;
description : string ;
views : number ;
nodeCount : number ;
metadata ?: TemplateMetadata ;
}
Full Response
interface TemplateInfo {
id : number ;
name : string ;
description : string ;
author : {
name : string ;
username : string ;
verified : boolean ;
};
nodes : string []; // Array of node types
views : number ;
created : string ; // ISO date
url : string ; // n8n.io template URL
metadata ?: TemplateMetadata ;
}
interface TemplateMetadata {
categories : string []; // ["automation", "ai"]
complexity : 'simple' | 'medium' | 'complex' ;
use_cases : string []; // ["customer support", "lead generation"]
estimated_setup_minutes : number ; // 15
required_services : string []; // ["openai", "slack"]
key_features : string []; // ["AI responses", "Real-time alerts"]
target_audience : string []; // ["developers", "support teams"]
}
Metadata availability: Not all templates have complete metadata. Filter by metadata only when you need specific characteristics.
Getting Template Details
Modes
Control how much data is returned:
// Just node list (minimal)
const minimal = await get_template ({
templateId: 1234 ,
mode: "nodes_only"
})
// { id: 1234, name: "...", nodes: [{type: "...", name: "..."}] }
// Nodes + connections (structure)
const structure = await get_template ({
templateId: 1234 ,
mode: "structure"
})
// { id: 1234, nodes: [...], connections: {...} }
// Complete workflow JSON (full)
const full = await get_template ({
templateId: 1234 ,
mode: "full"
})
// { id: 1234, name: "...", workflow: { nodes: [...], connections: {...}, settings: {...} } }
Mode selection: Use nodes_only for discovery, structure for understanding flow, full for deployment.
Template Workflow
export class TemplateService {
/**
* Get template by ID with different detail levels
*/
async getTemplate(
templateId: number,
mode: 'nodes_only' | 'structure' | 'full' = 'full'
): Promise<any> {
const template = this.repository.getTemplate(templateId);
if (!template) return null;
const workflow = JSON.parse(template.workflow_json || '{}');
switch (mode) {
case 'nodes_only':
return {
id: template.id,
name: template.name,
nodes: workflow.nodes?.map((n: any) => ({
type: n.type,
name: n.name
}))
};
case 'structure':
return {
id: template.id,
name: template.name,
nodes: workflow.nodes?.map((n: any) => ({
id: n.id,
type: n.type,
name: n.name,
position: n.position
})),
connections: workflow.connections
};
case 'full':
return {
...this.formatTemplateInfo(template),
workflow
};
}
}
}
All search methods support pagination:
{
"limit" : 20 , // Max results per page (1-100)
"offset" : 0 // Skip first N results
}
Response includes pagination info:
{
"items" : [ ... ],
"total" : 156 ,
"limit" : 20 ,
"offset" : 0 ,
"hasMore" : true
}
Template Categories
Discovered categories from template metadata:
const categories = await getAvailableCategories ()
// ["automation", "integration", "ai", "marketing", "sales", "support", ...]
// Filter by category
const templates = await searchTemplatesByMetadata ({
category: "ai" ,
limit: 20
})
Template Statistics
const stats = await getTemplateStats ()
Response:
{
"totalTemplates" : 1542 ,
"totalViews" : 4562891 ,
"averageNodes" : 6.3 ,
"mostPopularNodes" : [
{ "type" : "n8n-nodes-base.httpRequest" , "count" : 892 },
{ "type" : "n8n-nodes-base.webhook" , "count" : 743 },
{ "type" : "n8n-nodes-base.slack" , "count" : 521 }
],
"complexityDistribution" : {
"simple" : 654 ,
"medium" : 721 ,
"complex" : 167
}
}
Using Templates
As Starting Points
// 1. Find relevant template
const templates = await search_templates ({
searchMode: "by_task" ,
task: "slack_integration"
})
// 2. Get full workflow
const template = await get_template ({
templateId: templates . items [ 0 ]. id ,
mode: "full"
})
// 3. Customize
const customWorkflow = {
... template . workflow ,
nodes: template . workflow . nodes . map ( node => {
if ( node . type === 'n8n-nodes-base.slack' ) {
return {
... node ,
parameters: {
... node . parameters ,
channel: "#my-channel"
}
}
}
return node
})
}
// 4. Validate
const validation = await validate_workflow ({
workflow: customWorkflow
})
Learning from Examples
// Find templates using specific node
const examples = await search_templates ({
searchMode: "by_nodes" ,
nodeTypes: [ "n8n-nodes-base.openAi" ]
})
// Study configurations
for ( const example of examples . items ) {
const full = await get_template ({
templateId: example . id ,
mode: "full"
})
// Extract OpenAI configurations
const openaiNodes = full . workflow . nodes . filter (
n => n . type === 'n8n-nodes-base.openAi'
)
console . log ( 'OpenAI configurations:' , openaiNodes . map ( n => n . parameters ))
}
Template Updates
Templates are fetched from n8n.io and cached locally:
/**
* Fetch and update templates from n8n.io
* @param mode - 'rebuild' to clear and rebuild, 'update' to add only new templates
*/
async fetchAndUpdateTemplates(
progressCallback?: (message: string, current: number, total: number) => void,
mode: 'rebuild' | 'update' = 'rebuild'
): Promise<void>
Update mode: Only fetches templates from last 2 weeks, skips existing templates
Rebuild mode: Clears all templates and fetches everything (2-3 minutes)
Template updates are typically run during installation or maintenance. The MCP server comes pre-loaded with templates.
Best Practices
Template Discovery Tips:
Start with task-based search for common use cases
Use metadata filters to find templates matching your constraints
Search by nodes when learning specific integrations
Check complexity and setup time before committing
Review author verification for quality indication
Use nodes_only mode when browsing, full when ready to implement
Common Patterns
Find Quick Win Templates
// Simple templates with fast setup
const quickWins = await searchTemplatesByMetadata ({
complexity: "simple" ,
maxSetupMinutes: 15 ,
limit: 10
})
Find Templates You Can Use
// Filter by available credentials
const usableTemplates = await searchTemplatesByMetadata ({
requiredService: "slack" , // Service you have configured
complexity: "simple" ,
limit: 20
})
Discovery Workflow
// 1. Explore options
const options = await search_templates ({
searchMode: "by_task" ,
task: "api_integration" ,
limit: 5
})
// 2. Check structure
const structure = await get_template ({
templateId: options . items [ 0 ]. id ,
mode: "structure"
})
// 3. Get full workflow when ready
const full = await get_template ({
templateId: options . items [ 0 ]. id ,
mode: "full"
})
Next Steps
MCP Tools Explore template search tools
Workflows Learn about workflow structure
Validation Validate template modifications
Node Search Find nodes used in templates