Skip to content

Message

Send WhatsApp messages to your customers directly from your Nappai automation workflows. This component connects to the WhatsApp Business API, allowing you to send text, templates, or media messages to specific phone numbers.

How it Works

This component acts as a bridge between your Nappai workflows and the WhatsApp Business Platform. When you configure this component, you provide the necessary authentication details (via a pre-configured Credential) and the message details.

  1. Selection: You choose the type of message you want to send (e.g., a simple text or a pre-approved template).
  2. Recipient & Content: You specify the destination phone number and the content of the message.
  3. Delivery: The component securely connects to WhatsApp’s servers and delivers the message.
  4. Feedback: You receive confirmation of whether the message was sent successfully, along with a unique ID to track the message later.

Connection & Credentials

This component requires a WhatsApp Business credential to function. This credential holds your API keys and identifiers securely.

  1. Go to the Credentials section in your Nappai panel.
  2. Create a new credential of the type WhatsApp Business.
    • You will need to provide:
      • WhatsApp Business API Key: Obtain this from the Meta Developer Portal (System User Access Tokens).
      • WhatsApp Number identifier: Find this in Business Manager > Business Settings > Accounts > WhatsApp.
      • Verification Token: Ensure this matches the token configured in your Webhook settings.
  3. In your workflow, select the saved credential in the Credential input field of this node.

For detailed steps on obtaining these keys, refer to the WhatsApp Cloud API Guide and Get System User Access Tokens.

Inputs

The following fields are available to configure this component. These fields allow you to define who receives the message and what they receive.

  • Operation: This dropdown allows you to select the specific type of message action you wish to perform.
  • WhatsApp Template: Use this dropdown to select from available message templates. Templates are pre-approved by Meta and are useful for formal notifications. Note: It may take up to 24 hours for new templates to appear after approval.
  • Type Operation: Choose between “Basic” (uses the number captured from a webhook) or “Advanced” (uses a manually entered number).
  • Number Destination: Enter the phone number of the recipient. Include the country code but do not include the + symbol (e.g., 5215551234567). This number must be associated with the API configuration.
  • Message Body: Enter the text content of the message you want to send.
  • Media Content: Upload or select a media file (image, document, etc.) to include in the message.
  • Template Preview: Displays a preview of the selected template to help you verify how the message will appear before sending.

Outputs

After the component executes, it provides information about the status of the message delivery. This data is crucial for logging and for triggering subsequent steps in your workflow (e.g., logging the transaction or sending a follow-up).

Output Data Example (JSON)json

{ “Result”: { “status”: “sent”, “message_id”: “wamid.HBgNNTUxNTU1MTIzNDU2NwUCABIYFjNFQjBDMkQzRTQ1RjY2QTdCOEM5RDABEEFfQkNEMEYxMjM0NTY3ODkwMTIzNDU2Nzg5MA==”, “success”: true } }

Connectivity

This component is typically placed in workflows where customer communication is required. It usually connects from components that capture customer data (such as forms, webhooks, or database queries) and to components that log the interaction (such as databases or CRM systems) or trigger notifications.

Usage Example

Scenario: Sending a Shipping Confirmation

  1. Input: You have an e-commerce workflow. When a package status changes to “Shipped,” the workflow triggers the Message component.
  2. Configuration:
    • Operation: Select “Send Text” (or relevant template).
    • Number Destination: Input the customer’s phone number captured from the order details.
    • Message Body: “Your order #12345 has shipped! Track it here: [Link].”
  3. Execution: The component sends the message via WhatsApp.
  4. Output: The workflow receives a success: true status and the message_id, which can be saved to the customer’s record for future reference.

Tips and Best Practices

  • Format Numbers Correctly: Always enter phone numbers without the + sign and include the country code (e.g., 1 for USA, 52 for Mexico) to ensure delivery.
  • Use Templates for Bulk Messages: If sending notifications to many customers, use pre-approved WhatsApp Templates to avoid blocking or approval delays.
  • Check Credentials First: If you encounter connection errors, verify that your WhatsApp Business Credential in Nappai has valid and up-to-date API keys.
  • Media Limits: Ensure your media files are within the size limits allowed by the WhatsApp Business API.

Security Considerations

  • Credential Security: Never share your WhatsApp Business API Key or Verification Token. Store them securely within Nappai’s Credential system.
  • Data Privacy: Ensure you have the customer’s consent to message them via WhatsApp to comply with privacy regulations.