Skip to main content

Multi-Agent AI Clinic Management with WhatsApp, Telegram, and Google Calendar

Workflow preview

Workflow preview
100%
Multi-Agent AI Clinic Management with WhatsApp, Telegram, and Google Calendar preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Healthcare Clinic Assistant with WhatsApp and Telegram Integration Version: 1.1.0 n8n Version: 1.88.0+ License: MIT Description A comprehensive and modular automation workflow designed for healt...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.googletaskstool, @n8n/n8n-nodes-langchain.mcpclienttool, n8n-nodes-base.telegramtrigger, @n8n/n8n-nodes-langchain.memorypostgreschat, n8n-nodes-base.telegramtool, n8n-nodes-base.scheduletrigger

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Multi-Agent AI Clinic Management with WhatsApp, Telegram, and Google Calendar
Workflow name
Multi-Agent AI Clinic Management with WhatsApp, Telegram, and Google Calendar

Healthcare Clinic Assistant with WhatsApp and Telegram Integration

Version: 1.1.0
n8n Version: 1.88.0+
License: MIT


📋 Description

A comprehensive and modular automation workflow designed for healthcare clinics.
It manages patient communication, appointment scheduling, confirmations, rescheduling, internal tasks, and media processing by integrating WhatsApp, Telegram, Google Calendar, and Google Tasks, combined with AI-powered agents for maximum efficiency.

This system guarantees proactive communication with patients, streamlined internal clinic management, and consistent data synchronization across platforms.


🌟 Key Features

  • 🤖 AI-Powered Specialized Agents:
    Distinct agents handle WhatsApp patient support, appointment confirmations, and internal rescheduling tasks.

  • 📱 Omnichannel Communication:
    Handles patient interactions via WhatsApp and staff commands via Telegram.

  • 📅 Google Calendar Appointment Management:
    Full synchronization for creating, updating, canceling, and confirming appointments.

  • 📋 Task Management with Google Tasks:
    Manages shopping lists and administrative tasks efficiently through staff Telegram requests.

  • 🔔 Automated Appointment Reminders:
    Daily-triggered system proactively sends WhatsApp confirmations to patients for next-day appointments.

  • 🖼️ Intelligent Media Processing:
    Transcribes audios, extracts text from images, and processes documents using OpenAI and OpenRouter AI models.

  • 🛡️ Escalation to Human Support:
    Automatically detects sensitive or urgent cases and escalates them to a human agent when needed.


🏥 Use Cases

  • Patient Communication:
    Respond to inquiries, schedule, reschedule, and confirm appointments seamlessly via WhatsApp.

  • Internal Clinic Operations:
    Allow staff to modify appointments or add shopping list reminders directly from Telegram.

  • Appointment Confirmation System:
    Automatically contacts patients one day prior to appointments for confirmation or rescheduling.

  • Task and Reminder Management:
    Keeps clinic operations organized through automatic task management with Google Tasks.


🛠️ Technical Implementation

WhatsApp Patient Interaction Flow

  • Webhook Reception: Incoming WhatsApp messages captured via Evolution API webhook.
  • Message Classification: Intelligent routing of messages based on content type (text, image, audio, document).
  • Media Content Processing:
    • Audios: Download, convert, and transcribe via OpenAI Whisper.
    • Images: Analyze and extract text/descriptions with OpenAI Vision model.
  • Patient Request Handling: Specialized WhatsApp assistant responds appropriately using AI prompts.
  • Outbound Message Formatting: Ensures messages comply with WhatsApp format standards.
  • Message Delivery: Sends responses back via Evolution API.

Telegram Staff Management Flow

  • Telegram Webhook Reception: Captures messages from authorized staff accounts.
  • Internal Assistant Processing:
    • Appointment Rescheduling: Identifies and updates appointments through MCP Google Calendar.
    • Task Creation: Adds new entries to the clinic's shopping list using Google Tasks.
  • Notifications and Confirmations: Sends confirmations back to staff through Telegram.

Appointment Reminder System

  • Daily Trigger Activation: Fires every weekday at 08:00 AM.
  • Calendar Scraping: Lists next day's appointments from Google Calendar.
  • Patient Contact: Sends WhatsApp confirmation messages for each appointment.
  • Response Management: Redirects confirmation or rescheduling replies to appropriate agents.

