Automate Bank Statement and Invoice Reconciliation with GPT and Google Sheets

Go to Workflow
392 views
Built by Chintan Prajapati Chintan Prajapati
Created on June 05, 2026

Description

๐ŸŸข Manual Trigger

Workflow starts manually to initiate the reconciliation process on demand.

๐Ÿ“„ Fetch Invoices & Bank Statements

Retrieves invoice data and bank statement data from Google Sheets for comparison.

๐Ÿ”€ Merge Data

Combines both datasets into a single structured dataset for processing.

๐Ÿงฉ Format Payload for AI

Function node prepares and structures the merged data into a clean JSON payload for AI analysis.

๐Ÿค– AI Reconciliation

AI Agent analyzes the invoice and bank statement data to identify matches, discrepancies, and reconciled entries.

๐Ÿงฎ Parse AI Output

Parses the AI response into a structured format suitable for adding back to Google Sheets.

๐Ÿ“Š Update Sheets

Adds the reconciled data and reconciliation results into the target Google Sheet for recordkeeping.


๐Ÿงพ Prerequisites

โœ… OpenAI API Credentials
Required for the AI Reconciliation node to process and match transactions.

Add your OpenAI API key in n8n โ†’ Credentials โ†’ OpenAI.

โœ… Google Sheets Credentials
Needed to read invoice and bank statement data and to write reconciled results.
Add credentials in n8n โ†’ Credentials โ†’ Google Sheets.

โœ… Google Sheets Setup
The connected spreadsheet must contain the following tabs:
Invoices โ€“ for invoice data
Bank_Statement โ€“ for bank transaction data
Reconciled_Data โ€“ for storing the AI-processed reconciliation output

โœ… Tab Structure & Required Headers

Invoices Sheet Columns:
Invoice_ID
Invoice_Date
Customer_Name
Amount
Status

Bank_Statement Sheet Columns:
Transaction_ID
Transaction_Date
Description
Debit/Credit
Amount

Reconciled_Data Sheet Columns:
Invoice_ID
Transaction_ID
Matched_Status
Remarks
Confidence_Score

โš™๏ธ n8n Environment Setup

Ensure all nodes are connected correctly and the workflow has permission to access the required sheets.

Test each fetch and write operation before running the full workflow.

Nodes Used (4)

AI Agent
@n8n/n8n-nodes-langchain.agent
Code
n8n-nodes-base.code
Google Sheets
n8n-nodes-base.googleSheets
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi