Local AI Workflow Automation (n8n + Ollama)

The short answer

Local AI Workflow Automation (n8n + Ollama) is a local AI stack for Automate tasks with AI-powered workflows, fully local and private. n8n + Ollama = self-hosted Zapier with AI. Automate email processing, content generation, data enrichment, and more - all with local models on your own hardware. It combines 6 components, is rated intermediate, and takes about 15 minutes to set up. Expect about $199 for the cheapest listed device that fits (NVIDIA RTX 3060 12GB) and $0/month versus cloud.

Cost
$199
NVIDIA RTX 3060 12GB · $0/mo vs cloud
Difficulty
intermediate
Setup time
~15 min
Use case
Automate tasks with AI-powered workflows, fully local and private

What's in this stack

ModelQwen3 14B8 GB at Q4not ranked by AA
ModelMistral-7B-Instruct-v0.24 GB at Q4not ranked by AA
HardwareNVIDIA RTX 3060 12GBNVIDIA RTX 3060 12GB12 GB · 360 GB/sFits~40 tok/s est.$199
HardwareBeelink SER9Beelink SER916 GB · 120 GB/sFits~15 tok/s est.$749
Tooln8nn8n210,425 ★
ToolOllamaOllama186,902 ★

Models are alternatives; fit is judged on the smallest (Q4_K_M weights + ~1.8 GB runtime overhead vs device memory). Speeds are for Llama 3 8B; "est." values are estimated from memory bandwidth.

Local AI Workflow Automation (n8n + Ollama)Link to this section

A self-hosted automation platform with AI built in. n8n is a visual workflow builder with 500+ integrations and native AI agent nodes. Connect it to Ollama for local LLM inference, and you get a private alternative to Zapier + ChatGPT - no monthly fees, no data leaks.

What you getLink to this section

  • Visual workflow builder - drag-and-drop for complex automations
  • AI agent nodes - built-in agent loop, code interpreter, tool calling
  • 500+ integrations - Slack, email, databases, webhooks, CRMs, and more
  • Local LLM inference - Ollama serves models on your GPU, zero API costs
  • Cron + webhook triggers - run on schedule or in response to events
  • Self-hosted - no data leaves your network, air-gap compatible
  • $0/mo - compared to $20-100+/mo for Zapier + OpenAI

ArchitectureLink to this section

ComponentRole
n8nVisual workflow engine with AI agent nodes
OllamaServes local LLM for AI steps in your workflows
Qwen3 14BDefault model - strong reasoning, fits 12GB
PostgreSQL / SQLiteWorkflow state, execution history, credentials

Recommended GPU: RTX 3060 12GB for 14B models. For CPU-only workflows, a Beelink S9 mini PC is enough.

PrerequisitesLink to this section

  • A GPU with ≥12 GB VRAM for local LLM inference (optional - n8n works CPU-only without local AI)
  • Docker + Docker Compose
  • ~2 GB free disk for n8n + model storage

SetupLink to this section

Docker Compose (Ollama + n8n)Link to this section

Save this as docker-compose.yml:

services:
  ollama:
    image: ollama/ollama:latest
    container_name: ollama
    volumes:
      - ollama:/root/.ollama
    ports:
      - "11434:11434"
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    restart: unless-stopped
 
  n8n:
    image: docker.n8n.io/n8nio/n8n
    container_name: n8n
    depends_on:
      - ollama
    environment:
      - N8N_RUNNERS_ENABLED=true
      - GENERIC_TIMEZONE=America/New_York
      - TZ=America/New_York
      - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
    volumes:
      - n8n_data:/home/node/.n8n
    ports:
      - "5678:5678"
    restart: unless-stopped
 
volumes:
  ollama:
  n8n_data:

Start itLink to this section

docker compose up -d

Pull a model for AI-powered workflows:

docker exec ollama ollama pull qwen3:14b

Open http://localhost:5678 to access n8n.

Connect n8n to OllamaLink to this section

In n8n, the Ollama node connects automatically when both containers are on the same Docker network. In the node config:

  1. Add an Ollama Chat Model node
  2. Set Base URL: http://ollama:11434
  3. Select model: qwen3:14b
  4. Use it with n8n's AI Agent node for agentic workflows

Use itLink to this section

Email SummarizerLink to this section

  1. Trigger: Gmail / IMAP - new email received
  2. AI step: Ollama Chat Model - "Summarize this email in 2 sentences"
  3. Output: Slack - send summary to channel

Content GeneratorLink to this section

  1. Trigger: Cron - every Monday at 9 AM
  2. AI step: Ollama Chat Model - "Write a weekly newsletter about [topic]"
  3. Output: Email - send to subscribers

Data EnricherLink to this section

  1. Trigger: Webhook - receives CSV rows
  2. AI step: Ollama Chat Model - "Extract company name, industry, and location from this text"
  3. Output: PostgreSQL / Google Sheets - save enriched data

Smart ClassifierLink to this section

  1. Trigger: Webhook - incoming support tickets
  2. AI step: Ollama Chat Model - "Classify as billing/technical/feature-request and assign priority"
  3. Output: n8n Split - route to different teams

Cost vs cloudLink to this section

Local n8n + OllamaZapier + ChatGPT
Monthly$0$20-100+
Hardware~$300 once (GPU)$0
Data safetyStays on your LANSent to cloud
AI callsUnlimited, freeToken-limited
WorkflowsUnlimitedTask-limited
Break-even~3-6 months-

After 3-6 months the hardware has paid for itself versus a Zapier subscription - and you get unlimited AI calls, unlimited workflows, and total privacy.

TroubleshootingLink to this section

  • n8n can't reach Ollama → Both services share the same Docker network in the compose file above. Use http://ollama:11434 as the base URL.
  • Slow AI responses → Check GPU usage. Smaller models like Mistral 7B are faster for simple tasks.
  • No GPU in Ollama → Install the NVIDIA Container Toolkit and verify with nvidia-smi in a test container.
  • n8n won't start → Check docker compose logs n8n. Port 5678 might be in use; change the left-side port mapping.

Swap componentsLink to this section

  • CPU-only setup → Drop the GPU section from the compose file, use Mistral 7B GGUF on CPU (slower but works).
  • Use Qdrant for memory → Add Qdrant as a vector store for RAG-enabled workflows.
  • Prefer another LLM → Swap the Ollama node for n8n's built-in OpenAI or Anthropic nodes if you want hybrid.
  • SQLite vs PostgreSQL → n8n defaults to SQLite. For production, add a PostgreSQL container and set DB_TYPE=postgresdb.

Frequently asked

What is the Local AI Workflow Automation (n8n + Ollama) stack for?

n8n + Ollama = self-hosted Zapier with AI. Automate email processing, content generation, data enrichment, and more - all with local models on your own hardware. It is purpose-built for Automate tasks with AI-powered workflows, fully local and private and runs entirely on your own hardware.

How much does the Local AI Workflow Automation (n8n + Ollama) stack cost?

Local AI Workflow Automation (n8n + Ollama) costs about $199 for the cheapest listed device that fits (NVIDIA RTX 3060 12GB) up front and $0/month to run, since everything is self-hosted — no per-token or subscription fees versus a cloud equivalent.

How long does it take to set up Local AI Workflow Automation (n8n + Ollama)?

Plan for roughly 15 minutes. The stack is rated intermediate.

What do I need to run Local AI Workflow Automation (n8n + Ollama)?

Local AI Workflow Automation (n8n + Ollama) is built from 2 tool(s), 2 model(s), 2 hardware item(s). Each is listed below with a link.