Templates / Sync ERP order-to-cash data between Microsoft SQL Server, Postgres, Slack and Gmail

Sync ERP order-to-cash data between Microsoft SQL Server, Postgres, Slack and Gmail

Ready for 3.0

by Shiva ✓ · 1 views · created 2026-10-14 · CRM

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 19 nodes and runs on a schedule (every day at 06:00) (plus 1 other trigger). Along the way it connects Microsoft SQL, Postgres, Slack and Gmail.

How it runs

Trigger: On a schedule (every day at 06:00) (plus 1 other trigger).

  1. Configure Run (Edit Fields (Set)): sets 6 fields: runId, lookbackDays, highValueThreshold…
  2. Format Error Payload (Code): runs custom JavaScript code
  3. ERP: Fetch Open Sales Orders (Microsoft SQL): run a query
  4. Log Failure to Postgres (Postgres): run a query
  5. Normalize ERP Rows (Code): runs custom JavaScript code
  6. Slack: uses Slack
  7. Batch Over Orders (Loop Over Items (Split in Batches)): loops over the items in batches
  8. Query Mart Totals (Postgres): run a query
  9. Upsert Order into Mart (Postgres): run a query
  10. Build Digest HTML (Code): runs custom JavaScript code

…plus 7 more steps. See the full node list below.

Services it uses

Microsoft SQLPostgresSlackGmail

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (11)

From the author

Quick overview This workflow runs daily to pull open sales orders from a Microsoft SQL Server ERP, normalizes and batch-upserts them into a PostgreSQL data mart, alerts Finance in Slack for credit-risk or high-value orders, and sends a daily digest via Gmail…

Excerpt from Shiva's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.