{"product_id":"whatsapp-lab-report-status-automation-with-openai-supabase","title":"WhatsApp Lab Report Status Automation with OpenAI \u0026 Supabase","description":"\u003ch3\u003eLet patients check WhatsApp lab report status (and get the PDF) with OpenAI + Supabase—fully automated\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow connects \u003cstrong\u003eWhatsApp Business Cloud\u003c\/strong\u003e with \u003cstrong\u003eOpenAI\u003c\/strong\u003e and \u003cstrong\u003eSupabase\/PostgreSQL\u003c\/strong\u003e to let patients request lab report status or receive a ready report PDF in \u003cstrong\u003eEnglish, Urdu, or Roman Urdu\u003c\/strong\u003e. It also enforces access control by matching the sender’s WhatsApp number to an authorized number stored with each report.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives WhatsApp text messages\u003c\/strong\u003e and ignores non-text or invalid messages.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLoads session context from Supabase\u003c\/strong\u003e, then uses \u003cstrong\u003eOpenAI\u003c\/strong\u003e to classify intent (status check, send PDF, or general query), extract a \u003cstrong\u003eReport ID\u003c\/strong\u003e or \u003cstrong\u003efull patient name\u003c\/strong\u003e, and detect reply language.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNormalizes identifiers\u003c\/strong\u003e and can reuse recently verified report context for short follow-ups.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLooks up matching report records in Supabase\u003c\/strong\u003e and applies \u003cstrong\u003eaccess control\u003c\/strong\u003e by verifying the incoming WhatsApp number matches \u003cstrong\u003eauthorized_whatsapp\u003c\/strong\u003e on the report.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eStatus check reply:\u003c\/strong\u003e responds with “ready” or “pending” based on the report_status field.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePDF delivery:\u003c\/strong\u003e when authorized and the report is ready, validates the PDF URL host, downloads the PDF over HTTPS, and sends it back to the same WhatsApp number as a document.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGeneral questions:\u003c\/strong\u003e uses OpenAI with \u003cstrong\u003ePostgreSQL chat memory\u003c\/strong\u003e to draft a short WhatsApp reply in the user’s language.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eA clinic patient messages their \u003cstrong\u003eReport ID\u003c\/strong\u003e and receives \u003cstrong\u003eready\/pending\u003c\/strong\u003e status instantly on WhatsApp.\u003c\/li\u003e\n  \u003cli\u003eA patient requests the \u003cstrong\u003ePDF report\u003c\/strong\u003e once it’s available, with access restricted to their authorized WhatsApp number.\u003c\/li\u003e\n  \u003cli\u003ePatients ask follow-up questions; the workflow responds in \u003cstrong\u003eEnglish, Urdu, or Roman Urdu\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWhatsApp Business Cloud\u003c\/strong\u003e trigger for new text messages\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSupabase\u003c\/strong\u003e for session state and report lookup (backed by \u003cstrong\u003ePostgreSQL\u003c\/strong\u003e)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOpenAI\u003c\/strong\u003e for intent classification, identifier extraction, and language detection\u003c\/li\u003e\n  \u003cli\u003en8n nodes\/logic: \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003eset\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, \u003cstrong\u003eswitch\u003c\/strong\u003e, \u003cstrong\u003epostgres\u003c\/strong\u003e, \u003cstrong\u003esupabase\u003c\/strong\u003e\n\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003ePerfect for n8n users, automation engineers, and SaaS operators building a secure WhatsApp lab status automation with OpenAI + Supabase.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46289330176179,"sku":"N8N-21382","price":42.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/ei9iVd1Rh4C_P9HhATVLl_MsZgOP5f.png?v=1793006990","url":"https:\/\/buyflowscripts.com\/products\/whatsapp-lab-report-status-automation-with-openai-supabase","provider":"N8N Commerce","version":"1.0","type":"link"}