Aytan icon

Aytan

Interact with AiSensy WhatsApp API

Send Message

AI-generated

Overview

This node integrates with the AiSensy WhatsApp API to send WhatsApp messages using predefined campaigns. It supports sending messages by selecting a campaign, specifying the recipient's phone number and contact name, and optionally providing template parameters for message customization. This node is useful for automating WhatsApp communications in marketing campaigns, customer support, or notifications, allowing users to send personalized messages based on campaign templates.

Use Case Examples

  1. Sending a WhatsApp message to a customer using a specific campaign with personalized template parameters.
  2. Automating bulk WhatsApp notifications by iterating over a list of contacts and sending campaign-based messages.
  3. Using the node to send messages with media attachments by specifying media URLs and filenames.

Properties

Name Meaning
Campaign Name Name of the campaign to use for sending the message, which determines the message template and content.
Phone Number Recipient's phone number including country code, used to direct the WhatsApp message to the correct contact.
Contact Name Name of the contact receiving the message, used for personalization or record-keeping.
Template Parameters Comma-separated values to replace placeholders in the campaign's message template, allowing message customization.

Output

JSON

  • success - Indicates if the message was sent successfully (true/false).
  • messageResponse - The response object returned from the AiSensy API after sending the message, containing details about the sent message.
  • campaignDetails
    • id - ID of the campaign used to send the message.
    • 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 targeted by the campaign.
    • templateText - The text template of the campaign message.
    • sampleText - Sample text from the campaign template.
    • totalParameters - Total number of template parameters expected by the campaign.
    • parametersUsed - List of template parameters actually used in the sent message.
  • sentTo
    • phoneNumber - Phone number to which the message was sent.
    • contactName - Name of the contact to whom the message was sent.
  • 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
  • An API key credential for AiSensy API authentication

Troubleshooting

  • Ensure the campaign name provided matches an existing campaign in AiSensy; otherwise, the node will throw a 'Selected campaign not found' error.
  • Verify that the phone number includes the correct country code and is formatted properly to avoid message delivery failures.
  • If sending media, ensure the media URL is accessible and the campaign type supports media messages.
  • Check API credentials and project ID configuration to avoid authentication errors when calling the AiSensy API.

Links

Discussion