Quick overview
This workflow runs daily to read chronic care vitals from Google Sheets, merge them into a per-patient record, score risk using AHA/ADA threshold rules, and notify clinicians via Telegram and Gmail when escalation is needed, while logging all results back to Google Sheets.
How it works
- Runs every 24 hours on a schedule trigger.
- Reads blood pressure, glucose, activity/sleep, and patient master data from Google Sheets.
- Merges the sheets into a single structured record per patient for the current day.
- Calculates a risk score and risk level (LOW–CRITICAL) by evaluating vitals against AHA/ADA guideline thresholds and detecting anomalies.
- If escalation is required, generates a clinical intervention plan, sends a Telegram alert to the doctor, sends an HTML escalation email via Gmail, and appends/updates the escalated result in the Google Sheets DailyLog.
- If escalation is not required, writes the routine result to the Google Sheets DailyLog and sends a routine status email via Gmail.
- If any workflow error occurs, posts an error alert to a designated Slack channel.
Setup
- Add Google Sheets OAuth2 credentials and update each Google Sheets node with your spreadsheet document ID and tab names (BloodPressure, Glucose, Activity, Patients/Patient Master, and DailyLog).
- Add Telegram Bot credentials and set the doctor’s chat ID in the Telegram alert message.
- Add Gmail OAuth2 credentials and replace the placeholder doctor email address used in the escalation and routine email nodes.
- Add Slack OAuth2 credentials and select the channel that should receive error notifications.
- Review the risk thresholds and intervention text in the code steps to match your clinic’s protocols, and adjust the schedule interval/time as needed.