Review your budget from bank statement CSV with Google Gemini and Gmail

Go to Workflow
0 views
Built by Oka Hironobu Oka Hironobu
Created on July 28, 2026

Description

Quick Overview
This workflow collects a bank statement CSV and monthly budget via an n8n form, summarizes spending totals and top merchants, gets a structured budget review from Google Gemini, logs the result to Google Sheets, and emails a tailored report via Gmail based on whether you are over, on track, or under budget.

How it works
Receives a form submission with the user’s email, monthly budget, and an uploaded bank/card statement CSV.
Extracts transaction rows from the CSV and calculates total spend plus a top-spending-by-merchant summary.
Sends only the aggregated totals and top merchants to Google Gemini to generate a structured budget review with status, overspend areas, savings opportunities, a summary, and a monthly plan.
If Gemini fails to return a usable review, sends a failure email to the user with CSV formatting guidance.
Formats the AI output into email-ready fields (including budget difference and bullet lists) and appends the review to a Google Sheets spreadsheet.
Routes by budget status and sends a tailored Gmail message (over budget, on track, under budget, or a generic fallback) to the submitted email address.

Setup
Add credentials for Google Gemini (PaLM) API, Google Sheets OAuth2, and Gmail OAuth2.
Select the target Google Sheets spreadsheet and ensure it has a sheet/tab for appended rows (for example, “Budget Reviews”).
Activate the form trigger and share the generated form URL so users can upload a CSV statement and enter their budget.

Nodes Used (6)

Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm
Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini
Google Sheets
n8n-nodes-base.googleSheets
Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured