Skip to content

WhatsApp Message

⚠️ DEPRECATION WARNING

This component is deprecated and will be removed in a future version of Nappai.
Please migrate to the recommended alternative components.

WhatsApp Message is a component that lets you send WhatsApp messages—text, images, audio, documents, videos, or a mix of media—using Twilio’s WhatsApp API. It also lets you check the status of a previously sent message.

How it Works

When you use this component, it connects to Twilio’s WhatsApp API through the WhatsAppManager.

  1. Credentials – You provide your Twilio Account SID, Auth Token, and the WhatsApp-enabled Twilio number.
  2. Operation – Choose one of the seven operations (e.g., “Send Text Message”).
  3. Data – Fill in the required fields such as the recipient’s phone number, message text, or media URLs.
  4. Execution – The component calls the appropriate Twilio API endpoint, sends the message, and returns a Message object that contains the result, including the message SID, status, and any media URLs.

The component handles validation (e.g., checking that media files are provided for media operations) and logs success or error messages for you to see in the dashboard.

Operations

This component offers several operations that you can select based on what you need to do. You can only use one operation at a time:

  • Send Text Message: Sends a plain text message to a recipient.
  • Send Image: Sends one or more images with an optional caption.
  • Send Audio: Sends one or more audio files with an optional caption.
  • Send Document: Sends one or more documents with an optional caption.
  • Send Video: Sends one or more videos with an optional caption.
  • Send Mixed Media: Sends a combination of images, audio, documents, or videos with an optional caption.
  • Get Message Status: Retrieves the current status of a previously sent message using its SID.

To use the component, first select the operation you need in the Operation field.

Inputs

  • Input Message: Optional input message to process and extract content from.

    • Visible in: Send Text Message, Send Image, Send Audio, Send Document, Send Video, Send Mixed Media
  • Operation: WhatsApp operation to perform.

    • Visible in: Send Text Message, Send Image, Send Audio, Send Document, Send Video, Send Mixed Media, Get Message Status
  • Twilio Account SID: Your Twilio Account SID for authentication.

    • Visible in: Send Text Message, Send Image, Send Audio, Send Document, Send Video, Send Mixed Media, Get Message Status
  • Twilio Auth Token: Your Twilio Auth Token for authentication.

    • Visible in: Send Text Message, Send Image, Send Audio, Send Document, Send Video, Send Mixed Media, Get Message Status
  • Media Files: Comma-separated list of media file URLs or paths to send (up to 10 files).

    • Visible in: Send Image, Send Audio, Send Document, Send Video, Send Mixed Media
  • Message SID: Twilio message SID to check status for.

    • Visible in: Get Message Status
  • Message Text: The text message to send or caption for media (max 1600 characters).

    • Visible in: Send Text Message, Send Image, Send Audio, Send Document, Send Video, Send Mixed Media
  • Status Callback URL: Optional URL for receiving message status callbacks from Twilio.

    • Visible in: Send Text Message, Send Image, Send Audio, Send Document, Send Video, Send Mixed Media
  • Recipient Phone Number: Recipient’s phone number in international format.

    • Visible in: Send Text Message, Send Image, Send Audio, Send Document, Send Video, Send Mixed Media, Get Message Status
  • Validate Media: Enable media validation for file type and size limits.

    • Visible in: Send Image, Send Audio, Send Document, Send Video, Send Mixed Media
  • Twilio WhatsApp Number: Your Twilio WhatsApp number in E.164 format.

    • Visible in: Send Text Message, Send Image, Send Audio, Send Document, Send Video, Send Mixed Media, Get Message Status

Outputs

  • WhatsApp Message Response: A Message object that contains the result of the operation, including the message SID, status, timestamps, and any media URLs. This output can be used to trigger further actions in your workflow.

Usage Example

Sending a Text Message

  1. Drag the WhatsApp Message component onto the canvas.
  2. Fill in your Twilio credentials, the WhatsApp number, and the recipient’s phone number.
  3. Set Operation to Send Text Message.
  4. Enter the text you want to send in Message Text.
  5. Run the workflow.
  6. The component will return a Message object with the status and the message SID.

Sending an Image

  1. Drag the component onto the canvas.
  2. Provide credentials and phone numbers as above.
  3. Set Operation to Send Image.
  4. In Media Files, paste the URL of the image you want to send (e.g., https://example.com/photo.jpg).
  5. Optionally add a caption in Message Text.
  6. Run the workflow.
  7. The output will include the media URL and the message SID.
  • WhatsApp Message (recommended alternative) – A newer component that replaces this legacy version.
  • Twilio SMS – For sending SMS messages instead of WhatsApp.
  • Email Sender – For sending email notifications.

Tips and Best Practices

  • Keep your Twilio credentials secure; store them in environment variables or Nappai’s credential store.
  • Use short, clear captions for media to improve readability.
  • If you need to track delivery, provide a Status Callback URL so Twilio can notify your system when the message is delivered or fails.
  • Stick to the 1600‑character limit for text messages to avoid truncation.
  • For media, ensure URLs are publicly accessible or hosted on a server that Twilio can reach.

Security Considerations

  • Never expose your Twilio Account SID or Auth Token in public code or logs.
  • Use HTTPS for any status callback URLs to protect data in transit.
  • Validate media URLs before sending to avoid sending malicious content.
  • Regularly rotate your Twilio credentials and update them in Nappai.