Skip to main content

Automate payment gateway & database transaction reconciliation with Google Sheets

Workflow preview

Workflow preview
100%
Automate payment gateway & database transaction reconciliation with Google Sheets preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

How it works This workflow fully automates the reconciliation process between your Local Database transactions and Payment Gateway transactions. It compares both data sources, identifies mismatches...

Best for

  • Document Extraction automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.code, n8n-nodes-base.comparedatasets, n8n-nodes-base.filter, n8n-nodes-base.googlesheets, n8n-nodes-base.summarize, n8n-nodes-base.merge, n8n-nodes-base.emailsend, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Mohamed Abubakkar.

Original n8n.io source

1.1 Workflow description

Title
Automate payment gateway & database transaction reconciliation with Google Sheets
Workflow name
Automate payment gateway & database transaction reconciliation with Google Sheets

How it works

This workflow fully automates the reconciliation process between your Local Database transactions and Payment Gateway transactions. It compares both data sources, identifies mismatches, categorizes discrepancies, logs them into Google Sheets, generates a final summary, and sends an automated reconciliation report to your finance team. This ensures accurate, consistent, and error-free financial reporting without manual work.

Key Features

  • Automatic data extraction from two Google Sheets
  • Transaction comparison with result categorization
  • Duplicate detection
  • Real-time discrepancy logging
  • Summary generation and storage
  • Automated email reporting
  • Zero manual effort required

Setup Steps

1. Connect Required Credentials

You must connect the following credentials: Google Sheets (Service Account or OAuth) Email SMTP (Gmail or custom)

2. Replace Default Values

Update the workflow with: Your Google Sheet IDs Your tab/sheet names SMTP email, sender, and recipient Optional: Custom domain or business branding

3. Customize Email Template

Modify subject, message body, or formatting style based on your reporting standards.

4. Adjust Trigger

You may choose: Manual Trigger Cron Trigger for daily/weekly reconciliation Webhook Trigger integrated with your system

Detailed Process Flow

1. Fetch Local & Payment Gateway Transactions

The workflow reads all transaction records from the Local Database Sheet and Payment Gateway Sheet.

2. Compare both Transactions

Using the compare operation, the workflow splits result into a. Valid Transactions b. Invalid Transactions c. Amount Differences Transactions d. Missing Transactions

3. Duplicate Transaction Detection

The workflow scans local transactions to detect duplicate transaction and logs them seperately

5. Logging Transactions

Each category is appended to its respective Google Sheet:

  • DuplicateData
  • AmountDifference
  • DataNotInsert
  • Reconciliation Summary
  • RealData
6. Count all categories

The workflow counts:

  • Number of valid transactions
  • Number of invalid transactions
  • Number of missing transactions
  • Number of Amount mismatch transactions

The final summary row is appended to a dedicated Reconciliation Summary Sheet.

7. Send Final Email Report

The finance team receive a email of final summary report.

Final Output

At the end the workflow, you get:

  • Fully categorized reconciliation logs
  • Complete Summary Stored Sheets
  • Email Report
  • Clean audit ready data

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Code in JavaScript

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 2 - Compare both transactions

Type / Role
n8n-nodes-base.compareDatasets - compareDatasets
Config choices
Version 2.3

Block 3 - Finding Amount Difference

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.2

Block 4 - Add missing transaction to Sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 5 - Adding Amount difference transactions

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 6 - Transaction from Payment Gateway

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 7 - Adding duplicate transactions

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 8 - Finding duplicate transactions

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Transactions from Local Database

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 10 - Invalid transaction

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 11 - Valid Transactions

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 12 - Count valid transactions

Type / Role
n8n-nodes-base.summarize - summarize
Config choices
Version 1.1

Block 13 - Count invalid transactions

Type / Role
n8n-nodes-base.summarize - summarize
Config choices
Version 1.1

Block 14 - Count Number of Missing Transactions

Type / Role
n8n-nodes-base.summarize - summarize
Config choices
Version 1.1

Block 15 - Merge with all transactions count

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 16 - Count Number of Amount Difference Transactions.

Type / Role
n8n-nodes-base.summarize - summarize
Config choices
Version 1.1

Block 17 - Adding the final count of transactions

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 18 - Send report to reconciliation team

Type / Role
n8n-nodes-base.emailSend - emailSend
Config choices
Version 2.1

Block 19 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 21 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 26 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Automate payment gateway & database transaction reconciliation with Google Sheets
Complexity advanced
Nodes 26
Categories Document Extraction
Author Mohamed Abubakkar
Published 11 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11684/11684.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automate payment gateway & database transaction reconciliation with Google Sheets do?

How it works This workflow fully automates the reconciliation process between your Local Database transactions and Payment Gateway transactions. It compares both data sources, identifies mismatches...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction use case.