Skip to main content

Process receipt images with GPT-4o-mini, WhatsApp & Google Sheets automation

Workflow preview

Workflow preview
100%
Process receipt images with GPT-4o-mini, WhatsApp & Google Sheets automation preview
Open on n8n.io

Important notice

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

1. Workflow Overview

An intelligent automation system that turns WhatsApp into your personal receipt manager — integrating Meta WhatsApp Cloud API , Google Drive , Google Sheets , and OpenAI GPT 4o mini via n8n . ...

Best for

  • Document Extraction automation workflows
  • AI Chatbot automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.whatsapptrigger, n8n-nodes-base.whatsapp, n8n-nodes-base.httprequest, n8n-nodes-base.googledrive, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.code, n8n-nodes-base.googlesheets, @n8n/n8n-nodes-langchain.agent

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Process receipt images with GPT-4o-mini, WhatsApp & Google Sheets automation
Workflow name
Process receipt images with GPT-4o-mini, WhatsApp & Google Sheets automation

🧾An intelligent automation system that turns WhatsApp into your personal receipt manager — integrating Meta WhatsApp Cloud API, Google Drive, Google Sheets, and OpenAI GPT-4o-mini via n8n.

🎥 Demo: Watch the Loom walkthrough


⚙️ What It Does

The AI-Powered WhatsApp Receipt Bot automates the complete invoice handling process through a conversational interface.

Workflow Summary:

  1. User sends a receipt image via WhatsApp.

  2. The bot automatically downloads the media using the WhatsApp Cloud API.

  3. The image is uploaded to a Google Drive “Invoices” folder.

  4. The file is shared publicly, generating a shareable URL.

  5. The receipt is analyzed using OpenAI GPT-4o-mini to extract structured data:

    • Store name
    • Items purchased
    • Payment method
    • Total amount
  6. The extracted details are appended to a Google Sheet for record-keeping.

  7. The bot sends a human-readable summary back to WhatsApp with emojis and the invoice link.

Output Example:

🏬 Store: Big Bazaar  
📝 Items: Rice, Detergent, Snacks  
💳 Payment: Card  
💰 Total: ₹1520.75  
🔗 Link: https://drive.google.com/file/d/1abcXYZ/view  

This system eliminates manual expense tracking, improves accuracy through OCR, and provides a seamless way to manage receipts in real time.


💡 Use Cases

Scenario Description
Personal Expense Management Automatically store and categorize receipts from daily purchases.
Business Accounting Collect employee expense receipts through WhatsApp and centralize them in Google Sheets.
Freelancer or Consultant Tracking Keep a digital record of client reimbursements or software purchase receipts.
Family Budgeting Family members send receipts to one shared WhatsApp number, all data gets logged centrally.
E-commerce / Delivery Teams Drivers or delivery agents send invoices from the field to WhatsApp; data automatically goes to the accounting sheet.

🔧 Setup

1. Accounts and Tools Needed

Tool Purpose Link
Meta Developer Account To access WhatsApp Business Cloud API https://developers.facebook.com/apps
Google Cloud Account For enabling Drive and Sheets APIs https://console.cloud.google.com
n8n Instance Workflow automation engine (local or cloud) https://app.n8n.cloud
OpenAI API Key For GPT-4o-mini model OCR + reasoning https://platform.openai.com/account/api-keys

2. Meta Developer Setup (WhatsApp Cloud API)

  1. Go to Meta Developer Dashboard → My Apps → Create App → Business type.

  2. Add WhatsApp product under your app.

  3. Retrieve the following from WhatsApp > Configuration:

    • Permanent Access Token
    • Phone Number ID
    • WhatsApp Business Account ID
  4. Add these credentials in n8n → Credentials → WhatsApp API.

    • Use the same credentials for WhatsApp Trigger and Send Message nodes.
  5. Verify webhook in Meta with your n8n webhook URL.

Important: In your HTTP Node, set the header as:

Authorization: Bearer <access_token>

Replace <access_token> with your WhatsApp Cloud API permanent token. Without this, the workflow will fail to send or receive WhatsApp messages properly.


3. Google Drive Setup

  1. Create a folder named Invoices on your Google Drive.

  2. Copy the Folder ID (found in the Drive URL).

  3. In Google Cloud Console → APIs & Services → Enable APIs:

    • Enable Google Drive API
    • Enable Google Sheets API
  4. Go to Credentials → Create Credentials → OAuth 2.0 Client ID.

  5. Download the credentials.json file.

  6. Upload this to n8n → Credentials → Google Drive OAuth2 API.

  7. Authorize the connection on first workflow run.


4. Google Sheets Setup

  1. Create a new Google Sheet titled Invoices.
  2. Add the following headers in Row 1:
store name | discription | image_url | payment | total
  1. Copy the Sheet ID (from the URL).
  2. Add the ID under the Google Sheets Append node in n8n.
  3. Map each field to its corresponding value extracted from the OCR result.

5. OpenAI Setup

  1. Generate an API key from https://platform.openai.com/account/api-keys.

  2. Add it to n8n → Credentials → OpenAI API.

  3. Use model gpt-4o-mini in the “Analyze Image” node.

    • Can upgrade to gpt-4o for better OCR accuracy if account supports it.

6. n8n Workflow Setup

  1. Import the provided n8n workflow JSON.

  2. Configure credentials for:

    • WhatsApp API
    • Google Drive OAuth2
    • Google Sheets OAuth2
    • OpenAI API
  3. Activate workflow and set webhook in Meta Developer console.

  4. Send a test receipt image to your WhatsApp Business number.

The bot will automatically: Download → Upload → Extract → Log → Summarize → Reply


📊 Example Google Sheet Record

store name discription image_url payment total
Big Bazaar Rice, Detergent, Snacks https://drive.google.com/file/d/1abcXYZ/view Card 1520.75

🧠 Result

A fully automated AI pipeline that transforms WhatsApp into a smart expense-tracking interface — integrating vision, automation, and natural language processing for zero-manual financial documentation.


Support & Contact: If you face any issues during setup or execution, contact: 📧 Email: [email protected] 🔗 LinkedIn: Atharva Jaiswal

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 - WhatsApp Trigger

Type / Role
n8n-nodes-base.whatsAppTrigger - whatsAppTrigger
Config choices
Version 1

Block 2 - Download media

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1

Block 3 - HTTP Request

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

Block 4 - Upload file

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

Block 5 - Share file

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

Block 6 - Analyze image

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 7 - Download file

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

Block 8 - Code

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

Block 9 - Append row in sheet

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

Block 10 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 11 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 12 - Send message

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1

Block 13 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Process receipt images with GPT-4o-mini, WhatsApp & Google Sheets automation
Complexity intermediate
Nodes 13
Categories Document Extraction, AI Chatbot
Author Atharva
Published 05 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9285/9285.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 Process receipt images with GPT-4o-mini, WhatsApp & Google Sheets automation do?

An intelligent automation system that turns WhatsApp into your personal receipt manager — integrating Meta WhatsApp Cloud API , Google Drive , Google Sheets , and OpenAI GPT 4o mini via n8n . ...

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 Document Extraction, AI Chatbot use case.