Send prescription PDFs to patients via WhatsApp with Google Gemini and Supabase
Ready for 3.0What this workflow does
This AI workflow has 13 nodes and runs on WhatsApp events (messages). Along the way it connects Google Gemini Chat Model, WhatsApp Business Cloud and Supabase.
How it runs
Trigger: On WhatsApp events (messages).
- Set Configuration (Edit Fields (Set)): sets 10 fields: clinic_name, staff_notify_number, whatsapp_phone_number_id…
- Extract Prescription Details (Basic LLM Chain): sends a prompt to an LLM, with model: Gemini Chat Model; output parser: Prescription Data Parser
- Are Required Fields Complete? (If): checks a condition and branches into true / false
- Build PDF HTML (Edit Fields (Set)): sets 1 field: prescription_html
- Notify Staff - Needs Review (WhatsApp Business Cloud): send
- Generate Prescription PDF (HTTP Request): calls an HTTP API (POST)
- Log Needs Review (Supabase): insert
- Upload PDF to Public URL (HTTP Request): calls an HTTP API (POST)
- Send Prescription PDF to Patient (WhatsApp Business Cloud): send
- Log Prescription Sent (Supabase): insert
Services it uses
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 (9)
- Edit Fields (Set)
n8n-nodes-base.set - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - If
n8n-nodes-base.if - WhatsApp Business Cloud
n8n-nodes-base.whatsApp - Supabase
n8n-nodes-base.supabase - HTTP Request
n8n-nodes-base.httpRequest - WhatsApp Trigger
n8n-nodes-base.whatsAppTrigger
From the author
Quick overview This workflow listens for incoming WhatsApp messages from clinic staff, uses Google Gemini to extract prescription details, generates a prescription PDF via an HTML-to-PDF API, uploads it to a public URL, sends the document back over WhatsApp,…