Skip to main content

Track medicine adherence and monitor patients with Google Sheets, OpenAI and Slack

Workflow preview

Workflow preview
100%
Track medicine adherence and monitor patients with Google Sheets, OpenAI and Slack preview
Open on n8n.io

1. Workflow Overview

AI Powered Medicine Reminder & Patient Monitoring Workflow (n8n + Google Sheets + OpenAI + Slack) This workflow automates medicine reminders, tracks patient responses and alerts doctors in criti...

Best for

  • Ticket Management automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.googlesheets, n8n-nodes-base.if, n8n-nodes-base.slack, n8n-nodes-base.webhook, n8n-nodes-base.openai, n8n-nodes-base.code, n8n-nodes-base.switch

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by WeblineIndia.

Original n8n.io source

1.1 Workflow description

Title
Track medicine adherence and monitor patients with Google Sheets, OpenAI and Slack
Workflow name
Track medicine adherence and monitor patients with Google Sheets, OpenAI and Slack

🩺 AI-Powered Medicine Reminder & Patient Monitoring Workflow

(n8n + Google Sheets + OpenAI + Slack)


This workflow automates medicine reminders, tracks patient responses and alerts doctors in critical situations using n8n, Google Sheets, OpenAI and Slack.

Quick Implementation Steps

  • Connect your Google Sheets with patient data
  • Set up Slack (or replace with Gmail/SMS nodes)
  • Configure Webhook to receive patient replies
  • Add your OpenAI API key
  • Define reminder times in HH:mm format
  • Activate the workflow scheduler

đź’ˇ You can replace Slack with Email (Gmail) or SMS APIs like Twilio.

What It Does

This workflow automates the entire lifecycle of patient medicine adherence tracking. It periodically checks patient records and sends reminders when it's time to take medicine.

When a patient responds, the system captures the reply via webhook and uses AI to classify the response into categories such as taken, not taken, delayed or unclear. It then updates patient records and tracks missed doses.

If a patient repeatedly misses medication or shows signs of distress, the system flags it as critical and alerts the doctor immediately through a separate channel.

Who’s It For

  • Healthcare providers and clinics
  • Telemedicine platforms
  • Caregivers managing patients
  • Health-tech startups
  • Remote monitoring systems

Requirements

  • n8n (cloud or self-hosted)
  • Google Sheets account
  • Slack account (or Email/SMS alternative)
  • OpenAI API key
  • Google Sheet with following columns
  • Name
  • Phone
  • Medicine
  • Reminder Time
  • Last Response
  • Last Patient Message
  • Status
  • Missed_Count

⚠️ Reminder Time must be in 24-hour format (HH:mm) Example: 08:30, 14:45, 21:00

Webhook Input Format

Your system must send patient replies in this format:

{
 "phone": "string",
 "message": "string"
}

How It Works

1. Scheduler Trigger

  • Runs every minute
  • Checks all patient records

2. Fetch Patient Records

  • Reads all rows from Google Sheets

3. Match Reminder Time

  • Compares current time with patient’s reminder time

4. Send Reminder

  • Sends message via Slack (or Email/SMS alternative)

5. Receive Patient Response

  • Webhook captures incoming responses

6. AI Classification

Classifies response into:

  • TAKEN
  • NOT_TAKEN
  • LATER
  • CONFUSED

Also detects critical conditions

7. Parse Output

  • Ensures valid JSON format

8. Match Patient

  • Matches phone number with Google Sheet

9. Update Missed Count

  • NOT_TAKEN → +1
  • LATER → +1
  • TAKEN → reset to 0

10. Check Critical Condition

Triggered when:

  • is_critical = true
  • OR
  • Missed_Count >= 3 (configurable)

11. Critical Flow

  • Update status to CRITICAL
  • Alert doctor via separate channel

12. Normal Flow

  • Update patient record
  • Send response:
  • NOT_TAKEN → Reminder
  • LATER → Gentle follow-up
  • TAKEN → Appreciation

Customization

Replace Slack

You can replace Slack nodes with:

  • Gmail (Email)
  • Twilio (SMS)
  • WhatsApp API

Modify AI Logic

  • Edit OpenAI prompt
  • Add new classifications
  • Customize responses

Change Reminder Logic

  • Adjust scheduler frequency
  • Add timezone handling

Adjust Critical Threshold

  • Change Missed_Count >= 3 to any value based on your needs

Add-ons

  • WhatsApp integration
  • Dashboard for tracking
  • Push notifications
  • Database logging
  • AI health insights
  • Doctor reports

Use Cases

  • Chronic disease monitoring
  • Elderly care
  • Post-surgery tracking
  • Clinical trials
  • Remote patient monitoring

Troubleshooting

Issue Possible Cause Solution
Reminder not sent Time mismatch Use HH:mm format
Patient not matched Phone mismatch Ensure same format
AI parsing error Invalid JSON Check parsing node
Missed count issue Wrong classification Verify AI output
Webhook not working Wrong endpoint Check URL
Slack not sending Credentials issue Reconnect Slack
Critical not triggered Condition issue Adjust threshold

Need Help?

If you need help with:

  • Setup or deployment
  • Email / SMS / WhatsApp integration
  • Dashboard or analytics
  • Custom AI enhancements

👉 Feel free to Contact WeblineIndia for custom workflow development and automation solutions.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Trigger: Check Reminder Schedule

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1

Block 2 - Fetch Patient Records

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

Block 3 - Match Reminder Time

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 4 - Send Medicine Reminder

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 1

Block 5 - Receive Patient Response

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 1

Block 6 - AI Response Classification

Type / Role
n8n-nodes-base.openAi - openAi
Config choices
Version 1

Block 7 - Parse & Normalize AI Output

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - Load Patient Data

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 9 - Match Patient by Phone

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 10 - Update Missed Count

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Check Critical Condition

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 12 - Update Critical Status

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 13 - Update Patient Record

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 14 - Route Based on Response

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.3

Block 15 - Notify Missed Dose

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.3

Block 16 - Reminder for Later

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.3

Block 17 - Acknowledge Compliance

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.3

Block 18 - Alert Doctor (Critical Case)

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.3

Block 19 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 27 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Track medicine adherence and monitor patients with Google Sheets, OpenAI and Slack
Complexity advanced
Nodes 27
Categories Ticket Management, AI Chatbot
Author WeblineIndia
Published 07 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/14860/14860.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Track medicine adherence and monitor patients with Google Sheets, OpenAI and Slack do?

AI Powered Medicine Reminder & Patient Monitoring Workflow (n8n + Google Sheets + OpenAI + Slack) This workflow automates medicine reminders, tracks patient responses and alerts doctors in criti...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Ticket Management, AI Chatbot use case.