Quick overview
This workflow scores gym members’ churn risk using Google Sheets data, sends personalised WhatsApp win-back or renewal offers generated by OpenAI, creates follow-up tasks in ClickUp, and handles incoming WhatsApp replies by classifying intent, updating logs, and notifying staff.
How it works
- Runs every day at 7 AM to load gym settings plus member, check-in, and offer history data from Google Sheets.
- Calculates a churn-risk score per active member based on visit drop-off, days since last check-in, and membership expiry, then selects eligible members who are not opted out and not in a cooldown window.
- Uses OpenAI to generate a short personalised WhatsApp message (plus trainer call notes), then sends the offer via WhatsApp and creates a ClickUp follow-up task for the assigned trainer.
- Appends each outreach attempt to the Google Sheets “Offer Log” to track the offer code, send status, and cooldown timing.
- Builds daily WhatsApp digests for the owner and each trainer from the scoring summary, sends them via WhatsApp, and appends a daily snapshot to the Google Sheets “Retention Daily” tab.
- Triggers on incoming WhatsApp messages, looks up the member and latest offer in Google Sheets, then uses OpenAI to classify intent (accept, freeze, callback, stop, or question/other) and draft a reply.
- Updates Google Sheets (offer status and/or member opt-out), creates the appropriate ClickUp task for renewals or callbacks, replies to the member on WhatsApp, and notifies the trainer or front desk when staff follow-up is needed.
Setup
- Create a Google Sheet with tabs named “Members”, “Checkins”, “Offer Log”, and “Retention Daily”, then replace REPLACE_WITH_GOOGLE_SHEET_ID in all Google Sheets nodes.
- Set up credentials for Google Sheets, OpenAI, WhatsApp Business Cloud, and ClickUp in n8n.
- Replace placeholders for WhatsApp Phone Number ID and owner/front desk numbers, and set your ClickUp team/space/list IDs.
- Update the built-in configuration values (gym name, timezone, renewal link, thresholds, cooldown days, and offer definitions) to match your gym’s policies.
- Ensure your “Members” sheet includes the fields used for scoring and routing (member_id, status, phone, join_date, expiry_date, plan/plan_price, trainer_name/trainer_phone, language, opted_out), and test both the scheduled run and the WhatsApp reply trigger before activating.