I'm creating a clinic management system using React with self-hosted Supabase compliant with GDPR (in Italy). Our patients prefer communicating exclusively via WhatsApp (using the clinic's number), but we need a way for our operators to view and manage those chats within each patient's dashboard.
The challenge is that the WhatsApp Business API involves extensive development, including dealing with message templates, navigating the 24-hour messaging window, and managing media files. While Meta does offer message templates for reaching out beyond the 24-hour window, it still requires setting up and managing templates and approvals, which adds to the complexity. Plus, unofficial APIs pose risks like account bans.
I would like to steer clear of integrating extensive messaging logic directly into the app, focusing instead on handling patient data. Additionally, the 24-hour messaging restriction is problematic because there could be instances where an operator needs to send information to a patient ahead of an appointment, even if the patient hasn't messaged recently.
My goal is for a patient to send a message via WhatsApp and have those messages logged in their patient record within the app. Operators should then be able to reply and assist the patient directly from their chat in the patient's profile. Ideally, embedding WhatsApp Web would be the solution, but we know this isn't feasible due to CORS restrictions.
Is there a way to handle this integration without having to start from scratch while still allowing patients to communicate only through WhatsApp? I'm open to suggestions for SaaS tools, self-hosted solutions, or architectural ideas.
2 Answers
Twilio sounds like an option, but I've heard it can get pretty pricy. Can anyone share their experiences with the costs involved, especially related to patient support for appointments or consultations?
Consider using messaging aggregators like Twilio, Sinch, or Bandwidth. They offer easy-to-use APIs for handling WhatsApp and SMS, meaning you can make simple REST calls without too much hassle. Just be aware that they charge per message, and you still have to follow the messaging rules of each platform.

Related Questions
How to Build a Custom GPT Journalist That Posts Directly to WordPress
Cloudflare Origin SSL Certificate Setup Guide
How To Effectively Monetize A Site With Ads