Sync ERP Order-to-Cash to Postgres & Slack (n8n, SQL Server)
Sync ERP Order-to-Cash to Postgres & Slack (n8n, SQL Server)
Regular price
£72.99
Regular price
£72.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
Sync ERP Order-to-Cash to Postgres & Slack (n8n, SQL Server)
Regular price
£72.99
Regular price
£72.99
Sale price
Unit price
/
per
Sync ERP Order-to-Cash from Microsoft SQL Server into Postgres—then alert Finance in Slack
This n8n workflow pulls daily open sales orders from your Microsoft SQL Server ERP, normalizes and upserts them into a PostgreSQL data mart, flags credit-risk/high-value orders, and keeps your team informed with Slack + Gmail run digests—while logging every run (and failures) back to Postgres.
What this workflow does
- Runs daily at 06:30 (Berlin) and loads settings such as lookback window, alert thresholds, Slack channel ID, and Gmail digest recipient.
- Queries Microsoft SQL Server for recent open sales orders, aggregating order totals and credit-risk indicators from the ERP.
- Normalizes and deduplicates ERP rows into a canonical order model using order ID to avoid duplicate records.
- Calculates order metrics, including credit utilization and credit-risk status.
- Processes orders in batches of 100 and performs idempotent upserts into PostgreSQL using INSERT…ON CONFLICT.
- Sends Slack alerts for any order flagged as credit risk or exceeding the configured high-value threshold, and logs those events to a PostgreSQL audit table.
- Generates a daily KPI digest (orders synced, revenue, averages, credit-risk count, and top customers) and builds an HTML summary.
- Emails the digest via Gmail, posts the digest to Slack, and writes a run summary to PostgreSQL.
- Handles errors by formatting an error payload, logging the failure to PostgreSQL, and sending a Slack alert.
Use cases
- Order-to-Cash visibility: keep a Postgres data mart continuously aligned with your ERP’s open orders.
- Finance risk monitoring: trigger Slack notifications for credit-risk or high-value orders before issues escalate.
- Operational reporting: daily KPI digests delivered to stakeholders via Slack and Gmail.
Technical details
- Integrations: Microsoft SQL Server (ERP read replica), PostgreSQL (data mart + audit + run summaries), Slack, Gmail.
- Key workflow nodes/tools: if, set, code, merge, slack, gmail.
