AutomationFlowsData & Sheets › Automate Payment Gateway & Database Transaction Reconciliation with Google…

Automate Payment Gateway & Database Transaction Reconciliation with Google…

Original n8n title: Automate Payment Gateway & Database Transaction Reconciliation with Google Sheets

ByMohamed Abubakkar @mohamed-abubakkar on n8n.io

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…

Cron / scheduled trigger★★★★☆ complexity26 nodesGoogle SheetsEmail Send
Data & Sheets Trigger: Cron / scheduled Nodes: 26 Complexity: ★★★★☆ Added:
Automate Payment Gateway & Database Transaction Reconciliation with Google… — n8n workflow card showing Google Sheets, Email Send integration

This workflow corresponds to n8n.io template #11684 — we link there as the canonical source.

This workflow follows the Emailsend → Google Sheets recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "MtHcQmiMhu8Entpj",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Data comparison n8n",
  "tags": [
    {
      "id": "Z7L0f1AkNk8PRVAq",
      "name": "n8n",
      "createdAt": "2025-12-11T04:51:48.351Z",
      "updatedAt": "2025-12-11T04:51:48.351Z"
    }
  ],
  "nodes": [
    {
      "id": "cbf237e1-71db-49d4-92b9-71bf1cee7a2b",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        1328,
        -144
      ],
      "parameters": {
        "jsCode": "return[{\n  json:{\n    InvalidTransactions: $input.all()[0].json.count_PaymentRef || 0,\n    ValidTransactions: $input.all()[1].json.count_PaymentRef || 0,\n    AmountDiffereceTransactions: $input.all()[2].json.count_PaymentRef || 0,\n    MissingTransactions: $input.all()[3].json.count_PaymentRef || 0\n  }\n}]"
      },
      "typeVersion": 2
    },
    {
      "id": "3aacfe58-2794-426d-878e-b1d0075a530b",
      "name": "Compare both transactions",
      "type": "n8n-nodes-base.compareDatasets",
      "position": [
        -384,
        -144
      ],
      "parameters": {
        "options": {},
        "mergeByFields": {
          "values": [
            {
              "field1": "PaymentRef",
              "field2": "PaymentRef"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "9a2c2907-38fe-400f-94dd-58426a2fe2ce",
      "name": "Finding Amount Difference",
      "type": "n8n-nodes-base.filter",
      "position": [
        176,
        -16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "d6882616-bf5b-4701-ba6f-45c41b62e108",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $('Transactions from Local Database').item.json.Amount }}",
              "rightValue": "={{ $('Transaction from Payment Gateway').item.json.Amount }}"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "9e325080-4f8e-4c9b-8382-b062e99f6536",
      "name": "Add missing transaction to Sheet ",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        176,
        160
      ],
      "parameters": {
        "columns": {
          "value": {
            "PaymentRef": "={{ $json.PaymentRef }}"
          },
          "schema": [
            {
              "id": "PaymentRef",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "PaymentRef",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "PaymentRef"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 111172314,
          "cachedResultUrl": "https://example.google.com/yourgooglesheet",
          "cachedResultName": "DataNotInsert"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://example.google.com/yourgooglesheet"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "a8742492-0594-4cb1-9b96-36969f98bc20",
      "name": "Adding Amount difference transactions",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        400,
        -16
      ],
      "parameters": {
        "columns": {
          "value": {
            "DBAmount": "={{ $json.different.Amount.inputA }}",
            "PaymentRef": "={{ $json.keys.PaymentRef }}",
            "PortalAmount": "={{ $json.different.Amount.inputB }}"
          },
          "schema": [
            {
              "id": "PaymentRef",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "PaymentRef",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "PortalAmount",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "PortalAmount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "DBAmount",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "DBAmount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "PaymentRef"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1206548289,
          "cachedResultUrl": "https://example.google.com/yourgooglesheet",
          "cachedResultName": "AmountDifference"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://example.google.com/yourgooglesheet"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "56687bda-1d69-4498-9d34-dce078bf34d6",
      "name": "Transaction from Payment Gateway",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -720,
        -16
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://example.google.com/yourgooglesheet",
          "cachedResultName": "PortalData"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://example.google.com/yourgooglesheet"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "e03faa44-0b12-4334-88ff-2afe5f89ea6d",
      "name": "Adding duplicate transactions",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -160,
        -432
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "PaymentRef",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "PaymentRef",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Amount",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Amount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1562878381,
          "cachedResultUrl": "https://example.google.com/yourgooglesheet",
          "cachedResultName": "DuplicateData"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://example.google.com/yourgooglesheet"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "52946854-4acb-46dd-b3fc-954737dd5639",
      "name": "Finding duplicate transactions",
      "type": "n8n-nodes-base.code",
      "disabled": true,
      "position": [
        -384,
        -432
      ],
      "parameters": {
        "jsCode": "const seen = {};\nconst duplicates = [];\n\nfor (const item of items) {\n  const ref = item.json.PaymentRef;\n\n  if (seen[ref]) {\n    duplicates.push(item);\n  } else {\n    seen[ref] = true;\n  }\n}\n\nreturn duplicates;"
      },
      "typeVersion": 2
    },
    {
      "id": "b08b8981-18d5-425e-89fa-ce8c622b11b4",
      "name": "Transactions from Local Database",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -720,
        -208
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1304634833,
          "cachedResultUrl": "https://example.google.com/yourgooglesheet",
          "cachedResultName": "DatabaseData"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://example.google.com/yourgooglesheet",
          "__regex": "https:\\/\\/(?:drive|docs)\\.google\\.com(?:\\/.*|)\\/d\\/([0-9a-zA-Z\\-_]+)(?:\\/.*|)"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "2a93d794-4d39-4ad8-9084-561a3b0acf1a",
      "name": "Invalid transaction",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        176,
        -400
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "PaymentRef",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "PaymentRef",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [
            "PaymentRef"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 111172314,
          "cachedResultUrl": "https://example.google.com/yourgooglesheet",
          "cachedResultName": "DataNotInsert"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://example.google.com/yourgooglesheet"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "c3925268-1069-4c01-9fda-9c4a4e473e5c",
      "name": "Valid Transactions",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        176,
        -208
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "PaymentRef",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "PaymentRef",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Amount",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Amount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [
            "PaymentRef"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 995503525,
          "cachedResultUrl": "https://example.google.com/yourgooglesheet",
          "cachedResultName": "RealData"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://example.google.com/yourgooglesheet"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "6d88a1c5-00b8-4931-990a-6c5358b6bcb7",
      "name": "Count valid transactions",
      "type": "n8n-nodes-base.summarize",
      "position": [
        608,
        -208
      ],
      "parameters": {
        "options": {},
        "fieldsToSummarize": {
          "values": [
            {
              "field": "PaymentRef"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "54e767d3-f1c1-43c0-a04f-619fb84b924f",
      "name": "Count invalid transactions",
      "type": "n8n-nodes-base.summarize",
      "position": [
        592,
        -400
      ],
      "parameters": {
        "options": {},
        "fieldsToSummarize": {
          "values": [
            {
              "field": "PaymentRef"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "c297cbe8-3203-4026-9695-c58b1da6d7dc",
      "name": "Count Number of Missing Transactions",
      "type": "n8n-nodes-base.summarize",
      "position": [
        608,
        160
      ],
      "parameters": {
        "options": {},
        "fieldsToSummarize": {
          "values": [
            {
              "field": "PaymentRef"
            },
            {
              "field": "MissingTransaction"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "5f36724e-e8a9-4ca8-874f-d80ceea19f11",
      "name": "Merge with all transactions count",
      "type": "n8n-nodes-base.merge",
      "position": [
        1104,
        -176
      ],
      "parameters": {
        "numberInputs": 4
      },
      "typeVersion": 3.2
    },
    {
      "id": "4fb174b3-e480-427d-8a3d-9bb2902b94c8",
      "name": "Count Number of Amount Difference Transactions.",
      "type": "n8n-nodes-base.summarize",
      "position": [
        608,
        -16
      ],
      "parameters": {
        "options": {},
        "fieldsToSummarize": {
          "values": [
            {
              "field": "PaymentRef"
            },
            {
              "field": "Amount Difference"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "897231cd-90e8-4cdb-96be-5182c51ca04c",
      "name": "Adding the final count of transactions",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1552,
        -144
      ],
      "parameters": {
        "columns": {
          "value": {
            "ValidTransactions": "={{ $json.ValidTransactions }}",
            "InvalidTransactions": "={{ $json.InvalidTransactions }}",
            "MissingTransactions": "={{ $json.MissingTransactions }}",
            "AmountDiffereceTransactions": "={{ $json.AmountDiffereceTransactions }}"
          },
          "schema": [
            {
              "id": "InvalidTransactions",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "InvalidTransactions",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ValidTransactions",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ValidTransactions",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "AmountDiffereceTransactions",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "AmountDiffereceTransactions",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "MissingTransactions",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "MissingTransactions",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [
            "AmountDifference"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 765406383,
          "cachedResultUrl": "https://example.google.com/yourgooglesheet",
          "cachedResultName": "Reconciliation Summary"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://example.google.com/yourgooglesheet"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "758c4278-7db2-4f13-83c3-90d9ca49f1ab",
      "name": "Send report to reconciliation team",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1760,
        -144
      ],
      "parameters": {
        "text": "=Hello Team,\n\nThe reconciliation process has been completed.\n\nSummary:\n\u2714 Valid Transactions: {{ $json.ValidTransactions }}\n\u274c Invalid Transactions: {{ $json.InvalidTransactions }}\n\u26a0 Amount Differences: {{ $json.AmountDiffereceTransactions }}\n\ud83d\udced Missing Transactions: {{ $json.MissingTransactions }}\n\nPlease check the reconciliation sheet for full details.\n\nRegards,\nFinance Automation System",
        "options": {},
        "subject": "Daily Transaction Reconciliation Report",
        "toEmail": "test@example.com",
        "fromEmail": "test@example.com",
        "emailFormat": "text"
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "ca17c6c5-f91f-4b73-aa20-b8c3009e609f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1280,
        -1472
      ],
      "parameters": {
        "width": 576,
        "height": 800,
        "content": "## How it works\n\nThis workflow automates the complete reconciliation process between your **Local Database transactions** and **Payment Gateway transactions**.\nIt compares both datasets, identifies mismatches, logs all discrepancies into seperate Google Sheets, generates a summary of counts(valid, invalid, missing and amount differences) and finally sends a detailed reconciliation email to the finance team. This ensures fast, accurate, and fully automated financial reconciliation.\n\n## Setup steps\n\n1. Connect your credentials:\n    a. Google Service Account (for Google Sheets)\n    b. Email SMTP (Gmail or other)\n2. Replace Google Sheet IDs/link with your own datasets.\n3. Update email recipients and email templates.\n4. Customize reconciliation fields if needed.\n5. Adjust trigger schedule (manual, cron, or webhook).\n\n## Process Steps\n\n1. Read all transactions from Local Database Sheet.\n2. Read all transactions from Payment Gateway Sheet.\n3. Compare both datasets and split results into:\n    a. Valid Transactions\n    b. Invalid Transactions\n    c. Missing Transactions\n    d. Amount difference transactions\n4. Detect and log duplicate transactions.\n5. Append all discrepancy categories into separate Google Sheets tabs.\n6. Count total valid, invalid, missing, and mismatched transactions.\n7. Merge all counts and prepare a final summary dataset.\n8. Append the summary to the Reconciliation Summary Sheet.\n9. Send an automated reconciliation report email to finance team.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "cd20bc65-7d11-4cb5-a846-8936ecd50165",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1072,
        -96
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4f64d767-a6bc-42b7-810e-6ee955fb5fb8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -848,
        -496
      ],
      "parameters": {
        "color": 7,
        "width": 336,
        "height": 688,
        "content": "### Transactions from Local and Payment Gateway\n\nThis node retrieves all transactions recorded internally in your system.\n\n1. Source: Google Sheet (Local Sheet)\n2. Data includes: PaymentRef, Amount. Add more if needed.\n3. Purpose: Provides a reference dataset to compare against payment gateway data.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "da5c2d37-0d46-4b0d-b2b8-350e36705971",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 320,
        "height": 464,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### Compare Both Transactions (Merge Node \u2013 Compare Mode)\n\n\nThe Merge/Compare node compares Local vs Gateway based on matching fields (like PaymentRef).\n\nOutput splits automatically into Same, Different, A Only and B Only forms."
      },
      "typeVersion": 1
    },
    {
      "id": "da53fb0d-e153-4664-9df2-c1497bf34a97",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -608
      ],
      "parameters": {
        "color": 7,
        "width": 448,
        "height": 368,
        "content": "### Duplicate Transaction Processing\n\nThis script scans Local Database transactions and identifies records with the same PaymentRef appearing more than once.\n\nDuplicates are logged into a dedicated Google Sheet for audit purposes."
      },
      "typeVersion": 1
    },
    {
      "id": "e74ffd79-11f0-4bd7-a34f-e38e3ebea5df",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -608
      ],
      "parameters": {
        "color": 7,
        "width": 688,
        "height": 928,
        "content": "### Comparisons of all transactions and calculate total count\n\nCreated four different categories of Google Sheet for log the transactions to audit.\n\nInvalid transactions, valid transactions, Amount difference and Missing transactions from compare node.\n\nFinding amount difference identifies amount difference in both sheets and adding the transaction into reconciliation sheet which is `AmountDifference`"
      },
      "typeVersion": 1
    },
    {
      "id": "2737a8dc-467e-41af-b055-4721441a8c71",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -368
      ],
      "parameters": {
        "color": 7,
        "width": 448,
        "height": 416,
        "content": "### Merge All Transaction Counts (Merge Node)\n\nThis node takes all four results such as Invalid transactions, valid transactions, Amount differences and Missing transactions and merge them into one combined object.\n\nGenerate final summary row in JS code\n"
      },
      "typeVersion": 1
    },
    {
      "id": "640db69c-540f-4e23-8d4f-dead018405be",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1504,
        -368
      ],
      "parameters": {
        "color": 7,
        "width": 416,
        "height": 416,
        "content": "### Add final summary row and Send email report\n\nThis writes the reconciliation summary into the summary sheet\n\nThe email node sends a detailed report automatically to dedicated team or member"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "2eb5a2ef-f94f-4c06-8a78-f1844dce269b",
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Transactions from Local Database",
            "type": "main",
            "index": 0
          },
          {
            "node": "Transaction from Payment Gateway",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Adding the final count of transactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Valid Transactions": {
      "main": [
        [
          {
            "node": "Count valid transactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Invalid transaction": {
      "main": [
        [
          {
            "node": "Count invalid transactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Count valid transactions": {
      "main": [
        [
          {
            "node": "Merge with all transactions count",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Compare both transactions": {
      "main": [
        [
          {
            "node": "Invalid transaction",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Valid Transactions",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Finding Amount Difference",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add missing transaction to Sheet ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Finding Amount Difference": {
      "main": [
        [
          {
            "node": "Adding Amount difference transactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Count invalid transactions": {
      "main": [
        [
          {
            "node": "Merge with all transactions count",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Finding duplicate transactions": {
      "main": [
        [
          {
            "node": "Adding duplicate transactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transaction from Payment Gateway": {
      "main": [
        [
          {
            "node": "Compare both transactions",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Transactions from Local Database": {
      "main": [
        [
          {
            "node": "Compare both transactions",
            "type": "main",
            "index": 0
          },
          {
            "node": "Finding duplicate transactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add missing transaction to Sheet ": {
      "main": [
        [
          {
            "node": "Count Number of Missing Transactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge with all transactions count": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Count Number of Missing Transactions": {
      "main": [
        [
          {
            "node": "Merge with all transactions count",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Adding Amount difference transactions": {
      "main": [
        [
          {
            "node": "Count Number of Amount Difference Transactions.",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Adding the final count of transactions": {
      "main": [
        [
          {
            "node": "Send report to reconciliation team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Count Number of Amount Difference Transactions.": {
      "main": [
        [
          {
            "node": "Merge with all transactions count",
            "type": "main",
            "index": 2
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

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…

Source: https://n8n.io/workflows/11684/ — original creator credit. Request a take-down →

More Data & Sheets workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Data & Sheets

Security teams, DevOps engineers, vulnerability analysts, and automation builders who want to eliminate repetitive Nessus scan parsing, AI-based risk triage, and manual reporting. Designed for orgs fo

Email Send, HTTP Request, Google Sheets +1
Data & Sheets

This n8n workflow automatically finds apartments for rent in Germany, filters them by your city, rent budget, and number of rooms, and applies to them via email. Each application includes: A personali

HTTP Request, Google Drive, Email Send +1
Data & Sheets

👤 Who it’s for Blue Team leads, CISOs, and SOC managers who want automated visibility into threat metrics, endpoint alerts, and response actions — without needing a full SIEM or BI platform.

HTTP Request, Email Send, Google Sheets
Data & Sheets

Workflow Overview Zoom Attendance Evaluator with Follow-up is an n8n automation workflow that automatically evaluates Zoom meeting attendance and sends follow-up emails to no-shows and early leavers w

Zoom, Item Lists, HTTP Request +3
Data & Sheets

This automated n8n workflow streamlines invoice creation and payment reminders. It generates invoices on a monthly schedule and sends reminders for overdue payments, updating records in Google Sheets.

Google Sheets, Email Send