Deliver lab report status and PDFs via WhatsApp with OpenAI and Supabase
Ready for 3.0What this workflow does
This AI workflow has 37 nodes and runs on WhatsApp events. Along the way it connects WhatsApp Business Cloud, Supabase, Postgres Chat Memory and OpenAI Chat Model and 1 more.
How it runs
Trigger: On WhatsApp events.
- Normalize Input (Edit Fields (Set)): sets or maps fields
- Validate Incoming Text (Code): runs custom JavaScript code
- Load Request State (Supabase): uses Supabase
- Lab Assistant AI Agent (AI Agent): runs an AI agent, with model: Check Intent; memory: Lab Chat Memory
- Prepare Agent Output (Edit Fields (Set)): sets or maps fields
- Validate Report Identifier (Code): runs custom JavaScript code
- Intent Router (Switch): routes items into branches
- Report Identifier Router (Switch): routes items into branches
- Human Reply Agent (AI Agent): runs an AI agent, with model: Query Response; memory: Query_Chat_History
- Find Lab Report (Supabase): uses Supabase
…plus 20 more steps. See the full node list below.
Services it uses
Other OpenAI + PostgreSQL templates (191) · Other OpenAI + Supabase templates (149) · Other WhatsApp + OpenAI templates (104)
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (12)
- WhatsApp Trigger
n8n-nodes-base.whatsAppTrigger - Edit Fields (Set)
n8n-nodes-base.set - AI Agent
@n8n/n8n-nodes-langchain.agent - Supabase
n8n-nodes-base.supabase - Switch
n8n-nodes-base.switch - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - WhatsApp Business Cloud
n8n-nodes-base.whatsApp - Postgres Chat Memory
@n8n/n8n-nodes-langchain.memoryPostgresChat - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Code
n8n-nodes-base.code - Postgres
n8n-nodes-base.postgres
From the author
Quick overview This workflow uses WhatsApp Business Cloud, OpenAI, Supabase, and PostgreSQL to let patients check lab report status or receive a ready report PDF in English, Urdu, or Roman Urdu, while enforcing access control by matching the sender’s WhatsApp…