Skip to main content

WhatsApp receipt OCR & AI data extraction with Twilio, LlamaParse & Gemini

Workflow preview

Workflow preview
100%
WhatsApp receipt OCR & AI data extraction with Twilio, LlamaParse & Gemini preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

WhatsApp Receipt OCR & Data Extraction Suite Categories: Accounting Automation • OCR Processing • AI Data Extraction • Business Tools This workflow transforms WhatsApp into a fully automated receip...

Best for

  • Invoice Processing automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.if, n8n-nodes-base.wait, n8n-nodes-base.httprequest, @n8n/n8n-nodes-langchain.lmchatopenrouter, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.googledrive, n8n-nodes-base.googlesheets

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Gabriela Macovei.

Original n8n.io source

1.1 Workflow description

Title
WhatsApp receipt OCR & AI data extraction with Twilio, LlamaParse & Gemini
Workflow name
WhatsApp receipt OCR & AI data extraction with Twilio, LlamaParse & Gemini

WhatsApp Receipt OCR & Data Extraction Suite

Categories: Accounting Automation • OCR Processing • AI Data Extraction • Business Tools

This workflow transforms WhatsApp into a fully automated receipt-processing system using advanced OCR, multi-model AI parsing, and structured data storage. By combining LlamaParse, Claude (OpenRouter), Gemini, Google Sheets, and Twilio, it eliminates manual data entry and delivers instant, reliable receipt digitization for any business.


What This Workflow Does

When a user sends a receipt photo or PDF via WhatsApp, the automation:

  1. Receives the file through Twilio WhatsApp
  2. Uploads and parses it with LlamaParse (high-res OCR + invoice preset)
  3. Extracts structured data using Claude + Gemini + a strict JSON parser
  4. Cleans and normalizes the data (dates, ABN, vendor, tax logic)
  5. Uploads the receipt to Google Drive
  6. Logs the extracted fields into a Google Sheet
  7. Replies to the user on WhatsApp with the extracted details
  8. Asks for confirmation via quick-reply buttons
  9. Updates the Google Sheet based on user validation

The result is a fast, scalable, human-free system for converting raw receipt photos into clean, structured accounting data.


Key Benefits

  • No friction for users: receipts are submitted simply by sending a WhatsApp message.
  • High-accuracy OCR: LlamaParse extracts text, tables, totals, vendors, tax, and ABN with impressive reliability.
  • Enterprise-grade data validation: complex logic ensures the correct interpretation of GST, included taxes, or unidentified tax amounts.
  • Multi-model extraction: Claude and Gemini both analyse the OCR output for more reliable result. We have one primary LLM and a secondary one.
  • Hands-off accounting: every receipt becomes a standardized row in Google Sheets.
  • Two-way WhatsApp communication: users can confirm or reject extracted data instantly.
  • Scalable architecture: perfect for businesses handling dozens or thousands of receipts monthly.

How It Works (Technical Overview)

1. Twilio → Webhook Trigger

The workflow starts when a WhatsApp message containing a media file hits your Twilio webhook.

2. Initial Google Sheets Logging

The MessageSid is appended to your tracking sheet to ensure every receipt is traceable.

3. LlamaParse OCR

The file is sent to LlamaParse with the invoice preset, high-resolution OCR, and table extraction enabled.
The workflow checks job completion before moving further.

4. LLM Data Extraction

The OCR markdown is analyzed using:

  • Claude Sonnet 4.5 (via OpenRouter)
  • Gemini 2.5 Pro
  • A strict structured JSON output parser
  • Custom JS cleanup logic

The system extracts:

  • Vendor
  • Cost
  • Tax (with multi-rule Australian GST logic)
  • Currency
  • Date (parsed + normalized)
  • ABN (validated and digit-normalized)

5. Google Drive Integration

The uploaded receipt is stored, shared, and linked back to the record in Sheets.

6. Google Sheets Update

Fields are appended/updated following a clean schema:

  • Vendor
  • Cost
  • Tax
  • Date
  • Currency
  • ABN
  • Public drive link
  • Status (Confirmed / Not confirmed)

7. User Response Flow

The user receives a summary of extracted data via WhatsApp.
Buttons allow them to approve or reject accuracy.
The Google Sheet updates accordingly.


Target Audience

This workflow is ideal for:

  • Accounting & bookkeeping firms
  • Outsourced finance departments
  • Small businesses tracking expenses
  • Field workers submitting receipts
  • Automation agencies offering DFY systems
  • CFOs wanting real-time expense visibility

Use Cases

  • Expense reconciliation
  • Automated bookkeeping
  • Receipt digitization & compliance
  • Real-time employee expense submission
  • Multi-client automation at accounting agencies

Required Integrations

  • Twilio WhatsApp (Business API number + webhook)
  • LlamaParse API
  • OpenRouter (Claude Sonnet)
  • Google Gemini API
  • Google Drive
  • Google Sheets

Setup Instructions (High-Level)

  1. Import the n8n workflow.
  2. Connect your Twilio WhatsApp account.
  3. Add API credentials for:
    • LlamaParse
    • OpenRouter
    • Google Gemini
    • Google Drive
    • Google Sheets
  4. Create your target Google Sheet.
  5. Configure your WhatsApp webhook URL in Twilio.
  6. Test with a sample receipt.

Why This System Works

  • Users send receipts using a tool they already use daily (WhatsApp).
  • LlamaParse provides state-of-the-art OCR for low-quality receipts.
  • Using multiple LLMs drastically increases accuracy for vendor, ABN, and tax extraction.
  • Advanced normalization logic ensures data is clean and accounting-ready.
  • Google Sheets enables reliable storage, reporting, and future integrations.
  • End-to-end automation replaces hours of manual work with instant processing.

Watch My Complete Build Process

Want to see exactly how I built this entire AI design system from scratch? I walk through the complete development process on my YouTube channel

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Webhook3

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 2 - If5

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 3 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 4 - HTTP Request28

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 5 - HTTP Request29

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 6 - HTTP Request17

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 7 - HTTP Request18

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 8 - HTTP Request30

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 9 - OpenRouter Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 10 - HTTP Request5

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 11 - Google Gemini Chat Model5

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 12 - Upload file2

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 13 - Append row in sheet2

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 14 - Update row in sheet4

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 15 - Update row in sheet5

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 16 - HTTP Request6

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 17 - Basic LLM Chain3

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 18 - Structured Output Parser3

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 19 - Code4

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 20 - HTTP Request7

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 21 - Code5

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 22 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 23 - Merge2

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 24 - Merge3

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Showing the first 24 of 41 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow WhatsApp receipt OCR & AI data extraction with Twilio, LlamaParse & Gemini
Complexity advanced
Nodes 41
Categories Invoice Processing, AI Summarization
Author Gabriela Macovei
Published 28 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11332/11332.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does WhatsApp receipt OCR & AI data extraction with Twilio, LlamaParse & Gemini do?

WhatsApp Receipt OCR & Data Extraction Suite Categories: Accounting Automation • OCR Processing • AI Data Extraction • Business Tools This workflow transforms WhatsApp into a fully automated receip...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Invoice Processing, AI Summarization use case.