# Reconcile Postgres records with HTTP API and Slack: n8n workflow

> Started by a clock, and works across Postgres and Slack. 20 steps, 2 branches: a working afternoon to understand properly.

Source: https://millionrounds.com/workflow/reconcile-postgres-records-with-http-api-and-slack (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Alerts and monitoring](https://millionrounds.com/workflows?category=Alerts+and+monitoring#library)

# Reconcile Postgres records with HTTP API and Slack

Started by a clock, and works across Postgres and Slack. 20 steps, 2 branches: a working afternoon to understand properly.

Medium

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Freconcile-postgres-records-with-http-api-and-slack)

**20 steps** Medium: a working afternoon

**2** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 1 Logic 13 Service 6

The steps in the order they run, from what starts it.

- 1 **Nightly Reconciliation** Schedule trigger *Starts it*
- 2 **Drift Rules** Set *Logic*
- 3 **Read The Database Side** Postgres *Service*
- 4 **Read The API Side** Http Request *Service*
- 5 **Line Them Up** Compare Datasets *Service*
- 6 **Split Out The API Records** Split Out *Logic*
- 7 **Label Rows Missing From The API** Set *Logic*
- 8 **Records That Already Agree** Set *Logic*
- 9 **Explain Which Fields Differ** Code *Logic*
- 10 **Label Rows Missing From The Database** Set *Logic*
- 11 **Gather Every Difference** Merge *Logic*
- 12 **Only The Records That Drifted** Filter *Logic*
- 13 **Summarise The Drift** Code *Logic*
- 14 **How Bad Is This Drift?** If *Logic*
- 15 **Anything Drifted?** If *Logic*
- 16 **Flag The Record For Review** Postgres *Service*
- 17 **Hold For The Daily Digest** No Op *Logic*
- 18 **Post The Drift Report** Slack *Service*
- 19 **Everything Matched** No Op *Logic*
- 20 **Escalate The Critical Drift** Slack *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 20, with 2 branches
- **Size:** Medium: a working afternoon
- **Connects to:** Postgres, Slack
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Postgres and Slack accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Plan an afternoon. 20 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 20 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Freconcile-postgres-records-with-http-api-and-slack)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Postgres](https://millionrounds.com/workflows?service=Postgres#library)[Slack](https://millionrounds.com/workflows?service=Slack#library)

## Workflows like it

Also alerts and monitoring, with the same services where possible, closest in size first.

- [**Create dynamic crypto market monitors with Gemini** 20 steps · Postgres, Telegram](https://millionrounds.com/workflow/create-dynamic-crypto-market-monitors-with-gemini)
- [**Expose safe production tools to MCP clients with Slack** 20 steps · Slack](https://millionrounds.com/workflow/expose-safe-production-tools-to-mcp-clients-with-slack)
- [**Generate multi-pass Seedance AI roto mattes with Nuke** 20 steps · Gmail, Google Sheets](https://millionrounds.com/workflow/generate-multi-pass-seedance-ai-roto-mattes-with-nuke)
- [**Automate peer review assignments with Slack** 20 steps · calls a model · Email, Postgres](https://millionrounds.com/workflow/automate-peer-review-assignments-with-slack)
- [**Deduplicate security alerts into unified cases with Claude** 20 steps · calls a model · Slack](https://millionrounds.com/workflow/deduplicate-security-alerts-into-unified-cases-with-claude)
- [**Monitor NASA asteroid threats with OpenAI and Apify** 20 steps · calls a model · Apify, Discord](https://millionrounds.com/workflow/monitor-nasa-asteroid-threats-with-openai-and-apify)
