Skip to main content

AI-powered bank statement analysis & transaction categorization

Workflow preview

Workflow preview
100%
AI-powered bank statement analysis & transaction categorization 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 automatically processes bank statements from various formats and extracts structured transaction data with intelligent categorization using AI. Key Steps 1. File Upload A...

Best for

  • Document Extraction automation workflows
  • AI Summarization automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-base.extractfromfile, n8n-nodes-base.spreadsheetfile, n8n-nodes-base.openai, n8n-nodes-base.postgres, n8n-nodes-base.respondtowebhook

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by vinci-king-01.

Original n8n.io source

1.1 Workflow description

Title
AI-powered bank statement analysis & transaction categorization
Workflow name
AI-powered bank statement analysis & transaction categorization

How it works

This workflow automatically processes bank statements from various formats and extracts structured transaction data with intelligent categorization using AI.

Key Steps

  1. File Upload - Accepts bank statements via webhook upload (PDF, Excel, CSV formats).
  2. Smart Format Detection - Automatically routes files to appropriate processors (PDF text extraction or spreadsheet parsing).
  3. AI-Powered Extraction - Uses GPT-4 to extract account details, transactions, and balances from statement data.
  4. Data Processing & Categorization - Cleans, validates, and automatically categorizes transactions into expense categories.
  5. Database Storage - Saves processed data to PostgreSQL database for analysis and reporting.
  6. API Response - Returns structured summary with transaction counts, expense totals, and category breakdowns.

Set up steps

Setup time: 8-12 minutes

  1. Configure OpenAI credentials - Add your OpenAI API key for AI-powered data extraction.
  2. Set up PostgreSQL database - Connect your PostgreSQL database and create the required table structure.
  3. Configure webhook endpoint - The workflow provides a /upload-statement endpoint for file uploads.
  4. Customize transaction categories - Modify the AI prompt to include your preferred expense categories.
  5. Test the workflow - Upload a sample bank statement to verify the extraction and categorization process.
  6. Set up database table - Ensure your PostgreSQL database has a bank_statements table with appropriate columns.

Features

  • Multi-format support: PDF, Excel, CSV bank statements
  • AI-powered extraction: GPT-4 extracts account details and transactions
  • Automatic categorization: Expenses categorized as groceries, dining, gas, shopping, utilities, healthcare, entertainment, income, fees, or other
  • Data validation: Cleans and validates transaction data with error handling
  • Database storage: PostgreSQL integration for data persistence
  • API responses: Clean JSON responses with transaction summaries and category breakdowns
  • Smart routing: Automatic format detection and appropriate processing paths

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 - Upload Statement

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

Block 2 - File Handler

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

Block 3 - Check File Type

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

Block 4 - Extract PDF Text

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

Block 5 - Parse Excel/CSV

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

Block 6 - AI Data Extractor

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

Block 7 - Process & Summarize

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

Block 8 - Save to Database

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.4

Block 9 - Send Response

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

3. Summary Table

Workflow AI-powered bank statement analysis & transaction categorization
Complexity intermediate
Nodes 9
Categories Document Extraction, AI Summarization
Author vinci-king-01
Published 29 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6629/6629.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 AI-powered bank statement analysis & transaction categorization do?

How it works This workflow automatically processes bank statements from various formats and extracts structured transaction data with intelligent categorization using AI. Key Steps 1. File Upload A...

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, AI Summarization use case.