N8N Expense Processing Workflow
Expense processing backend workflow with AI agent for doc analysis
About This Project
N8N-Expense-Processing-Workflow is an n8n automation that handles expense receipts from submission through storage and notification. Users upload a receipt through a form trigger webhook and select a category of Personal, Business, or Shared/Home. The workflow extracts text from PDF receipts using OCR, then uses Google Gemini through a structured output parser to convert the content into a standardized JSON format containing vendor details, amounts, dates, and categorization. Based on the selected category, a conditional routing layer directs files to category-specific processing paths.
The project integrates Google Drive, which is organized into year and month folders across multiple accounts, with S3-compatible storage such as AWS S3 or Wasabi. Gmail OAuth2 is used to send HTML-formatted notifications containing expense details and links to stored receipts. Business expenses can also be forwarded to accounting systems through an email hook, which is configurable for different accounting providers. Code nodes handle folder mapping and date-based organization, and the README documents configuration steps for credentials, placeholder IDs, bucket names, and the required folder structure.
This workflow may be useful to individuals or small businesses that want to automate receipt capture and filing without a dedicated expense management platform. It is also a reference for developers building document-extraction pipelines in n8n that combine LLM-based parsing with multi-destination file storage and notifications.