WhatsApp Quote Bot An official WhatsApp bot that builds an Arabic PDF quotation inside the chat (WhatsApp Cloud API)
It asks for area and finish level, then sends a correctly shaped Arabic PDF quote in the chat.
- 3
- calls to send a file
- 100%
- correctly shaped Arabic
- 1
- chat to a quote
- API
- official Meta API
The problem
Two things people underestimate that break projects in production: Arabic PDFs that come out disconnected and reversed, and sending a file on Cloud API taking three calls, not one.
Overview
A bot on Meta’s official WhatsApp Cloud API. It speaks Egyptian Arabic, asks for the area and finish level, then builds an Arabic PDF quotation and sends it in the same chat.
What I built
- Every string passes through arabic_reshaper then bidi before drawing, with an Arabic font embedded in the document
- The full delivery sequence: message, upload media, send document
- Per-conversation memory keyed by phone number, so a customer returning an hour later does not repeat themselves
- The prompt forbids the model from calculating; the code does the maths
The engineering call
The Arabic PDF problem costs days when discovered after delivery. Every string goes through shaping and direction before drawing, which is what makes the file fit to send to a real customer.