Skip to main content
πŸŽ“ Claude Code Masterclass Learn AI-assisted development on Udemy β€” plus the companion book on Leanpub & Amazon. Start Learning
n8n: Self-Hosted Workflow Automation with 400+ Integrations
Automation

n8n: Self-Hosted Workflow Automation with 400+ Integrations

Deploy n8n on Kubernetes β€” the open-source Zapier alternative with AI agents, code nodes, and enterprise-grade workflow automation.

LB
Luca Berton
Β· 1 min read

What Is n8n?

n8n is a workflow automation platform with 400+ integrations, AI agent capabilities, and a visual node editor. 60K+ GitHub stars β€” the open-source Zapier/Make alternative.

n8n vs Zapier vs Make

Featuren8nZapierMake
Self-hostedβœ…βŒβŒ
Open sourceβœ… (fair-code)❌❌
Code nodesβœ… JS/Python❌⚠️ Limited
AI agentsβœ… Native⚠️ Beta⚠️ Limited
Branching/loopsβœ…βš οΈ Pathsβœ…
Error handlingβœ… Per-node⚠️ Basicβœ…
Price (self-hosted)$0N/AN/A
Executions (cloud)2,500 free100 free1,000 free

Kubernetes Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: n8n
  namespace: automation
spec:
  replicas: 1
  template:
    spec:
      containers:
        - name: n8n
          image: n8nio/n8n:latest
          ports:
            - containerPort: 5678
          env:
            - name: DB_TYPE
              value: "postgresdb"
            - name: DB_POSTGRESDB_HOST
              value: "postgres.automation.svc"
            - name: DB_POSTGRESDB_DATABASE
              value: "n8n"
            - name: DB_POSTGRESDB_USER
              value: "n8n"
            - name: DB_POSTGRESDB_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: n8n-secrets
                  key: db-password
            - name: N8N_ENCRYPTION_KEY
              valueFrom:
                secretKeyRef:
                  name: n8n-secrets
                  key: encryption-key
            - name: WEBHOOK_URL
              value: "https://n8n.yourdomain.com"
            - name: EXECUTIONS_MODE
              value: "queue"
            - name: QUEUE_BULL_REDIS_HOST
              value: "redis.automation.svc"
          volumeMounts:
            - name: data
              mountPath: /home/node/.n8n
          resources:
            requests:
              memory: "512Mi"
              cpu: "500m"
            limits:
              memory: "2Gi"
              cpu: "2"

Queue Mode (Production Scaling)

# Worker deployment for processing executions
apiVersion: apps/v1
kind: Deployment
metadata:
  name: n8n-worker
spec:
  replicas: 3  # Scale workers independently
  template:
    spec:
      containers:
        - name: n8n-worker
          image: n8nio/n8n:latest
          command: ["n8n", "worker"]
          env:
            - name: EXECUTIONS_MODE
              value: "queue"
            - name: QUEUE_BULL_REDIS_HOST
              value: "redis.automation.svc"

AI Agent Workflows

n8n has native AI agent support with tool-calling:

{
  "nodes": [
    {
      "type": "n8n-nodes-base.webhook",
      "name": "Webhook Trigger"
    },
    {
      "type": "@n8n/n8n-nodes-langchain.agent",
      "name": "AI Agent",
      "parameters": {
        "model": "gpt-4-turbo",
        "systemMessage": "You are a helpful assistant with access to tools.",
        "tools": ["Google Search", "Calculator", "Database Query"]
      }
    },
    {
      "type": "n8n-nodes-base.slack",
      "name": "Send to Slack"
    }
  ]
}

Common Automation Patterns

1. Lead Enrichment Pipeline

Webhook (new lead) β†’ ClearBit Enrich β†’ Score Lead β†’ 
  IF score > 70: Create Salesforce Opportunity + Slack Alert
  ELSE: Add to Nurture Sequence

2. Content Publishing

RSS Feed (new post) β†’ Extract Content β†’ AI Summarize β†’
  Twitter Post + LinkedIn Post + Newsletter Draft

3. Infrastructure Alerting

Prometheus Webhook β†’ Parse Alert β†’ 
  IF critical: PagerDuty + Slack #incidents
  IF warning: Slack #monitoring
  Auto-create Jira ticket

4. Meeting Follow-up

Cal.com Webhook (meeting ended) β†’ AI Generate Summary β†’
  Email Attendees + Update CRM + Create Tasks

Self-Hosted Advantages

  • No execution limits β€” run millions of workflows
  • Data privacy β€” credentials never leave your infra
  • Custom nodes β€” build proprietary integrations
  • Network access β€” reach internal APIs, databases, services
  • Cost β€” $0 vs $50-600/mo for cloud equivalents

Free 30-min AI & Cloud consultation

Book Now