Skip to main content

Automation — n8n, Zapier & Pabbly Connect

Feature (notes #13): let the business wire automations by connecting platform events to automation engines. The platform exposes selected domain events as signed outbound webhooks; the engine does the rest (Slack, Sheets, CRMs, WhatsApp, thousands of apps).

Three engines, two roles:

EngineHostingRoleWhy
n8nself-hosted (recommended)internal orchestrationFits the self-host posture (Hyperswitch/Listmonk); no per-task billing; code nodes; can call internal APIs inside the cluster; data stays in-house
ZapierSaaScustomer/partner no-codeLargest app catalog (5000+); easiest for non-devs
Pabbly ConnectSaaSlow-cost no-codeFlat-price; popular in India; WhatsApp flows

Recommendation: make n8n the primary engine for internal/ops automations (it can run in the tenant namespace and reach services directly), and keep Zapier/Pabbly for users who want SaaS no-code without touching n8n.

Model​

  • The Automation dispatcher is a NestJS service subscribed to a whitelist of events (Eventing).
  • Admins register subscriptions (event → engine + target URL) in admin (Admin module).
  • Each webhook is HMAC-signed with the tenant secret (N8N_WEBHOOK_SECRET / ZAPIER_WEBHOOK_SECRET / PABBLY_WEBHOOK_SECRET).
  • n8n can additionally be granted a scoped API key to call back into the platform (create tickets/leads, update orders) — a privilege not given to external SaaS engines by default.

Why n8n for this platform​

  • Self-hosted in the tenant's Kubernetes namespace → telemetry/PII never leaves the cluster; aligns with Security.
  • No per-task cost → high-volume ops automations (every order/ticket) are economical.
  • Reaches internal services directly (cluster DNS) instead of only public webhooks — lower latency, fewer round-trips.
  • Code + branching + queues → complex workflows (reconciliation, dealer digests, IoT anomaly → ticket) that exceed simple zaps.
  • 400+ nodes incl. HTTP, Postgres/Mongo, Slack, WhatsApp, email, Sheets.

Subscription model​

AutomationSubscription {
_id: uuid
tenantId: string
provider: 'n8n'|'zapier'|'pabbly'
event: string // e.g. 'order.placed'
targetUrl: string // n8n / Zapier catch hook / Pabbly webhook URL
active: boolean
secretRef: string // which signing secret
filters?: Record<string, any> // e.g. only orders > ₹50,000
allowCallback?: boolean // n8n only: may call platform API with scoped key
createdBy: string; createdAt: Date
}

Webhook contract (outbound)​

POST <targetUrl>
Content-Type: application/json
X-Signature: hmac-sha256=<hex> # over raw body, using tenant secret
X-Event: order.placed
X-Event-Id: <uuid> # for idempotency on the receiver
X-Tenant: utlsolar
X-Timestamp: <unix>

{ "event": "order.placed", "id": "...", "occurredAt": "...", "data": { /* snapshot */ } }
  • Delivery: at-least-once, retries with backoff, DLQ on persistent failure.
  • Filters: optional per-subscription predicate so only matching events fire (avoids noisy zaps).
  • Security: receivers verify X-Signature; we verify TLS + allow-list target domains (Security, SSRF).

Example use-cases​

EventEngineWorkflow
order.placed (>₹50k)n8n / Zapier→ Slack #sales + append Google Sheet
lead.createdn8n→ enrich → route to nearest dealer → WhatsApp dealer → CRM task
amc.due_soonPabbly / n8n→ WhatsApp reminder cadence (30/15/7 days)
ticket.createdn8n→ auto-assign nearest technician → SMS both parties
ticket.sla_breachn8n→ escalate to service head (Slack/call)
payment.capturedn8n→ generate GST invoice → WhatsApp the PDF
warranty.registeredZapier→ add to mailing list / Sheet + upsell after N days
reconciliation (daily)n8n→ match COD/gateway settlements → flag mismatches → finance Slack
IoT telemetry anomalyn8n→ create proactive service ticket

See the n8n recipe catalog below for the full menu by domain.

n8n recipe catalog​

Grouped by domain — each is an n8n workflow triggered by a platform event (or schedule):

  • Sales/marketing: lead→dealer routing, cart-abandon WhatsApp, blog→social cross-post + IndexNow, cracked-panel campaign to external-asset owners.
  • Orders/fulfillment: order→Shiprocket shipment + tracking SMS, NDR auto-contact, RTO restock, delivery→schedule installation.
  • Service/FSM: complaint auto-assign, SLA escalation, en-route ETA SMS, job-closed CSAT (low rating escalates), AMC reminder cadence + win-back.
  • Warranty: registration welcome + extended-warranty upsell, expiry→AMC offer, claim-approved→job + replacement part, defect-spike→quality alert.
  • Dealer/DMS: target-hit incentive, credit-limit block, onboarding checklist, weekly scoped manager digest.
  • Finance: invoice generation, failed-payment retry, daily reconciliation, subsidy status notify, payout approval.
  • Ops: daily KPI digest, inventory reorder PO draft, DLQ→incident, ERP (Tally/Zoho) sync.

Inbound (optional, v2)​

Engines can also call into the platform via tenant API keys (Admin module) — e.g. create a lead or ticket from an external form. n8n (self-hosted, in-cluster) is the preferred inbound caller; external SaaS engines get callbacks only when allowCallback is set. Scoped by the key's capabilities.

Tenant config​

N8N_WEBHOOK_SECRET, ZAPIER_WEBHOOK_SECRET, PABBLY_WEBHOOK_SECRET (secret); n8n instance URL (in-cluster); whitelist of automatable events; per-subscription engine + target URLs + filters (managed in admin).

Phase​

  • n8n internal automations can start as early as v1 (it's in-cluster and consumes existing events) for ops/service flows.
  • Zapier/Pabbly outbound lands in v2 (after the event catalog stabilizes); see roadmap.

Open questions​

  • Run a shared n8n per tenant namespace (recommended) vs a central multi-tenant n8n?
  • Publish an official Zapier app (vs raw catch-hooks) for the first tenant?
  • Which events to expose by default vs opt-in.