This workflow corresponds to n8n.io template #9285 — we link there as the canonical source.
This workflow follows the Agent → Google Drive recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "54e0a66b-d8c4-420c-91e9-54a8e7f5eb69",
"name": "WhatsApp Trigger",
"type": "n8n-nodes-base.whatsAppTrigger",
"position": [
480,
160
],
"parameters": {
"options": {},
"updates": [
"messages"
]
},
"credentials": {
"whatsAppTriggerApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "4f21f409-1ec7-4745-9706-c942c3c2fb5d",
"name": "Download media",
"type": "n8n-nodes-base.whatsApp",
"position": [
704,
160
],
"parameters": {
"resource": "media",
"operation": "mediaUrlGet",
"mediaGetId": "={{ $json.messages[0].image.id }}"
},
"credentials": {
"whatsAppApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "f9d581cf-4a0c-4b6b-86f1-749f99852ce3",
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"position": [
928,
160
],
"parameters": {
"url": "={{ $json.url }}",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.2
},
{
"id": "ea1794f8-6e6c-430b-9a7d-d604b3b70a39",
"name": "Upload file",
"type": "n8n-nodes-base.googleDrive",
"position": [
1152,
160
],
"parameters": {
"name": "data",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1IP1KFkWq0SGE6vITKxueGzJcvTU4PIVx",
"cachedResultUrl": "https://drive.google.com/drive/folders/1IP1KFkWq0SGE6vITKxueGzJcvTU4PIVx",
"cachedResultName": "Invoices"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "e198f8cb-35de-45c1-93bc-6a855083cac7",
"name": "Share file",
"type": "n8n-nodes-base.googleDrive",
"position": [
1376,
160
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "share",
"permissionsUi": {
"permissionsValues": {
"role": "reader",
"type": "anyone"
}
}
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "24ffe82f-b682-42f5-bde8-41c6ddd8993d",
"name": "Analyze image",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
480,
384
],
"parameters": {
"text": "Your job is to extract structured data from invoice images.\nReturn the output in valid JSON only, with the following fields:\n\nstore_name: Name of the store or merchant\n\ndescription: Short summary of purchased items or services\n\nimage_url: URL of the invoice image (as provided in input)\n\npayment: Mode of payment (card, cash, UPI, wallet, other)\n\ntotal: Final total amount in numeric format\nOutput Json Only\nExample JSON output:\n{\n \"store_name\": \"Big Bazaar\",\n \"description\": \"3 items: rice, detergent, snacks\",\n \"image_url\": \"https://example.com/invoice123.png\",\n \"payment\": \"card\",\n \"total\": 1520.75\n}\n",
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"resource": "image",
"inputType": "base64",
"operation": "analyze"
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.8
},
{
"id": "42667e8e-4011-401f-a84b-64132d14daab",
"name": "Download file",
"type": "n8n-nodes-base.googleDrive",
"position": [
1600,
160
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Upload file').item.json.id }}"
},
"options": {},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "a5b8be95-dc87-495f-a64b-e30048d545af",
"name": "Code",
"type": "n8n-nodes-base.code",
"position": [
704,
384
],
"parameters": {
"jsCode": "// Get the raw text\nconst raw = $input.first().json.content;\n\n// Remove ```json and ``` wrappers + escaped \\n\nconst cleaned = raw\n .replace(/```json/g, \"\")\n .replace(/```/g, \"\")\n .replace(/\\\\n/g, \"\")\n .trim();\n\n// Parse to JSON\nconst data = JSON.parse(cleaned);\n\nreturn [{ json: data }];\n"
},
"typeVersion": 2
},
{
"id": "72db8e7e-bf25-4e65-96d1-2b5eccec34cc",
"name": "Append row in sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
928,
384
],
"parameters": {
"columns": {
"value": {
"total": "={{ $json.total }}",
"payment": "={{ $json.payment }}",
"image_url": "={{ $('Upload file').item.json.webViewLink }}",
"store name": "={{ $json.store_name }}",
"discription": "={{ $json.description }}"
},
"schema": [
{
"id": "store name",
"type": "string",
"display": true,
"required": false,
"displayName": "store name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "discription",
"type": "string",
"display": true,
"required": false,
"displayName": "discription",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "image_url",
"type": "string",
"display": true,
"required": false,
"displayName": "image_url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "payment",
"type": "string",
"display": true,
"required": false,
"displayName": "payment",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "total",
"type": "string",
"display": true,
"required": false,
"displayName": "total",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1cG8U5EpRXKXkM3eN74byIhQBkmfF59mLgvDc3S2xT0s/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1cG8U5EpRXKXkM3eN74byIhQBkmfF59mLgvDc3S2xT0s",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1cG8U5EpRXKXkM3eN74byIhQBkmfF59mLgvDc3S2xT0s/edit?usp=drivesdk",
"cachedResultName": "Invoices"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "648037a1-c9f4-42ab-a0aa-72a4f10c2897",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1152,
384
],
"parameters": {
"text": "=Your job is to generate a short, clear invoice summary using the extracted fields.\nAlways include emojis for readability.\nAlways include the invoice image link.\nOutput should be plain text, not JSON.\n\nRequired fields:\n\n\ud83c\udfec Store Name\n\n\ud83d\udcdd Description of items\n\n\ud83d\udcb3 Payment Method\n\n\ud83d\udcb0 Total Amount\n\n\ud83d\udd17 Invoice Link\n\nExample Output 1:\n\ud83c\udfec Store: Berghotel Grosse Scheidegg\n\ud83d\udcdd Items: 2 Latte Macchiato, 1 Globi, 1 Schweinschnitzel, 1 K\u00e4sepl\u00e4ttli\n\ud83d\udcb3 Payment: Cash\n\ud83d\udcb0 Total: 54.50\n\ud83d\udd17 Link: https://example.com/invoice123.png\n\nExample Output 2:\n\ud83c\udfec Store: Big Bazaar\n\ud83d\udcdd Items: Rice, Detergent, Snacks\n\ud83d\udcb3 Payment: Card\n\ud83d\udcb0 Total: 1520.75\n\ud83d\udd17 Link: https://example.com/invoice123.png\n\nOutput Link:{{ $('Upload file').item.json.webViewLink }}\nActual Details:\nStore Name:{{ $json['store name'] }}\ndiscription: {{ $json.discription }}\ntotal:{{ $json.total }}\npayment: {{ $json.payment }}",
"options": {},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "2b68634e-c3b2-4c31-bd01-d5698b094cde",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1104,
560
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "f96dacaa-639f-41f3-87e8-5c81daabfbef",
"name": "Send message",
"type": "n8n-nodes-base.whatsApp",
"position": [
1504,
384
],
"parameters": {
"textBody": "={{ $json.output }}",
"operation": "send",
"phoneNumberId": "772721379258804",
"additionalFields": {},
"recipientPhoneNumber": "+1234567890"
},
"credentials": {
"whatsAppApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "28c0ac1c-b1f4-492e-adc4-9f4bf0530ed0",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
464,
-80
],
"parameters": {
"color": 4,
"width": 496,
"height": 208,
"content": "# \ud83e\uddfe WhatsApp Receipt Bot\n**Purpose:** Automates receipt handling via WhatsApp.\n**Flow:**\n1. \ud83d\udce5 User sends receipt\n2. \u2601\ufe0f Uploads to Google Drive\n3. \ud83d\udd0d Extracts store, items, payment, total\n4. \ud83d\udcca Sends back summary\n"
},
"typeVersion": 1
}
],
"connections": {
"Code": {
"main": [
[
{
"node": "Append row in sheet",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Send message",
"type": "main",
"index": 0
}
]
]
},
"Share file": {
"main": [
[
{
"node": "Download file",
"type": "main",
"index": 0
}
]
]
},
"Upload file": {
"main": [
[
{
"node": "Share file",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "Upload file",
"type": "main",
"index": 0
}
]
]
},
"Analyze image": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Download file": {
"main": [
[
{
"node": "Analyze image",
"type": "main",
"index": 0
}
]
]
},
"Download media": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"WhatsApp Trigger": {
"main": [
[
{
"node": "Download media",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Append row in sheet": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleDriveOAuth2ApigoogleSheetsOAuth2ApihttpHeaderAuthopenAiApiwhatsAppApiwhatsAppTriggerApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
🧾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.
Source: https://n8n.io/workflows/9285/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
🎯 Create viral TikToks, Shorts, Reels, podcasts, and ASMR videos in minutes — all on autopilot.
Generate AI viral videos with NanoBanana & VEO3, shared on socials via Blotato 2. Uses @blotato/n8n-nodes-blotato, googleSheets, lmChatOpenAi, toolThink. Event-driven trigger; 94 nodes.
Transform your salon/service business with this streamlined WhatsApp automation system featuring Claude integration, zero-setup database management, and intelligent conversation handling. Claude MCP I
This template is designed for marketers, content creators, and e-commerce brands who want to automate the creation of professional ad videos at scale. It’s ideal for teams looking to generate consiste
This automation is designed to help you generate AI-powered music tracks, cover art, and fully rendered music videos — all triggered from a simple Telegram chat and managed via Google Sheets.