Phase 17 — n8n — Visual Workflow Automation
n8n is a self-hosted workflow automation platform — like Zapier or Make, but running entirely on your cluster. You build workflows visually: connect nodes, define triggers, process data, call APIs. No data leaves your infrastructure.
What n8n Can Automate
Examples on this cluster:
→ GitLab push → run Ansible playbook → notify Slack
→ New Grafana alert → create GitLab issue → assign to team
→ Cron: every night → backup check → email report
→ API webhook → transform data → insert into PostgreSQL
→ ArgoCD sync failure → page on-call → create incident
→ New model in MLflow registry → trigger redeployment
→ MAAS machine deployed → run Ansible configure-nodes.yml
Architecture
External trigger (webhook, cron, API)
│
▼
n8n Workflow Engine (k3s pod)
│
┌────┴────────────────────────────────┐
│ Node 1: HTTP Request │
│ Node 2: Transform / Filter │
│ Node 3: Condition (if/else) │
│ Node 4: GitLab API │
│ Node 5: Send notification │
└─────────────────────────────────────┘
Deploy n8n in k3s
apiVersion: apps/v1
kind: Deployment
metadata:
name: n8n
namespace: automation
spec:
replicas: 1
selector:
matchLabels:
app: n8n
template:
metadata:
labels:
app: n8n
spec:
containers:
- name: n8n
image: n8nio/n8n:latest
ports:
- containerPort: 5678
env:
- name: N8N_HOST
value: "n8n.yourdomain.com"
- name: N8N_PORT
value: "5678"
- name: N8N_PROTOCOL
value: "https"
- name: DB_TYPE
value: postgresdb
- name: DB_POSTGRESDB_HOST
value: postgres-svc
- name: DB_POSTGRESDB_DATABASE
value: n8n
- name: DB_POSTGRESDB_USER
valueFrom:
secretKeyRef:
name: n8n-secrets
key: db-user
- name: DB_POSTGRESDB_PASSWORD
valueFrom:
secretKeyRef:
name: n8n-secrets
key: db-password
- name: N8N_ENCRYPTION_KEY
valueFrom:
secretKeyRef:
name: n8n-secrets
key: encryption-key
volumeMounts:
- name: n8n-data
mountPath: /home/node/.n8n
volumes:
- name: n8n-data
persistentVolumeClaim:
claimName: n8n-pvc
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: n8n-pvc
namespace: automation
spec:
accessModes: [ReadWriteOnce]
storageClassName: longhorn
resources:
requests:
storage: 5Gi
---
apiVersion: v1
kind: Service
metadata:
name: n8n
namespace: automation
spec:
type: LoadBalancer
selector:
app: n8n
ports:
- port: 5678
targetPort: 5678
kubectl create namespace automation
kubectl apply -f n8n.yaml
Access: http://10.0.0.203:5678 or https://n8n.yourdomain.com
Built-in Integrations (400+)
| Category | Examples |
|---|---|
| Git | GitLab, GitHub, Gitea |
| Notifications | Slack, Discord, Email, Telegram |
| Databases | PostgreSQL, MySQL, MongoDB, Redis |
| Cloud | AWS, GCP, Azure |
| Monitoring | Grafana, Prometheus webhooks |
| Dev tools | Jira, Linear, Notion |
| HTTP | REST API, GraphQL, webhooks |
| Data | CSV, JSON, XML transform |
Example Workflow — GitLab Push → Deploy Notification
Trigger: GitLab webhook (push to main)
↓
HTTP Request node: call ArgoCD API → sync app
↓
Wait node: poll ArgoCD until sync complete
↓
Condition: sync succeeded?
├── Yes → Slack message: "✅ Deployed my-app v1.2"
└── No → GitLab issue: "❌ Deploy failed — check ArgoCD"
Example Workflow — Nightly Cluster Health Report
Trigger: Cron (every day at 08:00)
↓
HTTP Request: Prometheus API → get node CPU/RAM
↓
HTTP Request: kubectl proxy → get pod count per namespace
↓
HTTP Request: Velero API → check last backup status
↓
Merge + format data
↓
Send Email: "Daily cluster report — 2026-04-12"
n8n as Glue for the Entire Platform
MAAS event → n8n → Ansible playbook
GitLab CI fail → n8n → Slack alert + auto-revert
MLflow model promoted → n8n → trigger ArgoCD sync
Chaos Mesh experiment done → n8n → save report to Notion
Grafana alert → n8n → create ticket in GitLab
Done When
✔ n8n pod Running with PostgreSQL backend
✔ UI accessible via browser
✔ First workflow created and triggered
✔ GitLab webhook connected
✔ At least one notification working (Slack or email)