Use this powerful n8n workflow to analyze bank statements (PDFs, Excel/CSV) using GPT-4o-mini, categorize transactions, and securely save summaries to a PostgreSQL database.
Download this n8n workflow template and start using it instantly.
Manually processing and categorizing bank statement transactions across different file formats (PDF, Excel, CSV) is time-consuming and prone to errors. This specialized n8n workflow solves this by creating a robust ingestion pipeline. The automation handles complex tasks like detecting the file type, performing necessary data extraction (text from PDF or parsing from Excel), and then leveraging the power of an OpenAI n8n node to standardize and categorize the data into a clean JSON structure. This sophisticated n8n workflow ensures high accuracy in financial reporting and provides a clean summary stored directly in a PostgreSQL database for easy querying. This powerful approach eliminates manual effort and leverages the flexibility of the n8n automation platform.
The entire process is initiated by an API call using the ‘Upload Statement’ n8n trigger (a Webhook node). This n8n trigger is configured to accept raw body file uploads.
To deploy this automated n8n workflow template, follow these steps:
bankstatements exists in your PostgreSQL database, configured with columns matching the data being inserted (e.g., accountnumber, totalincome, rawdata). Upload Statement (Webhook n8n Trigger):
Function: Serves as the API entry point, configured to accept file uploads via POST request.
Key Configuration: Path is set to /upload-statement, and Response Mode is set to Response Node.
File Handler (Code n8n Node):
Function: Extracts binary file data and converts it into structured metadata (filename, mimeType) required for subsequent nodes.
Check File Type (If n8n Node):
Function: Directs the flow based on the file's MIME type. Checks specifically if the contentType contains application/pdf.
Extract PDF Text (Extract From File n8n Node):
Function: Extracts raw text content from PDF documents, preparing unstructured data for AI analysis.
Parse Excel/CSV (Spreadsheet File n8n Node):
Function: Converts structured spreadsheet files into an array of JSON objects.
AI Data Extractor (OpenAI n8n Node):
Function: The central intelligence. Uses GPT-4o-mini and a highly specific system prompt to perform complex financial data extraction and categorization from the document text/data. This key n8n node ensures data standardization.
Process & Summarize (Code n8n Node):
Function: Performs data validation, parses the AI's JSON output (which can sometimes be wrapped in markdown), calculates financial summaries (totals), and organizes the final data structure.
Save to Database (Postgres n8n Node):
Function: Persists the finalized, summarized financial data into a PostgreSQL table named bank_statements.
Send Response (Respond to Webhook n8n Node):
* Function: Provides immediate feedback to the API caller, including transaction counts and expense totals, ensuring a smooth external integration with this n8n workflow.
Use this powerful n8n workflow to scrape targeted YouTube product reviews using Apify, analyze their sentiment and summaries using an OpenAI n8n node, and automate the delivery of the final report via Gmail. Boost market research efficiency with this n8n template.

Automate your job search with this powerful n8n workflow. It uses the Adzuna API and OpenRouter AI to analyze job descriptions, tailor your resume for ATS, generate custom cover letters, and log progress in Google Sheets. Get started with this advanced n8n templates.

Use this powerful n8n workflow to automatically translate Google Slides presentations using Gemini AI, ensuring accurate, contextual translation while preserving original formatting.

Use this robust n8n workflow to autonomously generate, review, and publish high-quality SEO articles using multi-agent AI (GPT-4) to platforms like WordPress, Dev.to, and Twitter. Leverage advanced n8n nodes for content mastery.









































