Templates / Reconcile expenses and optimize tax deductions with OpenAI GPT‑4.1‑mini and Gmail

Reconcile expenses and optimize tax deductions with OpenAI GPT‑4.1‑mini and Gmail

Ready for 3.0

by Cheng Siong Chin ✓ · 124 views · created 2026-03-06 · Document Extraction, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 18 nodes and runs on a schedule (every day at 09:00). Along the way it connects OpenAI Chat Model and Gmail.

How it runs

Trigger: On a schedule (every day at 09:00).

  1. Workflow Configuration (Edit Fields (Set)): sets 3 fields: receiptsApiUrl, revenueApiUrl, taxAgentEmail
  2. Fetch Expense Receipts (HTTP Request): calls an HTTP API
  3. Fetch Revenue Data (HTTP Request): calls an HTTP API
  4. Extract Receipt Data (Extract from File): extracts data from a file (pdf)
  5. Merge: merges the data from its input branches
  6. Receipt Matching Agent (AI Agent): runs an AI agent, with model: OpenAI Model - Receipt Matching; output parser: Structured Output - Receipt Matching
  7. Deduction Category Extraction Agent (AI Agent): runs an AI agent, with model: OpenAI Model - Deduction Extraction; output parser: Structured Output - Deduction Extraction
  8. Calculate Tax Deductions (Code): runs custom JavaScript code
  9. Report Generation Agent (AI Agent): runs an AI agent, with model: OpenAI Model - Report Generation; output parser: Structured Output - Report Generation
  10. Prepare Final Packet (Edit Fields (Set)): sets 3 fields: emailSubject, emailBody, taxAgentEmail

…plus 1 more step. See the full node list below.

Services it uses

OpenAI Chat ModelGmail

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (10)

From the author

How It Works This workflow streamlines financial operations for accounting teams, finance departments, and tax professionals managing business expenses. It addresses the challenge of reconciling expenses with revenue data, accurately categorizing deductions,…

Excerpt from Cheng Siong Chin's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.