Skip to content

WhatsApp

The WhatsApp provider integrates with the WhatsApp Business API (via Meta). It supports:

  • Text messages
  • Template messages
  • Interactive buttons
  • List messages
  • Media (images, documents, audio, video)
  • Location sharing
  • Meta Business account
  • WhatsApp Business API access
  • Verified phone number
  1. Create Meta App

    Go to developers.facebook.com:

    • Create a new app (Business type)
    • Add WhatsApp product
    • Set up WhatsApp Business API
  2. Get API Credentials

    In your Meta app dashboard:

    • Go to WhatsApp → Getting Started
    • Copy Phone Number ID
    • Generate and copy Permanent Access Token
    • Note your Business Account ID
  3. Configure Webhook

    In WhatsApp → Configuration:

    • Set Callback URL: https://your-domain.com/webhook/whatsapp/{tenant}/{team}
    • Set Verify Token (any string you choose)
    • Subscribe to: messages
  4. Configure Provider

    answers.json
    {
    "messaging-whatsapp": {
    "enabled": true,
    "public_base_url": "https://your-domain.ngrok-free.app",
    "phone_number_id": "123456789012345",
    "access_token": "EAAxxxxx...",
    "verify_token": "your-verify-token",
    "business_account_id": "987654321098765"
    }
    }
  5. Run Setup

    Terminal window
    gtc setup --answers answers.json ./my-bundle
OptionRequiredDescription
enabledYesEnable/disable provider
public_base_urlYesPublic URL for webhook
phone_number_idYesWhatsApp phone number ID
access_tokenYesPermanent access token
verify_tokenYesWebhook verification token
business_account_idNoWhatsApp Business Account ID
api_versionNoGraph API version (default: v18.0)
- id: reply
type: reply
config:
message: "Hello! How can I help you today?"
- id: send_template
type: reply
config:
template:
name: "order_confirmation"
language: "en"
components:
- type: body
parameters:
- type: text
text: "{{order_id}}"
- type: text
text: "{{customer_name}}"
- id: ask_action
type: reply
config:
interactive:
type: button
body:
text: "What would you like to do?"
action:
buttons:
- type: reply
reply:
id: "help"
title: "Get Help"
- type: reply
reply:
id: "status"
title: "Check Status"
- type: reply
reply:
id: "human"
title: "Talk to Human"
- id: show_menu
type: reply
config:
interactive:
type: list
header:
type: text
text: "Support Menu"
body:
text: "Please select an option:"
action:
button: "View Options"
sections:
- title: "Support"
rows:
- id: "technical"
title: "Technical Support"
description: "Hardware and software issues"
- id: "billing"
title: "Billing"
description: "Payment and invoices"
- title: "Sales"
rows:
- id: "pricing"
title: "Pricing"
description: "Product pricing information"
- id: send_image
type: reply
config:
media:
type: image
link: "https://example.com/product.jpg"
caption: "Here's the product image"
- id: send_document
type: reply
config:
media:
type: document
link: "https://example.com/invoice.pdf"
filename: "invoice.pdf"
caption: "Your invoice is attached"
- id: send_location
type: reply
config:
location:
latitude: 37.7749
longitude: -122.4194
name: "Our Office"
address: "123 Main St, San Francisco, CA"
flows/on_button.ygtc
name: handle_button
version: "1.0"
nodes:
- id: route_button
type: branch
config:
conditions:
- expression: "button.id == 'help'"
next: show_help
- expression: "button.id == 'status'"
next: check_status
- expression: "button.id == 'human'"
next: escalate
default: unknown
- id: show_help
type: reply
config:
message: "Here's how I can help..."
triggers:
- type: interactive
target: route_button
  1. Go to Meta Business Suite → WhatsApp Manager → Message Templates
  2. Create a new template with required components
  3. Submit for approval (usually 24-48 hours)
- id: send_notification
type: reply
config:
template:
name: "appointment_reminder"
language: "en"
components:
- type: header
parameters:
- type: image
image:
link: "https://example.com/logo.png"
- type: body
parameters:
- type: text
text: "{{customer_name}}"
- type: text
text: "{{appointment_time}}"
- type: button
sub_type: quick_reply
index: 0
parameters:
- type: payload
payload: "confirm"
- id: check_window
type: branch
config:
conditions:
- expression: "last_message_time + 86400 > now"
next: send_freeform
default: send_template
- id: send_freeform
type: reply
config:
message: "Thanks for your message!"
- id: send_template
type: reply
config:
template:
name: "follow_up"
language: "en"
  1. Verify verify_token matches configuration
  2. Check webhook URL is publicly accessible
  3. Ensure HTTPS is properly configured
  • Check phone number format (include country code)
  • Verify template is approved (if using templates)
  • Check 24-hour window status
  • Review Meta webhook logs

WhatsApp has rate limits based on quality rating:

  • Tier 1: 1,000 messages/day
  • Tier 2: 10,000 messages/day
  • Tier 3: 100,000 messages/day

Handle gracefully:

- id: reply
type: reply
config:
message: "Response"
retry_on_rate_limit: true

Greentic validates:

  • X-Hub-Signature-256 header
  • Payload hash with app secret
  1. Use templates wisely - Create versatile, approved templates
  2. Respect the 24-hour window - Track user engagement
  3. Handle opt-outs - Respect STOP/UNSUBSCRIBE requests
  4. Keep messages concise - WhatsApp is for quick communication
  5. Use rich media - Images and documents enhance UX