WhatsApp Integration: Using Twilio/360Dialogue and Templates

You can integrate a WhatsApp channel with RapidPro.app using a provider such as Twilio or 360Dialog. WhatsApp has strict messaging rules—especially the 24-hour customer care window—so most production setups rely on approved message templates to message contacts outside that window. This guide explains how WhatsApp works in RapidPro.app, how templates behave (including Twilio-specific behavior), and key limits for buttons and media.

Quick setup checklist

  1. Choose and connect a WhatsApp provider
  2. Understand the 24-hour window and templates
  3. Handle Twilio’s template behavior
  4. Use buttons and template structure correctly
  5. Know media limits (attachments, stickers, GIFs)
  6. Align template languages with your workspace
  7. Troubleshoot common issues
Step 1
Choose and connect a WhatsApp provider

RapidPro.app integrates with WhatsApp through an approved provider. Common options include:

  • Twilio
  • 360Dialog
  1. Pick the provider that matches your region, compliance needs, and expected volume.
  2. Connect your WhatsApp channel in Workspace Settings → Channels → + New Channel using your provider’s setup steps.
  3. Send a basic test message to confirm your channel can deliver messages successfully.
💡
Tip: If you’re evaluating providers, start with a small pilot (a few test contacts) before you scale up.

Step 2
Understand the 24-hour window and templates

WhatsApp enforces a customer care window (commonly 24 hours). Most providers require an approved message template to message contacts outside that window.

  • Templates must be approved by your provider before they can be used.
  • RapidPro.app can help you select and configure templates in flows (depending on provider capabilities).
⚠️
Warning: Even if a template appears in your workspace, sending will fail if the template is not approved (or not approved in the correct language) at the provider level.

Step 3
Use templates with Twilio (special case)

Twilio’s WhatsApp template behavior can differ from providers that support direct template syncing.

How Twilio typically behaves: Twilio may attempt to match your outgoing message to an approved template in your Twilio account.

  1. In your first outbound message (outside the 24-hour window), send the exact text of a template that is approved in your Twilio account.
  2. Match the template text as closely as possible (ideally word-for-word).
  3. Test outside the 24-hour window to confirm Twilio matches and delivers successfully.
💡
Tip: Keep a “template library” for your team (template name, exact text, languages, and use case) so flow builders don’t accidentally change wording and break delivery.

Step 4
Follow limits for buttons and template structure

Buttons (Quick Replies)

  • WhatsApp templates can include interactive buttons (Quick Replies).
  • Limit: Each button label has a maximum of 20 characters.

Template structure (header/body/footer)

  • Header: can include an attachment (document, image, or video) depending on provider/template type.
  • Body: message content (commonly up to 1024 characters) and may include variables (e.g., contact name).
  • Footer: commonly up to 60 characters.
  • Quick Replies: displayed underneath the footer.
Step 5
Know media limits (attachments, stickers, GIFs)

Attachments

Templates may support attachments through the header (provider-dependent).

Stickers

To send stickers via the WhatsApp API, typical constraints include:

  • File type: image/webp
  • Dimensions: < 512×512
  • File size: < 100KB (static) or < 500KB (animated)

GIFs

GIF is not supported as a WhatsApp API media format in many setups. Convert GIFs to a supported format (image/video) before sending.

Step 6
Align template languages with your workspace

If your workspace is multilingual, make sure your WhatsApp templates exist in the correct languages so they can map to:

  • your workspace languages, and
  • your contact’s preferred language (when applicable).
⚠️
Warning: If the wrong language template is used (or a language template is missing), messages may fail outside the 24-hour window.

Common Issues

Messages fail outside the 24-hour window

Fixes:

  • Confirm you’re using an approved template for your provider.
  • If using Twilio, ensure the message text matches the approved template word-for-word (or extremely closely).
  • Verify the template is approved in the correct language (if your workspace is multilingual).
Buttons don’t show or fail to send

Fixes:

  • Keep each button label ≤ 20 characters.
  • Verify your provider/template type supports buttons.
Media won’t send (stickers, GIFs, or attachments)

Fixes:

  • For stickers, confirm WEBP, correct dimensions, and file size limits.
  • Don’t use GIF—convert to a supported format instead.
  • If sending attachments, confirm your provider supports media in the template header.
The wrong language template is selected

Fixes:

  • Align template languages with the languages in your workspace.
  • Verify the contact’s preferred language when testing multilingual flows.