Skip to main content

Receive Events

Receives incoming WhatsApp messages and events via webhook from the WhatsApp Business Cloud API.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • IP Address - The IP address to bind the webhook server. Default is 127.0.0.1.
  • Port Number - The port number for the webhook server (e.g., 3000).

Options

  • Endpoint - The webhook endpoint path. Default is /webhook.
  • Verify Token - Token for Meta webhook verification (required when configuring webhook in Meta Developer Portal).

Outputs

  • Event - Full webhook event payload from WhatsApp.
  • Message Type - Type of the received message: text, image, video, audio, document, location, contacts, interactive, button, status, or unknown.
  • From - Sender's phone number.
  • Message ID - WhatsApp message ID (used with Mark As Read node).
  • Message Body - Text content of the message (for text messages) or caption (for media messages).
  • Media ID - Media ID for received media messages (images, videos, audio, documents).

How It Works

The Receive Events node creates a webhook server that listens for incoming WhatsApp messages. When a message is received, the node:

  1. Starts an HTTP server on the specified IP address and port
  2. Listens for webhook events at the specified endpoint
  3. Handles Meta webhook verification (GET requests with hub.verify_token)
  4. Receives and parses incoming message events (POST requests)
  5. Extracts relevant information from the webhook payload
  6. Emits the message data to trigger the flow

This node has no input connectors as it serves as a trigger that initiates flows based on incoming WhatsApp messages.

Requirements

  • A WhatsApp Business Account set up in Meta Developer Portal
  • A WhatsApp Business Phone Number configured
  • The webhook URL must be publicly accessible (use ngrok or similar for local testing)
  • Webhook URL configured in Meta Developer Portal with the verify token

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid port number
  • Port already in use
  • Failed to start the HTTP server
  • Network connectivity issues

Usage Notes

  • The server runs continuously while the flow is active
  • Multiple webhook nodes can share the same IP/port but must use different endpoints
  • For webhook verification, Meta will send a GET request with hub.mode=subscribe, hub.verify_token, and hub.challenge
  • The verify token must match what you set in Meta Developer Portal
  • Use ngrok or similar tools to expose your local server for testing: ngrok http 3000
  • The webhook URL in Meta should be: https://your-domain.com/webhook (or your ngrok URL)

Webhook Configuration Steps

  1. Create a WhatsApp Business App in Meta Developer Portal
  2. Add a phone number to your app
  3. Start the Receive Events node in Robomotion
  4. In Meta Developer Portal, go to WhatsApp > Configuration
  5. Click "Configure" next to Webhook
  6. Enter your webhook URL and verify token
  7. Subscribe to message events

Example

Setup:

  • IP Address: 127.0.0.1
  • Port Number: 3000
  • Endpoint: /webhook
  • Verify Token: my_secret_verify_token_123

Webhook URL for Meta: https://your-domain.com/webhook

When a user sends "Hello" to your WhatsApp Business number:

  • Event: Full webhook payload object
  • Message Type: text
  • From: 1234567890 (sender's phone number)
  • Message ID: wamid.HBgNMTIzNDU2Nzg5MAAV...
  • Message Body: Hello
  • Media ID: (empty for text messages)

Supported Message Types

The node can receive and parse the following message types:

  • text - Plain text messages
  • image - Image messages (JPEG, PNG)
  • video - Video messages (MP4, 3GPP)
  • audio - Audio messages (AAC, MP3, AMR, OGG)
  • document - Document messages (PDF, DOC, XLS, etc.)
  • location - Location messages with coordinates
  • contacts - Contact card messages
  • interactive - Interactive message responses (buttons, lists)
  • button - Quick reply button responses
  • status - Message status updates (sent, delivered, read)
  • unknown - Unsupported or unrecognized message types

Tips for RPA Developers

  • Use the Message Type output to route different message types to appropriate handlers
  • Store the Message ID if you want to mark messages as read later
  • The Media ID can be used with Get Media URL node to download media files
  • For production deployments, use a reverse proxy (nginx, Apache) in front of the webhook server
  • Implement proper error handling for webhook payload parsing failures
  • Consider using a database to track processed messages and avoid duplicates