The AI automation landscape has shifted dramatically. While cloud AI APIs like OpenAI and Anthropic remain popular, a growing number of teams are moving to self-hosted solutions. The reasons are compelling:
The stack is simple: n8n handles the workflow automation (triggers, routing, integrations with 400+ apps), and Ollama runs the AI models locally.
# Linux/macOS
curl -fsSL https://ollama.ai/install.sh | sh
# Pull a model (Llama 3 8B is a great starting point)
ollama pull llama3:8b
# Verify it's running
curl http://localhost:11434/api/tags
# Using Docker (recommended)
docker run -d --name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
--add-host=host.docker.internal:host-gateway \
n8nio/n8n
# Or using npm
npm install n8n -g
n8n start
Open http://localhost:5678 in your browser. That's it — you're ready to build AI workflows.
n8n communicates with Ollama via HTTP. Every AI step in your workflow is simply an HTTP Request node pointing to http://localhost:11434/api/generate (or http://host.docker.internal:11434/api/generate if n8n runs in Docker).
Let's build a practical workflow that generates a blog post from a topic. This workflow uses a 4-stage pipeline that mimics a real editorial process:
Each stage builds on the previous one, producing much better results than a single "write me a blog post" prompt.
// In your n8n HTTP Request node:
URL: http://localhost:11434/api/generate
Method: POST
Body (JSON):
{
"model": "llama3:8b",
"prompt": "Your prompt here with {{ $json.variable }} interpolation",
"stream": false,
"options": {
"temperature": 0.7,
"num_predict": 2000
}
}
Generate blog posts, social media content, and newsletters from a single topic input. A content repurposer workflow can turn one blog post into Twitter threads, LinkedIn posts, Reddit submissions, and Instagram captions.
Classify incoming emails by intent (support request, sales inquiry, spam), extract key information, and draft appropriate responses. The AI handles triage while you handle only the complex cases.
When a new lead comes in via your CRM or form, AI analyzes the company, role, and message to assign a priority score. Hot leads get instant notifications; cold leads enter a nurture sequence.
Drop a long document, meeting transcript, or research paper into the workflow and get a structured summary with key takeaways, action items, and automatically generated Q&A pairs.
Incoming support tickets get automatically categorized by department, priority, and sentiment. Urgent negative-sentiment tickets get escalated immediately.
Track competitor websites, blogs, and social media. AI summarizes changes and sends you a weekly intelligence briefing highlighting pricing changes, new features, and strategic moves.
Feed in meeting transcripts (from Otter.ai, Fireflies, or any transcription tool) and get structured summaries with decisions made, action items with owners, and follow-up tasks.
Extract structured JSON data from unstructured text — invoices, resumes, product descriptions, legal documents. Define your schema, and the AI extracts matching data consistently.
Paste a YouTube URL, and the workflow fetches the transcript, summarizes key points, and formats everything as a ready-to-send email newsletter.
Enter a topic and brand voice, and get optimized content for Twitter, LinkedIn, Reddit, and Instagram. Includes an AI review pass for quality assurance.
Building these workflows from scratch takes hours of prompt engineering and testing. If you want to skip straight to production-ready workflows, we've built a pack of 11 templates that cover all the use cases above.
11 production-ready n8n workflows for Ollama. Content generation, email automation, lead scoring, document processing, and more. Import into n8n in 5 minutes.
$39 one-time — no subscriptions, no API costs
Get the Workflow Pack →Or try a free sample first:
Published by WorkflowForge · Self-Hosted AI Workflow Pack