Quick overview
This workflow watches for new rows in Google Sheets, validates and normalizes phone numbers, sends a WhatsApp template message through the Ominiflow Cloud API, and writes delivery results (Sent, API error, or invalid phone) back to the sheet with a timestamp.
How it works
- Triggers every minute when a new row is added to a selected Google Sheets sheet.
- Skips rows that already have a Status value of “Sent” to prevent duplicate WhatsApp messages.
- Cleans the Phone field into digits-only format, checks it is 10–15 digits, and maps template variables like name and reference ID.
- If the phone number is invalid, updates the matching row in Google Sheets with a failed status and a Sent_At timestamp.
- If the phone number is valid, sends a Meta WhatsApp template message via the Ominiflow API using the cleaned phone number and mapped variables.
- Checks the HTTP response status code and updates Google Sheets with either “Sent” or “Failed: API Error” plus the Sent_At timestamp.
Setup
- Connect Google Sheets credentials, then select the target spreadsheet (documentId) and sheet tab (sheetName) in the trigger and all update steps.
- Add your Ominiflow API token and set the approved WhatsApp template_name (and language/components) in the Ominiflow HTTP request step.
- Ensure your Google Sheet includes columns that match the workflow’s mapping (at minimum Phone, Status, and Sent_At, plus optional Name and Reference_ID/Order_ID) and that Phone values are unique if you rely on matching by Phone during updates.