Verify receipts and invoices with OpenAI vision, Slack and Google Sheets

Go to Workflow
0 views
Built by Redowan Ahmed Farhan Redowan Ahmed Farhan
Created on June 15, 2026

Description

Quick Overview
This workflow receives receipt or invoice image URLs via a webhook, uses OpenAI Vision to extract structured totals and currency, validates them against expected booking values, logs the result to Google Sheets, and posts non-approved cases to Slack for human review.

How it works
Receives a POST webhook request containing a document image URL plus booking details like expected amount and currency.
Normalizes the incoming payload and assigns a document ID for consistent downstream processing.
Sends the image URL to OpenAI (GPT vision) to extract vendor, date, totals, currency, line items, and an extraction confidence score as strict JSON.
Parses the model output and validates total, currency, and confidence against the expected booking values (with a 2% amount tolerance) to produce an APPROVED, REVIEW, REJECTED, or ERROR verdict.
Posts any non-APPROVED verdict to a Slack channel with the extracted values and validation reasons.
Appends the verification result to Google Sheets and returns a JSON response with the documentId, verdict, and reasons to the webhook caller.
Alerts an engineering Slack channel if the workflow fails unexpectedly.

Setup
Add an OpenAI API credential for the OpenAI Chat Model used by the AI extraction step.
Add a Slack OAuth2 credential and set the target channels for review notifications and engineering error alerts.
Add a Google Sheets OAuth2 credential and update the spreadsheet and sheet/tab used to append verification results.
Copy the webhook URL from the webhook trigger and configure your source system to POST image_url (or imageUrl), expected_amount, currency, guest_id, and booking_id, ensuring the image URL is publicly reachable by OpenAI.

Nodes Used (5)

AI Agent
@n8n/n8n-nodes-langchain.agent
Code
n8n-nodes-base.code
Google Sheets
n8n-nodes-base.googleSheets
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Slack
n8n-nodes-base.slack