Templates / Reconcile Postgres records with an HTTP API and notify drift via Slack

Reconcile Postgres records with an HTTP API and notify drift via Slack

Ready for 3.0

by Melbin Francis ✓ · 1 views · created 2026-09-15 · Document Extraction

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 20 nodes and runs on a schedule (every day at 03:00). Along the way it connects Postgres and Slack.

How it runs

Trigger: On a schedule (every day at 03:00).

  1. Drift Rules (Edit Fields (Set)): sets 11 fields: api_url, api_records_field, compare_fields…
  2. Read The Database Side (Postgres): run a query
  3. Read The API Side (HTTP Request): calls an HTTP API
  4. Line Them Up (Compare Datasets): uses Compare Datasets
  5. Split Out: splits a list into separate items
  6. Label Rows Missing From The API (Edit Fields (Set)): sets 9 fields: record_key, drift_kind, drifted_fields…
  7. Records That Already Agree (Edit Fields (Set)): sets 9 fields: record_key, drift_kind, drifted_fields…
  8. Explain Which Fields Differ (Code): runs custom JavaScript code
  9. Label Rows Missing From The Database (Edit Fields (Set)): sets 9 fields: record_key, drift_kind, drifted_fields…
  10. Gather Every Difference (Merge): merges the data from its input branches

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

Services it uses

PostgresSlack

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 (12)

From the author

Quick overview This workflow runs nightly to reconcile a Postgres table with records returned by an HTTP API, detect missing or mismatched rows, flag critical drift in the database, and post a drift summary (and critical alerts) to Slack. How it works 1. Runs…

Excerpt from Melbin Francis'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.