# Automate payment gateway & database transaction reconciliation: n8n workflow

> Started by a clock, and works across Email and Google Sheets. 19 steps: a working afternoon to understand properly.

Source: https://millionrounds.com/workflow/automate-payment-gateway-and-database-transaction-reconcilia (Millionrounds; every figure on the page links to its filing or article)

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

# Automate payment gateway & database transaction reconciliation

Started by a clock, and works across Email and Google Sheets. 19 steps: a working afternoon to understand properly.

Medium

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fautomate-payment-gateway-and-database-transaction-reconcilia)

**19 steps** Medium: a working afternoon

**0** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 1 Logic 4 Service 14

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

- 1 **Schedule Trigger** Schedule trigger *Starts it*
- 2 **Transactions from Local Database** Google Sheets *Service*
- 3 **Transaction from Payment Gateway** Google Sheets *Service*
- 4 **Compare both transactions** Compare Datasets *Service*
- 5 **Finding duplicate transactions** Code *Logic*
- 6 **Invalid transaction** Google Sheets *Service*
- 7 **Valid Transactions** Google Sheets *Service*
- 8 **Finding Amount Difference** Filter *Logic*
- 9 **Add missing transaction to Sheet** Google Sheets *Service*
- 10 **Adding duplicate transactions** Google Sheets *Service*
- 11 **Count invalid transactions** Summarize *Service*
- 12 **Count valid transactions** Summarize *Service*
- 13 **Adding Amount difference transactions** Google Sheets *Service*
- 14 **Count Number of Missing Transactions** Summarize *Service*
- 15 **Merge with all transactions count** Merge *Logic*
- 16 **Count Number of Amount Difference Transactions.** Summarize *Service*
- 17 **Code in JavaScript** Code *Logic*
- 18 **Adding the final count of transactions** Google Sheets *Service*
- 19 **Send report to reconciliation team** Email Send *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 19
- **Size:** Medium: a working afternoon
- **Connects to:** Email, Google Sheets
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Email and Google Sheets 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. 19 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 19 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%2Fautomate-payment-gateway-and-database-transaction-reconcilia)
- **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.

[Email](https://millionrounds.com/workflows?service=Email#library)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)

## Workflows like it

Also money admin, with the same services where possible, closest in size first.

- [**AAAS: AI Accounts Assistant for Invoices, GST & Reminders** 19 steps · Google Drive, Google Sheets](https://millionrounds.com/workflow/aaas-ai-accounts-assistant-for-invoices-gst-and-reminders)
- [**Automated event management with Typeform and Stripe** 19 steps · Gmail, Google Calendar](https://millionrounds.com/workflow/automated-event-management-with-typeform-and-stripe)
- [**Monitor bank transactions with Google Sheets and Slack** 19 steps · Email, Google Sheets](https://millionrounds.com/workflow/monitor-bank-transactions-with-google-sheets-and-slack)
- [**Analyze invoices from Google Drive with Gemini and OpenAI** 19 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/analyze-invoices-from-google-drive-with-gemini-and-openai)
- [**Process scanned invoices with Google Drive and OCR** 19 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/process-scanned-invoices-with-google-drive-and-ocr)
- [**Score Upwork jobs and generate proposals with Apify and OpenAI** 19 steps · calls a model · Google Sheets, Telegram](https://millionrounds.com/workflow/score-upwork-jobs-and-generate-proposals-with-apify-and-open)
