On a schedule
Send WhatsApp messages to everyone in a sheet
Everyone marked pending in your sheet gets a personalised WhatsApp template message, and the sheet records whether it was sent.
- Runs
- On a schedule
- Apps
- Google Sheets, WhatsApp Business
- AI
- Not needed
- Access
- whatsapp_business_messaging; Sheet edit
Send this to your assistant
Create a ClickRuntime automation: every 15 minutes, send my approved WhatsApp template to each row in my Contacts sheet marked pending, filling in their name, and write the message ID and status back to the sheet.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A gym, a school or a local shop often needs to tell a few hundred people the same thing: a schedule change, an event, an order ready for collection. Sending each message by hand from a phone takes an afternoon and it's easy to miss someone.
Sending from a sheet means you prepare the list once, every person gets a message with their own name, and the sheet shows who was reached and who wasn't.
What you get out of it
Hundreds of messages without the afternoon
Mark the rows and they're sent within minutes. No copying and pasting on a phone.
Personal, not a broadcast
Each message includes the person's name and any details from their row.
A clear record
The sheet shows a message ID and status for every row. You know exactly who was reached.
Safe to re-run
Only rows marked pending are sent. Nobody gets the same message twice.
How it works
What happens, step by step
Every 15 minutes it reads your sheet and picks the rows marked pending.
Each person gets your approved WhatsApp template with their name filled in.
The message ID, or the reason it failed, is written back to that row.
Rows already sent are no longer pending, so they are never sent twice.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- Connect WhatsApp Business
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
- Run it at a different time, more or less often, or only on weekdays
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Google Sheets 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
from clickruntime import on_trigger, credentials, http, report_fetched
SHEET_ID = "your-spreadsheet-id"
WA = "https://graph.facebook.com/v20.0/your-phone-number-id/messages"
def wa_template(to, name, params):
body = {"messaging_product": "whatsapp", "to": to, "type": "template", "template": {"name": name, "language": {"code": "en"},
"components": [{"type": "body", "parameters": [{"type": "text", "text": str(p)} for p in params]}]}}
return http.post(WA, headers={"Authorization": f"Bearer {credentials.secret('WHATSAPP_TOKEN')}"}, json=body).json()
@on_trigger
def run(event):
vals = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets().values()
rows = vals.get(spreadsheetId=SHEET_ID, range="Contacts!A2:D").execute().get("values", [])
pending = [(i, r) for i, r in enumerate(rows, start=2) if len(r) > 2 and r[2] == "pending"]
report_fetched(len(pending))
if not pending:
return {"summary": "Nothing pending"}
for i, r in pending:
res = wa_template(r[1], "store_update", [r[0]])
status = ["sent", res["messages"][0]["id"]] if "messages" in res else ["failed", res.get("error", {}).get("message", "")]
vals.update(spreadsheetId=SHEET_ID, range=f"Contacts!C{i}:D{i}", valueInputOption="RAW", body={"values": [status]}).execute()
return {"sent": len(pending)}FAQ
Common questions
Does the template need approval?
Can I send to people who haven't opted in?
What happens if a number is wrong?
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
Get a WhatsApp alert when a sheet value crosses a limit
When a number you track in your sheet goes past its limit, you get one WhatsApp message about it.
See how it worksSend WhatsApp reminders on the dates in a sheet
People in your sheet get a WhatsApp reminder on the day you set, and the sheet marks it as sent.
See how it worksMonitor endpoints from a sheet with WhatsApp alerts
The addresses in your sheet are checked every 5 minutes, their status is written back, and you get a WhatsApp message when one fails or recovers.
See how it worksKeep exploring
Set up “Send WhatsApp messages to everyone in a sheet” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.