Connect WhatsApp
Receive and reply to WhatsApp messages automatically with your AI agent.
Overview
Empfio supports two WhatsApp providers:
- Twilio — easiest to set up, ideal for testing and small-to-medium volume
- Meta Business API — use your existing WhatsApp Business number, best for production at scale
Both providers receive inbound messages via webhook and route them through the same AI agent pipeline.
Which provider to choose
| Twilio | Meta Business API | |
|---|---|---|
| Setup time | ~15 minutes | ~1-2 hours |
| Best for | Testing, getting started | Production at scale |
| Phone number | Buy a new number from Twilio | Use your existing business number |
| Business verification | Not required | Meta Business verification required |
| Cost | Twilio per-message pricing | Lower cost at high volume |
Option A: Connect via Twilio
Step 1 — Create a Twilio account
Go to twilio.com and sign up. The free trial includes enough credit to test.
Step 2 — Get a WhatsApp-enabled number
- In the Twilio Console, go to Messaging → Try it Out → Send a WhatsApp message
- Follow the prompts to join the Twilio WhatsApp Sandbox (for testing)
- For production, request a Twilio WhatsApp-enabled number under Phone Numbers → Buy a Number
Step 3 — Configure the webhook
- In the Twilio Console, go to Messaging → Settings → WhatsApp Sandbox Settings (or your production number's configuration)
- Set the When a message comes in webhook URL to:
https://your-domain.com/api/v1/channels/twilio/webhook- Method:
POST
Step 4 — Connect in Empfio
- In Empfio, go to Settings → Channels → WhatsApp
- Select Twilio as the provider
- Enter your Twilio Account SID, Auth Token, and WhatsApp Number
- Click Save
Step 5 — Test it
Send a message to your Twilio WhatsApp number. The AI agent should reply within a few seconds. Check Dashboard → Conversations to see the new conversation.
Option B: Connect via Meta Business API
Step 1 — Set up Meta Business Manager
- Go to business.facebook.com and create a Meta Business account (if you don't have one)
- Complete business verification (required for WhatsApp API access)
Step 2 — Create a WhatsApp Business App
- Go to developers.facebook.com
- Create a new app → select Business type
- Add the WhatsApp product to your app
- Add a phone number and complete the phone number verification
Step 3 — Generate an access token
- In the WhatsApp app dashboard, go to API Setup
- Generate a permanent system user token with
whatsapp_business_messagingpermission - Copy the token — you'll need it in the next step
Step 4 — Configure the webhook
- In the Meta App Dashboard, go to WhatsApp → Configuration
- Set the Callback URL to:
https://your-domain.com/api/v1/channels/meta/webhook- Set a Verify Token (any string you choose — you'll enter this in Empfio too)
- Subscribe to the
messageswebhook field
Step 5 — Connect in Empfio
- In Empfio, go to Settings → Channels → WhatsApp
- Select Meta as the provider
- Enter your Access Token, Phone Number ID, and Verify Token
- Click Save
Testing
- Send a message to your connected WhatsApp number
- The AI agent should respond within a few seconds
- Check Dashboard → Conversations to see the inbound message and agent reply
- Check Dashboard → Leads to see the new lead record
Troubleshooting
| Problem | Fix |
|---|---|
| No reply from the agent | Check that the webhook URL is correct and accessible from the internet |
| "Media message not supported" | The agent currently handles text messages only |
| Messages arrive but no agent reply | Check that your Cal.com integration is connected (required for the full flow) |
| Twilio sandbox expired | Rejoin the sandbox by sending the join code to the sandbox number |
Limitations
- WhatsApp requires message templates for outbound messages to users who haven't messaged in the last 24 hours (Meta provider only)
- Twilio sandbox has a limited number of test recipients
- Rich media (images, documents) sent by customers are acknowledged but not processed by the AI