Empfio Docs

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

TwilioMeta Business API
Setup time~15 minutes~1-2 hours
Best forTesting, getting startedProduction at scale
Phone numberBuy a new number from TwilioUse your existing business number
Business verificationNot requiredMeta Business verification required
CostTwilio per-message pricingLower 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

  1. In the Twilio Console, go to Messaging → Try it Out → Send a WhatsApp message
  2. Follow the prompts to join the Twilio WhatsApp Sandbox (for testing)
  3. For production, request a Twilio WhatsApp-enabled number under Phone Numbers → Buy a Number

Step 3 — Configure the webhook

  1. In the Twilio Console, go to Messaging → Settings → WhatsApp Sandbox Settings (or your production number's configuration)
  2. Set the When a message comes in webhook URL to:
https://your-domain.com/api/v1/channels/twilio/webhook
  1. Method: POST

Step 4 — Connect in Empfio

  1. In Empfio, go to Settings → Channels → WhatsApp
  2. Select Twilio as the provider
  3. Enter your Twilio Account SID, Auth Token, and WhatsApp Number
  4. 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

  1. Go to business.facebook.com and create a Meta Business account (if you don't have one)
  2. Complete business verification (required for WhatsApp API access)

Step 2 — Create a WhatsApp Business App

  1. Go to developers.facebook.com
  2. Create a new app → select Business type
  3. Add the WhatsApp product to your app
  4. Add a phone number and complete the phone number verification

Step 3 — Generate an access token

  1. In the WhatsApp app dashboard, go to API Setup
  2. Generate a permanent system user token with whatsapp_business_messaging permission
  3. Copy the token — you'll need it in the next step

Step 4 — Configure the webhook

  1. In the Meta App Dashboard, go to WhatsApp → Configuration
  2. Set the Callback URL to:
https://your-domain.com/api/v1/channels/meta/webhook
  1. Set a Verify Token (any string you choose — you'll enter this in Empfio too)
  2. Subscribe to the messages webhook field

Step 5 — Connect in Empfio

  1. In Empfio, go to Settings → Channels → WhatsApp
  2. Select Meta as the provider
  3. Enter your Access Token, Phone Number ID, and Verify Token
  4. Click Save

Testing

  1. Send a message to your connected WhatsApp number
  2. The AI agent should respond within a few seconds
  3. Check Dashboard → Conversations to see the inbound message and agent reply
  4. Check Dashboard → Leads to see the new lead record

Troubleshooting

ProblemFix
No reply from the agentCheck 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 replyCheck that your Cal.com integration is connected (required for the full flow)
Twilio sandbox expiredRejoin 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

On this page