{"product_id":"n8n-expense-ocr-workflow-mindee-gpt-4o-save-to-postgres","title":"n8n Expense OCR Workflow: Mindee + GPT-4o, Save to Postgres","description":"\u003ch3\u003eTurn receipt uploads into categorized expenses—automatically\u003c\/h3\u003e\n\u003cp\u003eThis \u003cstrong\u003en8n Expense OCR Workflow\u003c\/strong\u003e takes receipt submissions from an \u003cstrong\u003en8n form\u003c\/strong\u003e, extracts expense data using \u003cstrong\u003eMindee\u003c\/strong\u003e, classifies and validates it with \u003cstrong\u003eOpenAI\u003c\/strong\u003e, stores the receipt in \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e, saves records to \u003cstrong\u003ePostgreSQL\u003c\/strong\u003e, and sends \u003cstrong\u003eSlack\u003c\/strong\u003e alerts—plus a daily analytics summary.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives an expense submission\u003c\/strong\u003e via an n8n form with a receipt file and optional amount\/notes.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates the upload\u003c\/strong\u003e, then \u003cstrong\u003euploads the receipt to Google Drive\u003c\/strong\u003e and enqueues it for \u003cstrong\u003eMindee OCR\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePolls Mindee for OCR results\u003c\/strong\u003e and extracts key fields such as \u003cem\u003emerchant\u003c\/em\u003e, \u003cem\u003eamount\u003c\/em\u003e, \u003cem\u003edate\u003c\/em\u003e, \u003cem\u003ecategory\u003c\/em\u003e, \u003cem\u003ereceipt number\u003c\/em\u003e, and \u003cem\u003eraw text\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHandles OCR failures and incomplete data\u003c\/strong\u003e by sending \u003cstrong\u003eSlack alerts\u003c\/strong\u003e for manual review.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUses OpenAI to classify the expense\u003c\/strong\u003e (final category, business vs personal, expense type, and confidence), and \u003cstrong\u003eblocks low-confidence results\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePrevents duplicates in PostgreSQL\u003c\/strong\u003e by checking receipt number and amount before inserting.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSaves the finalized expense record to PostgreSQL\u003c\/strong\u003e, including the \u003cstrong\u003eGoogle Drive receipt URL\u003c\/strong\u003e, and posts a success message.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRuns daily analytics\u003c\/strong\u003e by querying PostgreSQL spending totals and posting a dashboard-style summary to Slack.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eAutomate expense capture for SaaS ops and bookkeeping teams using receipt uploads.\u003c\/li\u003e\n  \u003cli\u003eSpeed up review workflows by flagging OCR or low-confidence classification in Slack.\u003c\/li\u003e\n  \u003cli\u003eMaintain an auditable history by linking each expense record to its stored receipt in Google Drive.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations\/Credentials:\u003c\/strong\u003e Mindee (HTTP header auth), OpenAI, Slack, Google Drive OAuth, PostgreSQL.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes used:\u003c\/strong\u003e if, code, wait, merge, slack, postgres.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45950231249075,"sku":"N8N-19130","price":78.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/KICVFgL1OXhfuTxIad7SZ_bmMNRwJ7.png?v=1788514083","url":"https:\/\/buyflowscripts.com\/products\/n8n-expense-ocr-workflow-mindee-gpt-4o-save-to-postgres","provider":"N8N Commerce","version":"1.0","type":"link"}