# Deliver lab report status and PDFs via WhatsApp with OpenAI and Supabase

> 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 number to an authorized number stored with each report. How it works 1. Triggers when a new WhatsApp text message is received and ignores non-text or invalid messages. 2. Loads the sender’s recent session state from Supabase and uses OpenAI to classify intent (status check, send PDF, or general query), extract any Report ID or full patient name, and detect the reply language. 3. Validates and normalizes the identifier (Report ID or full patient name), optionally reusing a recently verified report context for short follow-ups, then looks up matching report records in Supabase. 4. Applies access control by verifying the incoming WhatsApp number matches the report’s stored authorizedwhatsapp value, and routes denied or ambiguous/miss

- **Domain**: `n8n-workflow-21382.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/21382
- Page (HTML): https://agenstry.com/agents/n8n-workflow-21382.n8n.io
- Documentation: https://n8n.io/workflows/21382
