---
title: "WhatsApp Message Received"
description: "Run on inbound WhatsApp via a Twilio or Exotel connected service."
canonical_url: "https://docs.vettero.com/build/event-handlers/whatsapp-message-received"
---
# WhatsApp Message Received

> Run on inbound WhatsApp via a Twilio or Exotel connected service.

<trigger-meta :service="["Twilio","Exotel"]" :type="["twilio.whatsapp.on-whatsapp-message","exotel.whatsapp.on-whatsapp-message"]" capability="WhatsApp" group="Messaging" icon="i-lucide-message-circle">



</trigger-meta>

**WhatsApp Message Received** runs when an inbound WhatsApp message arrives on the configured sender.

## Payload

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        serviceId
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      Connected Twilio or Exotel service with WhatsApp enabled
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        phoneNumber
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      WhatsApp sender to receive on
    </td>
  </tr>
</tbody>
</table>

## Trigger data

Available as `args.*`.

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        message.messageSid
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      Message id
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        message.from
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      Sender
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        message.to
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      Recipient
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        message.profileName
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      Profile name
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        message.body
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      Text body
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        message.messageType
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      Message type
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        message.numMedia
      </code>
    </td>
    
    <td>
      number
    </td>
    
    <td>
      Media count
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        message.media[].url
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      Media URL
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        message.media[].contentType
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      Media content type
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        raw
      </code>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      Original Twilio payload
    </td>
  </tr>
</tbody>
</table>

## Use case

- Log inbound WhatsApp to a [table](https://docs.vettero.com/data/tables), keyword-route, or send a template reply — without a continuous chat session.
- After-hours auto-reply or ticket-create when you do not want the [WhatsApp Chat](https://docs.vettero.com/build/channels/whatsapp-chat) default agent.
- Same Twilio or Exotel sender as the rest of your WhatsApp setup. Twilio picks the number from the connection. Exotel asks you to type it.
- Exotel delivers inbound WhatsApp to the webhook URL you paste on the number in the messaging console. Use the URL shown on the WhatsApp Chat channel.
- Use the channel when customers should converse with an agent; this trigger is for fire-and-forget automation on the message.

## Channels vs handlers

WhatsApp handlers share identifiers with [WhatsApp Chat](https://docs.vettero.com/build/channels/whatsapp-chat) of the same kind.

<warning>

If an **active channel** uses the same identifier, inbound traffic goes to the channel. The event handler does not run for that identifier until you disable or change the channel, or change the handler identifier.

</warning>

<trigger-page-nav>



</trigger-page-nav>


## Sitemap

See the full [sitemap](https://docs.vettero.com/sitemap.md) for all pages.
