Skip to content

Automation Workflows — n8n + Temporal

Both are workflow engines, but they solve different problems. Decision: we use both, scoped to what each is best at.


When to use which

Property Temporal n8n
Primary use Durable business workflows (state machines, sagas) Integration + operational automation
Interface Code (Java / Go / Python / TypeScript SDKs) Visual no-code editor
Execution model Deterministic replay, workflows resume from last-saved state across restarts Event-driven, webhooks, schedules
Strengths Long-running (hours-to-months), idempotent, multi-step, compensating transactions Quick integrations, APIs, notifications, scheduled jobs, 400+ built-in connectors
Weaknesses Not for quick "glue" tasks; devs must write code Not durable the same way; in-flight workflows may be lost on restart
POC fit Demo: banking business processes Demo: operational automation (alerts, scheduled tasks)

Rule of thumb: if the workflow is business logic that runs for a long time and must never lose state, it's Temporal. If it's ops plumbing that reacts to events or runs on a schedule, it's n8n.


Temporal — BRAC POC use cases

1. Loan approval workflow (demo-able)

A realistic banking process with multi-step async:

Customer submits loan request → (step 1) Credit check (call external API, may take seconds-minutes) → (step 2) Document verification (OCR of uploaded docs, async) → (step 3) Risk scoring (ML model call) → (step 4) Approval routing (if amount > threshold → manager approval; may wait days) → (step 5) Funds disbursement (call to core banking; must be idempotent) → (compensating) If any step fails, refund flow + notify customer

Why Temporal: each step has retries; if the Temporal worker crashes, the workflow resumes where it left off; the manager-approval step can legitimately wait days without any scheduler/cron; compensating rollback is first-class.

2. Payment settlement (demo-able)

Incoming payment event → validate → post to ledger → reconcile → settle → notify

Classic saga. Temporal's sagas + activity retries + signals fit this exactly.

3. Platform workflow: tenant onboarding

When a new tenant signs up via WSO2 APIM, Temporal orchestrates: - Provision Keycloak realm-role - Create WSO2 APIM developer account - Generate API keys - Email credentials - Register in Temporal tenant registry

POC scope

Deploy Temporal on VMs (per VM-tier plan). Build one simulated loan-approval workflow — enough to demonstrate the pattern. Workers run on spoke-dc OpenShift (sample-app namespace) so we can show distributed workers.


n8n — BRAC POC use cases

1. Alert routing + notifications

  • Prometheus AlertManager webhook → n8n webhook node → parse alert → post to Slack / email / GitLab issue / PagerDuty
  • Visible in n8n UI as a connected flow

2. Scheduled DR smoke drills

  • Cron trigger every hour → run a script on ops-runner (SSH node) → verify DR endpoints alive → if any fail, send alert

3. Certificate-expiry watcher

  • Cron weekly → enumerate certs in Vault PKI → if any expire in <14 days → notify DevOps via Slack + create GitLab issue

4. Operational runbook: VM cutover for drills

  • Webhook trigger "run failover-drill-3" → n8n orchestrates: call ops-runner script, wait, verify, report results to a Temporal workflow (handoff to long-running drill) or straight to a Slack thread

5. Business-event glue (demo)

  • When a loan is approved in Temporal, n8n forwards a notification event to Splunk for PCI logging, posts to a mock "customer service" queue, and logs to ClickHouse

POC scope

Deploy n8n on VMs. Build 2-3 flows visible in the n8n UI for demo day: - Prometheus alert → Slack + email - DR smoke drill scheduled - Cert-expiry warn


Integration between the two

flowchart LR
    Event["External event<br/>(webhook, API call,<br/>schedule)"] --> N8N["n8n flow"]
    N8N -->|"start workflow"| Temporal["Temporal workflow"]
    Temporal -->|activities| Target["Target system<br/>(WSO2 APIM,<br/>core banking mock,<br/>Keycloak, etc.)"]
    Temporal -->|"signal back"| N8N
    N8N -->|notify| Slack["Slack / Email /<br/>GitLab issue"]

Pattern: n8n handles the edges (trigger, notify, external system quirks), Temporal handles the durable core (the actual business process that must succeed-or-cleanly-compensate).


Where workflows run

  • Temporal server + UI: VM tier (temporal-vm1-dc/dr + PG)
  • Temporal workers: on OpenShift spoke-dc in the sample-app namespace (demonstrates the worker pattern in an OCP context; each POC microservice language gets a small worker)
  • n8n server + UI: VM tier (n8n-vm1-dc/dr + PG)

Not used for

  • Cron-only scheduled jobs on OCP: use Kubernetes CronJob natively; don't over-engineer via n8n
  • CI/CD pipelines: use GitLab CI or Jenkins — not Temporal workers (wrong tool)
  • User-facing features: keep n8n/Temporal backend-only; users never see them directly

Version pins

  • Temporal 1.27.x (server) + SDKs matching language versions (Java 8.x, Python 1.13.x, etc.)
  • n8n 1.76.x (Community)

Created: 2026-04-24 · Owner: DevOps + Integration Leads