The moment it happens
Save photos, receipts and voice notes from WhatsApp to Drive
Anything you send to your WhatsApp business number is filed in Google Drive, receipts get their details pulled out, and you get a confirmation.
- Runs
- The moment it happens
- Apps
- Google Drive, WhatsApp Business
- AI
- Yes, uses the built-in AI allowance
- Access
- WhatsApp messaging; Drive write
Send this to your assistant
Create a ClickRuntime automation: when I send a photo, document or voice note to my WhatsApp business number, save it to my Drive Inbox folder, read the details if it's a receipt, and reply to confirm.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Tradespeople, field staff and busy owners capture a lot on their phone: photos of finished jobs, receipts, quick voice memos. Those files stay in WhatsApp, mixed with personal chats, and are hard to find later.
Sending them to your business number and having them filed in Drive keeps work media together and backed up, with receipt details read out so expenses are easier to log.
What you get out of it
Work files out of your chats
Photos and notes go to Drive instead of getting lost in WhatsApp.
Receipts made useful
The supplier, date and amount are read from receipt photos.
Confirmation every time
A reply tells you the file was saved.
Backed up
Files in Drive are safe even if you lose your phone.
How it works
What happens, step by step
You send a photo, document or voice note to your WhatsApp business number.
The file is downloaded and saved to your Drive Inbox folder.
If it's an image, AI checks whether it's a receipt and reads the supplier, date and total.
You get a WhatsApp reply confirming it was saved, with the receipt details if found.
Before it runs live
- Connect Google Drive
- Connect WhatsApp Business
- Paste your automation's link into the other app's webhook settings
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other Google Drive and WhatsApp Business steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
import base64, io
from googleapiclient.http import MediaIoBaseUpload
from clickruntime import on_event, credentials, http, ai
FOLDER_ID = "your-folder-id"
WA = "https://graph.facebook.com/v20.0/your-phone-number-id/messages"
def wa(to, text):
http.post(WA, headers={"Authorization": f"Bearer {credentials.secret('WHATSAPP_TOKEN')}"},
json={"messaging_product": "whatsapp", "to": to, "type": "text", "text": {"body": text}}).raise_for_status()
@on_event
def handle(event):
h = {"Authorization": f"Bearer {credentials.secret('WHATSAPP_TOKEN')}"}
msgs = [m for e in (event.json or {}).get("entry", []) for c in e["changes"] for m in c["value"].get("messages", [])]
drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
for m in (m for m in msgs if m["type"] in ("image", "document", "audio")):
media = m[m["type"]]
info = http.get(f"https://graph.facebook.com/v20.0/{media['id']}", headers=h).json()
data = http.get(info["url"], headers=h).content
note = ""
if m["type"] == "image":
note = ai.generate(["If this is a receipt, give supplier, date and total in one line; otherwise reply NONE.",
base64.b64encode(data).decode()[:30000]], max_output_tokens=60).text.strip()
name = media.get("filename") or f"{m['type']}-{m['id'][-8:]}.{info['mime_type'].split('/')[-1].split(';')[0]}"
drive.files().create(body={"name": name, "parents": [FOLDER_ID], "description": note},
media_body=MediaIoBaseUpload(io.BytesIO(data), mimetype=info["mime_type"])).execute()
wa(m["from"], f"Saved {name} to Drive." + (f" {note}" if note and note != "NONE" else ""))
return {"saved": len(msgs)}FAQ
Common questions
Which file types work?
How are receipts recognised?
Can staff use it too?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Answer WhatsApp questions from your Google Drive documents
Customers ask questions on WhatsApp and get answers drawn from the FAQ and policy documents in your Drive folder.
See how it worksSend finished files from Drive to people on WhatsApp
When a file named with a phone number lands in your Drive Outbox folder, it's sent to that person on WhatsApp and moved to Sent.
See how it worksGet error alerts with a plain-English explanation
When one of your jobs or systems fails, #ops gets the error and a one-line guess at the cause, without the same error twice in an hour.
See how it worksKeep exploring
Set up “Save photos, receipts and voice notes from WhatsApp to Drive” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.