See llms.txt for all machine-readable content.

Back to Templates

Track fitness class attendance and retention with Google Sheets, GPT-4o, Gmail, and Discord

Last update

Last update 2 days ago

Categories

Share


Quick Overview

This workflow captures fitness class check-ins via a webhook, looks up members in Google Sheets, uses OpenAI to classify engagement and draft a short message, logs attendance back to Google Sheets, emails members via Gmail, and sends Discord alerts plus a weekly AI-written retention report.

How it works

  1. Receives a POST webhook check-in event with member_id, class_name, status, and optional notes.
  2. Normalizes the payload, rejects missing required fields, and sends a Discord alert plus a Gmail email to the studio address for invalid entries.
  3. Reads the MemberRoster tab in Google Sheets, matches the check-in by member_id, and alerts on Discord plus emails the studio address if the member is not found.
  4. Sends the matched member and check-in context to an OpenAI-powered agent to label engagement (at_risk/new/engaged) and generate a short personalized message.
  5. Appends the check-in, engagement label, and generated message to the AttendanceLog tab in Google Sheets.
  6. Emails the generated message to the member via Gmail and posts a Discord retention alert when the member is flagged as needing attention (for example, a no-show).
  7. Runs every Monday morning, computes weekly attendance and churn-risk stats from Google Sheets, uses OpenAI to write a short digest, then emails the report via Gmail and posts it to Discord.

Setup

  1. Create a Google Sheets spreadsheet with MemberRoster and AttendanceLog tabs and ensure the columns used in the workflow (for example member_id, member_name, member_email, membership, join_date, checkin_date, status) exist.
  2. Add Google Sheets OAuth2 credentials and update the spreadsheet document ID and sheet names if you are not using the provided ones.
  3. Add an OpenAI API credential (ChatGPT model) for the engagement message and weekly insight agent steps.
  4. Add Gmail OAuth2 credentials and update the studio/manager email recipients and member email handling as needed.
  5. Add Discord bot credentials and set the target server (guild) and channel IDs for invalid, unknown-member, retention alerts, and weekly report posts.
  6. Copy the webhook URL for /fitness/checkin and configure your front desk or check-in system to POST events to it.