Back to Catalog

Automate bank statement and invoice reconciliation with GPT and Google Sheets

Chintan PrajapatiChintan Prajapati
447 views
2/3/2026
Official Page

๐ŸŸข 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.

n8n Workflow: AI-Powered Bank Statement and Invoice Reconciliation with Google Sheets

This n8n workflow automates the process of reconciling bank statements and invoices by leveraging AI to categorize transactions and then updating a Google Sheet. It provides a flexible framework for handling different transaction types, ensuring accurate and efficient financial record-keeping.

What it does

This workflow streamlines your financial reconciliation process through the following steps:

  1. Manual Trigger: The workflow is initiated manually, allowing you to control when the reconciliation process begins.
  2. AI Agent for Transaction Categorization: It uses an AI Agent (powered by an OpenAI Chat Model) to analyze transaction descriptions and determine if they are related to a bank statement or an invoice.
  3. Conditional Routing (Switch): Based on the AI's categorization, the workflow routes the transaction data to the appropriate processing path.
  4. Bank Statement Processing (Conditional Branch): If the AI identifies the transaction as a bank statement, it proceeds to further processing.
  5. Invoice Processing (Conditional Branch): If the AI identifies the transaction as an invoice, it proceeds to further processing.
  6. Code Node for Data Transformation: A Code node is used to transform the transaction data into a structured format suitable for Google Sheets, likely extracting key details like amount, date, description, and category.
  7. Google Sheets Update: The processed and formatted transaction data is then written to a specified Google Sheet, ensuring your financial records are up-to-date.
  8. Merge: After processing, both conditional branches (bank statement and invoice) merge back into a single flow, indicating completion or further unified actions (though no further actions are explicitly defined in the provided JSON).

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running n8n instance.
  • OpenAI API Key: For the AI Agent to categorize transactions. This needs to be configured as an n8n credential for the "OpenAI Chat Model" node.
  • Google Sheets Account: To store and manage your reconciled financial data. This requires an n8n credential for "Google Sheets".
  • Google Sheet: A pre-existing Google Sheet with appropriate headers where the reconciled data will be written.

Setup/Usage

  1. Import the Workflow:
    • Copy the provided JSON workflow definition.
    • In your n8n instance, go to "Workflows" and click "New".
    • Click the three dots menu (...) in the top right and select "Import from JSON".
    • Paste the JSON and click "Import".
  2. Configure Credentials:
    • Locate the "OpenAI Chat Model" node and configure your OpenAI API Key credential.
    • Locate the "Google Sheets" node and configure your Google Sheets credential.
  3. Configure Nodes:
    • AI Agent: You might need to refine the prompt for the "AI Agent" node to accurately categorize your specific bank statement and invoice formats.
    • Google Sheets: Configure the "Google Sheets" node with the correct Spreadsheet ID and Sheet Name where you want to write the data.
    • Code Node: Review and adjust the JavaScript code in the "Code" node to correctly parse and format your incoming transaction data before it's sent to Google Sheets.
    • Switch Node: Ensure the conditions in the "Switch" node accurately reflect the output of your AI Agent for routing.
  4. Activate the Workflow: Once configured, activate the workflow.
  5. Execute: Click "Execute workflow" on the "Manual Trigger" node to run the workflow. You will likely need to provide sample transaction data as input to the AI Agent for testing.

Related Templates

Filter the feedback from Typeform and store in Google Sheets

This workflow allows you to filter positive and negative feedback received from a Typeform and insert the data into Google Sheets. Typeform Trigger node: Start the workflow when a new form is submitted via Typeform Set node: Extract the information submitted in typeform IF node: Filter positive and negative reviews (i.e. ratings above or below 3 out of 5). Google Sheets node: Store the positive and negative reviews and ratings in two different sheets for each case.

LorenaBy Lorena
1068

Automate content publishing with GPT-4 via Google Sheets to email & Slack approval

Streamline the final stage of your content production workflow by automating publishing, formatting, metadata generation, and approval routing. This AI-powered subworkflow pulls optimized drafts from Google Sheets, enriches them with SEO metadata, converts them into publish-ready HTML, and delivers them via email and Slack for approval or distribution. Ideal for teams managing high-volume content pipelines with structured review processes. โœจ๐Ÿ“๐Ÿš€ What This Template Does Triggers via chat to start the content publishing process. ๐Ÿ’ฌ Fetches the latest optimized content draft from Google Sheets using a content ID. ๐Ÿ“„ Prepares metadata such as topic, intent, platform, and parameters. ๐Ÿงฉ Uses an AI agent (GPT-4) to generate SEO metadata, HTML-formatted article, tags, and structured publish data. ๐Ÿค– Enforces JSON structure to ensure consistent output formatting. ๐Ÿงฑ Saves the publish-ready content (title, meta description, HTML, tags) back into Google Sheets for version tracking. ๐Ÿ“Š Sends the content to an approver via Gmail with a previewed HTML body. ๐Ÿ“ง Awaits approval and branches based on decision. ๐Ÿ”€ If approved, sends the final published content to the intended recipient via Gmail. ๐Ÿ“จ Sends a success confirmation message to Slack for team visibility. ๐Ÿ“ข Key Benefits โœ… AI-generated SEO optimization, metadata, and HTML formatting โœ… Centralizes content versioning within Google Sheets โœ… Automates approval workflows and content delivery โœ… Ensures consistent output structure with JSON parsing โœ… Reduces manual formatting, editing, and routing tasks โœ… Delivers instant Slack notifications for team transparency Features Chat-triggered publishing workflow Google Sheets content retrieval and storage AI-driven formatting, metadata generation, HTML conversion Structured JSON enforcement for clean automation Gmail integration for approval + publishing Slack notifications for successful publication Short-term memory support for context persistence Requirements Google Sheets OAuth2 credentials OpenAI API key (GPT-4 or GPT-4 mini) Gmail OAuth2 credentials for sending and receiving approval messages Slack API credentials with chat:write access Preconfigured Google Sheet containing optimized content drafts Target Audience Content operations teams handling recurring content workflows SEO and marketing teams producing high-volume articles Agencies managing structured approval pipelines Automation specialists building content publishing systems Teams needing standardized, AI-enhanced HTML content Step-by-Step Setup Instructions Connect your Google Sheets OAuth2 credential and replace the sheet/document IDs. ๐Ÿ—‚๏ธ Add your OpenAI API key for the AI Publishing Agent. ๐Ÿ”‘ Connect Gmail credentials for both approval and final publishing emails. ๐Ÿ“ง Update all email addresses and Slack channel IDs with your own. โœ๏ธ Modify metadata fields (topic, intent, platform) if needed. ๐ŸŽฏ Run the workflow with a sample content ID to verify the flow. ๐Ÿ” Enable and integrate as a subworkflow inside your main content pipeline. ๐Ÿš€

Rahul JoshiBy Rahul Joshi
115

Write HTTP query string on image

Receives data from an incoming HTTP Request Reads file from internet Writes data on image Returns the data The URL to call will look like this: http://localhost:5678/webhook-test/webhook/test?name=Jim Once called it will return an image like this:

Jan OberhauserBy Jan Oberhauser
4819