Aytan icon

Aytan

Interact with AiSensy WhatsApp API

Send Campaign Message

AI-generated

Overview

This node operation "Send Campaign Message" allows users to send WhatsApp messages using a selected campaign from AiSensy WhatsApp API. It is useful for automating personalized campaign messages to contacts, including text and media messages. For example, a user can select a campaign, specify the recipient's phone number and name, provide template parameters to customize the message, and optionally include media such as images or videos. This facilitates targeted communication in marketing or customer engagement scenarios.

Use Case Examples

  1. Sending a promotional campaign message to a customer with personalized parameters.
  2. Sending an image or video campaign message to a contact using a media URL and filename.

Properties

Name Meaning
Campaign Select the campaign to use for sending the WhatsApp message.
Phone Number Phone number of the recipient with country code (e.g., 917896541235).
Contact Name Name of the contact to whom the message is sent.
Parameter 1 Value for template parameter {{1}} to customize the message.
Parameter 2 Value for template parameter {{2}} to customize the message.
Parameter 3 Value for template parameter {{3}} to customize the message.
Parameter 4 Value for template parameter {{4}} to customize the message.
Parameter 5 Value for template parameter {{5}} to customize the message.
Media URL URL of the media (image/video) to include in the campaign message, required for non-text campaigns.
Media Filename Filename for the media included in the campaign message (optional).

Output

JSON

  • success - Indicates if the message was sent successfully.
  • messageResponse - Response from the API after sending the message.
  • campaignDetails
    • id - ID of the campaign used.
    • name - Name of the campaign used.
    • type - Type of the campaign message (e.g., TEXT, IMAGE).
    • status - Current status of the campaign.
    • audienceSize - Number of recipients in the campaign audience.
    • templateText - Template text of the campaign message.
    • sampleText - Sample text of the campaign message template.
    • totalParameters - Total number of template parameters in the campaign.
    • parametersUsed - List of template parameters values used in the message.
  • sentTo
    • phoneNumber - Phone number of the message recipient.
    • contactName - Name of the contact recipient.
  • media
    • url - URL of the media sent with the message, if any.
    • filename - Filename of the media sent with the message, if any.

Dependencies

  • AiSensy WhatsApp API

Troubleshooting

  • Ensure the selected campaign ID is valid and exists; otherwise, the node throws 'Selected campaign not found' error.
  • Verify that the phone number includes the country code and is correctly formatted to avoid sending failures.
  • For non-text campaigns, the Media URL must be provided; missing media URL will cause the message sending to fail.
  • Check API credentials and project ID configuration as the node requires valid AiSensy API credentials to function.
  • If the node is set to continue on fail, errors will be returned in the output JSON under the 'error' key for each failed item.

Links

Discussion