Detect at-risk gym clients with Supabase, Gemini, Slack, Gmail, and Sheets
Ready for 3.0What this workflow does
This AI workflow has 17 nodes and runs on a schedule (every day). Along the way it connects Supabase, Slack, Gmail and Google Sheets and 1 more.
How it runs
Trigger: On a schedule (every day).
- Load Active Clients from Supabase (Supabase): get
- Load Checkins from Supabase (Supabase): get many
- Load Weekly Forms from Supabase (Supabase): get many
- Merge: merges the data from its input branches
- Calculate Client Risk Metrics (Code): runs custom JavaScript code
- High Risk Clients (If): checks a condition and branches into true / false
- Check Duplicate Alert Window (If): checks a condition and branches into true / false
- Prepare Alert and AI Input Payload (Edit Fields (Set)): sets 6 fields: alert_title, coach_slack_text, client_email_subject_seed…
- Generate Re Engagement Draft with Gemini (Google Gemini): uses Google Gemini
- Parse Draft Response (Code): runs custom JavaScript code
…plus 6 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other Google Sheets + Slack templates (1,314) · Other Gmail + Slack templates (957)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (10)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Supabase
n8n-nodes-base.supabase - Merge
n8n-nodes-base.merge - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack - Gmail
n8n-nodes-base.gmail - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - Edit Fields (Set)
n8n-nodes-base.set - Google Gemini
@n8n/n8n-nodes-langchain.googleGemini
From the author
Quick overview This workflow runs on a daily schedule to detect at-risk gym clients using Supabase activity data, drafts a re-engagement email with Google Gemini, notifies coaches in Slack, emails clients via Gmail, and logs and syncs alert state to Supabase…