See llms.txt for all machine-readable content.

Back to Templates

Send WhatsApp lead follow-ups and triage replies with Google Sheets and OpenAI

Quick overview

This workflow manages clinic lead follow-ups from Google Sheets by sending timed WhatsApp template nudges, triaging inbound WhatsApp replies with OpenAI, and alerting your team via Gmail with both a scheduled digest and instant reply notifications.

How it works

  1. Runs every hour (9am–6pm, Monday–Saturday) and also triggers instantly when a new WhatsApp message is received.
  2. On the hourly run, reads your Google Sheets enquiries tab and calculates the next action for each “New” lead based on received time, follow-up stage, WhatsApp consent, and mobile number validity.
  3. Sends either the first or final WhatsApp template nudge via WhatsApp Cloud API, or marks the lead as call-only, and records the outcome (including send failures) back to Google Sheets.
  4. Updates the sheet for each processed lead and emails a single Gmail digest summarizing who was nudged and which leads should be called.
  5. On an inbound WhatsApp reply, parses the message, matches it to the correct lead in Google Sheets by phone number, and uses an OpenAI chat model to extract intent, preferred call time, and a short summary.
  6. Saves the reply details and AI classification to Google Sheets, emails the team an immediate Gmail alert, and optionally sends the patient a thank-you message on WhatsApp.

Setup

  1. Connect credentials for Google Sheets, WhatsApp Cloud API (send messages), WhatsApp OAuth (receive webhook messages), Gmail, and OpenAI.
  2. Create and get approval for the WhatsApp Utility message templates enquiry_follow_up and enquiry_follow_up_final (English UK) in WhatsApp Manager.
  3. Prepare a Google Sheet containing at least Received at, Reference, Name, Mobile, WhatsApp consent, and Status, then set the sheet URL and tab name in the workflow’s Settings.
  4. Paste your WhatsApp phoneNumberId into the three WhatsApp send nodes (first nudge, final nudge, and thank-you) and ensure your default country code and timezone are correct.
  5. Configure the WhatsApp Trigger webhook in your Meta app (n8n must be publicly reachable via HTTPS) and set the team email address used for Gmail alerts and digests.

Requirements

  • Google Sheet of enquiries with the columns listed in Setup
  • WhatsApp Business Platform (Cloud API) number with two approved Utility templates
  • n8n reachable over HTTPS for the WhatsApp Trigger, plus your Meta app ID and secret
  • OpenAI API key (or another chat model) and a Gmail account

Customization

  • Change the nudge and cold timings, or turn off the patient thank-you, in Settings
  • Edit the reply categories or AI instructions in Understand the reply
  • Swap Gmail for Slack or Microsoft Teams, or OpenAI for another chat model

Additional info

Pairs with the free template "Send instant WhatsApp confirmations and log clinic enquiries with Sheets and Gmail", which logs every enquiry to the same sheet. Leads older than 4 days are never started, so switching this on doesn't message old enquiries.