# Detect multi-source transaction fraud and reconcile finances: n8n workflow

> Started by another system calling it, and works across Gmail, Postgres and Slack. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/detect-multi-source-transaction-fraud-and-reconcile-finances (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Chat assistants](https://millionrounds.com/workflows?category=Chat+assistants#library)

# Detect multi-source transaction fraud and reconcile finances

Started by another system calling it, and works across Gmail, Postgres and Slack. It hands the judgement calls to OpenAI. 22 steps, 1 branch: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fdetect-multi-source-transaction-fraud-and-reconcile-finances)

**22 steps** Large: read it before trusting it with anything live

**1** Branch: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 2 Model 3 Logic 9 Service 8

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

- 1 **Schedule Trigger - Periodic Ingestion** Schedule trigger *Starts it*
- 2 **Webhook - Real-time Transaction Events** Webhook *Starts it*
- 3 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 4 **Structured Output Parser - Fraud Analysis** Output Parser Structured *Model*
- 5 **Workflow Configuration** Set *Logic*
- 6 **Merge All Transaction Sources** Merge *Logic*
- 7 **AI Agent - Fraud Detection** Agent *Model*
- 8 **Fetch Bank API Transactions** Http Request *Service*
- 9 **Fetch Payment Gateway Transactions** Http Request *Service*
- 10 **Normalize Transaction Data** Set *Logic*
- 11 **Route by Risk Level** Switch *Logic*
- 12 **Filter Valid Transactions** Filter *Logic*
- 13 **Flag for Manual Review** Set *Logic*
- 14 **Reconcile with ERP System** Http Request *Service*
- 15 **Check Idempotency** Code *Logic*
- 16 **Notify Finance Team - High Risk** Slack *Service*
- 17 **Send Customer Alert Email** Gmail *Service*
- 18 **Store Transaction Record** Postgres *Service*
- 19 **Store Audit Trail** Postgres *Service*
- 20 **Aggregate for Financial Report** Aggregate *Logic*
- 21 **Generate Financial Report** Code *Logic*
- 22 **Send Financial Report to Slack** Slack *Service*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 22, with 1 branch
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Postgres, Slack
- **Model:** OpenAI

## Questions

What does it need to run?

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

What starts it?

It starts on another system calling it.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 22 steps it is large: read it before trusting it with anything live.

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 22 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%2Fdetect-multi-source-transaction-fraud-and-reconcile-finances)
- **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.

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

## Workflows like it

Also chat assistants, with the same services where possible, closest in size first.

- [**Audit browser and proxy fingerprint/IP integrity with OpenAI** 22 steps · calls a model · Google Sheets, Slack](https://millionrounds.com/workflow/audit-browser-and-proxy-fingerprint-ip-integrity-with-openai)
- [**Audit landing page conversions with DeepSeek and Google Sheets** 22 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/audit-landing-page-conversions-with-deepseek-and-google-shee)
- [**Detect and remediate leaked secret on repo with GitHub and AWS** 22 steps · calls a model · Jira, Slack](https://millionrounds.com/workflow/detect-and-remediate-leaked-secret-on-repo-with-github-and-a)
- [**Empower your AI chatbot with OpenAI and Gmail** 22 steps · calls a model · Gmail, Google Docs](https://millionrounds.com/workflow/empower-your-ai-chatbot-with-openai-and-gmail)
- [**Generate AI camera moves with Seedance** 22 steps · calls a model · ClickUp, Google Drive](https://millionrounds.com/workflow/generate-ai-camera-moves-with-seedance)
- [**Generate contextual recommendations from Slack with Pinecone** 22 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/generate-contextual-recommendations-from-slack-with-pinecone)
