WhatsApp integration for Frappe/ERPNext using Evolution API.
- Evolution API based sending (text and media)
- Multiple WhatsApp accounts with default incoming/outgoing selection
- Template-based and manual messaging
- "Send To WhatsApp" action from document forms
- Background sending for notifications and queued sends
- WhatsApp Notifications on DocType events and scheduler events
- Bulk messaging with one-by-one delay
- Attachment sending (uploaded file or document print PDF)
- Contact-driven recipient resolution (linked Contact / party)
- Inbound webhook processing and message logging
- Delivery and error logging in WhatsApp Notification Log / WhatsApp Message
- This app is configured for Evolution API workflows.
- Legacy Meta-specific sync/flow paths are removed from active usage.
- Frappe/ERPNext v15 bench
- A running Evolution API server
- A connected Evolution instance (QR paired)
- wkhtmltopdf if you want reliable PDF print generation
bench get-app https://github.com/maxfu9/whatsapp-evolutionbench --site <your-site> install-app whatsapp_evolutionbench --site <your-site> migrate
bench build
bench --site <your-site> clear-cache
bench restartOpen WhatsApp Settings and set:
Evolution API BaseEvolution API Token- Optional:
Evolution Send Endpoint Attachment Delivery ModeFile OnlyFallback to Link
Open WhatsApp Account and configure per account:
Account NameStatus = ActiveEvolution Instance(example:erpnext)- Optional per-account overrides:
Evolution API BaseEvolution API TokenEvolution Send Endpoint
- Set one account as
Default Outgoing - Set one account as
Default Incoming(if needed)
Use Test Connection button on both WhatsApp Settings and WhatsApp Account.
Create template text in WhatsApp Templates and map variables in notifications/bulk sends.
Example placeholders:
{{1}},{{2}},{{3}}...
The app can render template text using document data before sending.
Any submitted/saved document form has Send To WhatsApp menu action.
Modes:
TemplateCustom
Options:
- Pick linked Contact (auto-load mobile)
- Attach uploaded file
- Attach document print PDF
- Choose print format / no letterhead
- Add timeline comment
Use WhatsApp Notification to auto-send messages on:
- DocType events (
After Submit,After Save, etc.) - Scheduler events (
Hourly,Daily, etc.) - Day-based events (
Days Before,Days After)
Key options:
Delay (Seconds)for background delay- Auto recipient resolution from contact/party if
Field Nameis blank Attach Document PrintCustom attachment- Set a field value after successful send
Use Bulk WhatsApp Message for campaigns and operational blasts.
Features:
- Recipient Type:
IndividualorRecipient List - Template or manual content
- Variable mode:
Common/Unique Delay Between Messages (Seconds)to send one-by-one- Scheduled time support
- Status tracking (
Queued,In Progress,Completed,Partially Failed)
Endpoint:
/api/method/whatsapp_evolution.utils.webhook.webhook
Use this for inbound processing and status updates routed through configured account logic.
For WhatsApp template usage, this app can persist balance fields:
- Sales Invoice:
wa_balance_before_invoicewa_balance_after_invoice
- Payment Entry:
wa_balance_before_paymentwa_balance_after_payment
Fast jobs can finish before list refresh. Verify using:
WhatsApp Notification LogWhatsApp Messagestatus/history
Check:
- Evolution instance is connected
- URL/base/token/instance are correct
- Site URL is reachable from Evolution service
- Attachment mode in
WhatsApp Settings
If assets are stale:
bench build
bench --site <your-site> clear-cache
bench restartMIT