n8n Workflow Templates
What this article covers
- Ready-made workflows to get you started quickly.
- Templates for email automation, document processing, and monitoring.
- AI workflows with Ollama as finished templates.
- How to import, customize, and extend templates.
- Creating and sharing your own templates.
Introduction: n8n workflow templates explained
Instead of building every workflow from scratch, you use ready-made templates. n8n has a large template library, and you can export and share your own workflows as JSON. Templates save time and demonstrate best practices.
This article is aimed at users who want to set up productive workflows quickly. For fundamentals, see n8n installation and n8n guide.
Why use workflow templates?
Imagine you want to automatically classify emails. Instead of figuring out which nodes you need, you import a finished template and adapt it. Your workflow runs in 10 minutes instead of 2 hours.
n8n workflow templates in brief
Workflow templates are finished n8n workflows stored as JSON. You import them, configure credentials and parameters, and the workflow runs. n8n has over 1,000 official templates, plus community templates.
The core idea is simple: donβt reinvent, just adapt.
Who should read this article?
- n8n beginners who want to get started quickly.
- Automation enthusiasts looking for best practices.
- Teams that want to standardize workflows.
- Self-hosters building their own template library.
Importing templates
From the n8n template library
- Click βTemplatesβ in n8n.
- Search for a template (e.g., βOllamaβ or βEmailβ).
- Click βUse Workflowβ.
- Configure credentials.
- Activate the workflow.
Importing JSON
# Export workflow
# In n8n: Workflow β Download
# Import workflow
# In n8n: Workflows β Import from File β select JSON
Via API
curl -X POST http://localhost:5678/api/v1/workflows \
-H "X-N8N-API-KEY: your-api-key" \
-H "Content-Type: application/json" \
-d @workflow.json
Template 1: Email classification with Ollama
{
"name": "Classify emails with Ollama",
"nodes": [
{
"type": "n8n-nodes-base.imap",
"name": "Email Trigger",
"parameters": {
"mailbox": "INBOX"
}
},
{
"type": "n8n-nodes-base.httpRequest",
"name": "Ollama Classification",
"parameters": {
"method": "POST",
"url": "http://ollama:11434/api/chat",
"body": {
"model": "llama3.1",
"messages": [
{
"role": "system",
"content": "Classify the email into: support, sales, billing, spam, other. Reply with only the category."
},
{
"role": "user",
"content": "Subject: {{$json.subject}}\nContent: {{$json.body}}"
}
],
"stream": false
}
}
},
{
"type": "n8n-nodes-base.switch",
"name": "Category Routing",
"parameters": {
"rules": [
{ "value": "support", "output": "support" },
{ "value": "sales", "output": "sales" },
{ "value": "spam", "output": "spam" }
]
}
}
]
}
See email automation for details.
Template 2: Daily report with AI
Workflow: Daily AI report
1. Schedule Trigger: Daily at 7:00 AM
2. HTTP Request: Fetch metrics from Prometheus
3. HTTP Request: Fetch logs from the last 24 hours
4. Ollama: Generate report
Prompt: "Create a daily status report
based on the metrics and logs."
5. Email: Send report to admin
Template 3: RSS β Summary β Mastodon
Workflow: RSS to social media
1. RSS Trigger: New blog article
2. Ollama: Summarize in 280 characters
3. HTTP Request: Post to Mastodon
Body: "{{summary}} #blog #ai"
Template 4: Upload document β Index
Workflow: Index document in RAG
1. Webhook: File upload
2. Function: Extract text (PDF)
3. Function: Chunking (500 characters)
4. Ollama: Embeddings (nomic-embed-text)
5. HTTP Request: Store in Qdrant
6. Response: "Document indexed"
See RAG workflows.
Template 5: Webhook β AI response β Slack
Workflow: Slack bot with Ollama
1. Webhook: Slack slash command
2. Ollama: Generate response
3. HTTP Request: Post response to Slack
Template 6: Backup reminder
Workflow: Weekly backup reminder
1. Schedule Trigger: Friday at 4:00 PM
2. SSH Node: Check backup status
3. Ollama: Create status report
4. Email: Send report
On error: Alert admin
Creating your own templates
Best practices
// 1. Extract parameters
// Instead of hardcoded values: use credentials and environment variables
const apiUrl = $env.OLLAMA_URL || "http://ollama:11434";
// 2. Add error handling
try {
const result = await callApi();
return { success: true, data: result };
} catch (e) {
return { success: false, error: e.message };
}
// 3. Add descriptions
// Each node should have a meaningful name
// 4. Use sticky notes for documentation
// Use sticky notes to explain the workflow
Exporting templates
# In n8n: Workflow β Menu β Download
# Creates: workflow.json
# Share:
# - Store in a Git repository
# - Upload to n8n Community
# - Send via email to colleagues
Building a template library
templates/
βββ email/
β βββ classification.json
β βββ auto-reply.json
β βββ newsletter.json
βββ documents/
β βββ pdf-summarize.json
β βββ rag-indexing.json
β βββ ocr-pipeline.json
βββ monitoring/
β βββ daily-report.json
β βββ alert-analysis.json
βββ social-media/
βββ rss-to-mastodon.json
βββ article-to-linkedin.json
Security considerations
- Never include credentials in templates: API keys and passwords belong in credentials, not in the workflow JSON.
- Review templates: Community templates can contain poor or unsafe practices. Review before importing.
- Internal URLs: Replace internal URLs with environment variables.
- Minimal permissions: Templates should use only necessary permissions. See tool permissions.
Common pitfalls
- Forgotten credentials: Templates without credentials wonβt work. Set them up.
- Incorrect URLs:
localhostin Docker refers to the container itself. Usehttp://ollama:11434instead. - Outdated templates: n8n changes over time. Old templates may contain deprecated nodes.
- No testing: Donβt import blindly. Test with sample data.
- Overly complex templates: Large templates are hard to customize. Break them down.
Further reading
- n8n guide - n8n in detail.
- n8n installation - Set up n8n.
- n8n-Ollama integration - Ollama in n8n.
- AI agents in n8n - Build agents.
- RAG workflows - RAG in n8n.
- Workflow automation - Fundamentals.
Key takeaways:
- Templates are ready-made workflows as JSON, import them, customize them, done.
- n8n has over 1,000 official templates, plus community options.
- Important templates: email classification, reports, RSS, RAG indexing.
- Creating your own templates: extract parameters, document, and share.
- Keep credentials separate, never include them in templates.
FAQ
Where do I find n8n templates?
How do I import a template?
How do I create my own template?
Are credentials included in templates?
Are there templates for Ollama?
How do I customize templates?
Can I version templates?
Are community templates secure?
Sources and further reading
- n8n Templates - Official template library.
- n8n Community - Community workflows.
- n8n API - Workflow management via API.


