WhatsApp bot

Owner setup — users just message your WhatsApp number

WhatsApp scan bot

Anyone sends a photo of a bill, form or ID to your WhatsApp Business number and gets back what it is, a two-line summary and the dates and amounts that matter. Nothing is stored.

1. Add three secrets

Add these in Project Settings → Secrets. They stay on the server.

  • WHATSAPP_TOKEN

    Permanent access token from your Meta app (System user token with whatsapp_business_messaging).

  • WHATSAPP_PHONE_ID

    Phone number ID shown on the WhatsApp → API setup screen (not the phone number).

  • WHATSAPP_VERIFY_TOKEN

    Any string you choose. You paste the same string into Meta's webhook form.

Document reading uses the same GEMINI_API_KEY the app already uses. Without it the bot still replies, just without the summary.

2. Paste the webhook into Meta

In your Meta app: WhatsApp → Configuration → Edit webhook. Paste the callback URL and your verify token, then subscribe to the messages field.

Callback URL

https://scanpro-ai.lovable.app/api/public/whatsapp

3. Test the webhook

The bot never stores media or message text, and message bodies are never logged.