⚙️ Setup Instructions

  1. Import the Workflow
    n8n → Workflows → Import from File → Upload this JSON file.

  2. Configure Credentials

    • Evolution API (WhatsApp Communication)
    • Telegram Bot API (Staff Communication)
    • Google Calendar OAuth2 (Appointment Management)
    • Google Tasks OAuth2 (Task Management)
    • OpenAI and OpenRouter APIs (AI Agents)
    • PostgreSQL Database (Chat Memory)
  3. Set Sensitive Variables

    • Replace placeholder values:
      • {sua instância aqui} → Evolution API instance name
      • {número_whatsapp} → WhatsApp numbers
      • {url_do_servidor} → Server URLs
      • {a sua apikey aqui} → API keys
      • {seu_calendario} → Google Calendar ID
  4. Customize AI Prompts

    • Adjust system prompts to fit your clinic’s tone, service style, and patient communication guidelines.
    • Set clinic operating hours, escalation rules, and cancellation procedures in AI prompts.
  5. Activate and Test

    • Simulate patient messages via WhatsApp.
    • Test Telegram commands from staff members.
    • Validate daily appointment reminders using the scheduled trigger.

🏷️ Tags

Healthcare Clinic Management WhatsApp Integration Telegram Bot Appointment Scheduling Google Calendar Google Tasks AI Agents n8n Automation


📚 Technical Notes

  • PostgreSQL is used for persistent chat memory across sessions.
  • Multiple AI Models Used:
    • OpenAI GPT-4.1-nano
    • OpenAI GPT-4.1-mini
    • Google Gemini 2.0 and 2.5
  • Full media content processing supported (audio, image, text).
  • Compliant escalation workflows ensure patient safety and proper handoff to human staff when necessary.
  • All sensitive patient data are securely stored inside calendar event descriptions for easy retrieval by agents.

📜 License

This workflow is provided under the MIT License.
Feel free to adapt and customize it for your clinic’s specific needs.

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 - OpenAI Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 2 - Assistente clinica interno

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 3 - Google Tasks

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

Block 4 - MCP Google Calendar

Type / Role
@n8n/n8n-nodes-langchain.mcpClientTool - mcpClientTool
Config choices
Version 1

Block 5 - Receber Mensagem Telegram

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 6 - Postgres Chat Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryPostgresChat - memoryPostgresChat
Config choices
Version 1.3

Block 7 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 8 - Assistente Clínica

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 9 - Enviar alerta de cancelamento

Type / Role
n8n-nodes-base.telegramTool - telegramTool
Config choices
Version 1.2

Block 10 - Gatilho diário

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

Block 11 - Assistente de confirmação

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 12 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 13 - Sticky Note

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

Block 14 - Sticky Note2

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

Block 15 - Sticky Note3

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

Block 16 - Postgres Chat Memory1

Type / Role
@n8n/n8n-nodes-langchain.memoryPostgresChat - memoryPostgresChat
Config choices
Version 1.3

Block 17 - MCP Google Calendar2

Type / Role
@n8n/n8n-nodes-langchain.mcpClientTool - mcpClientTool
Config choices
Version 1

Block 18 - MCP GMAIL

Type / Role
@n8n/n8n-nodes-langchain.mcpClientTool - mcpClientTool
Config choices
Version 1

Block 19 - MCP CALENDAR

Type / Role
@n8n/n8n-nodes-langchain.mcpClientTool - mcpClientTool
Config choices
Version 1

Block 20 - Telegram

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 21 - OpenRouter Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 22 - Webhook1

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

Block 23 - Edit Fields1

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 24 - Switch

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

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

3. Summary Table

Workflow Multi-Agent AI Clinic Management with WhatsApp, Telegram, and Google Calendar
Complexity advanced
Nodes 38
Categories Support Chatbot, AI Chatbot
Author Luciano Gutierrez
Published 24 Apr 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3694/3694.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 Multi-Agent AI Clinic Management with WhatsApp, Telegram, and Google Calendar do?

Healthcare Clinic Assistant with WhatsApp and Telegram Integration Version: 1.1.0 n8n Version: 1.88.0+ License: MIT Description A comprehensive and modular automation workflow designed for healt...

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 Support Chatbot, AI Chatbot use case.