Overview
This node integrates with the AiSensy WhatsApp API to send campaign messages, fetch available campaigns, and send WhatsApp messages using a campaign. It is useful for automating WhatsApp marketing campaigns, sending personalized messages to contacts, and managing campaign templates. For example, a user can select a campaign, provide contact details and template parameters, and send a customized WhatsApp message automatically.
Use Case Examples
- Sending a WhatsApp campaign message to a contact with personalized template parameters and optional media attachment.
- Fetching available campaigns to review their templates and parameters before sending messages.
- Sending a WhatsApp message using a specified campaign name and template parameters.
Properties
| Name | Meaning |
|---|---|
| Campaign | Select the campaign to use for sending the message. |
| Phone Number | Phone number with country code to which the message will be sent. |
| Contact Name | Name of the contact receiving the message. |
| Parameter 1 | Value for template parameter {{1}} used in the campaign message. |
| Parameter 2 | Value for template parameter {{2}} used in the campaign message. |
| Parameter 3 | Value for template parameter {{3}} used in the campaign message. |
| Parameter 4 | Value for template parameter {{4}} used in the campaign message. |
| Parameter 5 | Value for template parameter {{5}} used in the campaign message. |
| Media URL | URL of the media (image/video) to attach for non-text campaigns. |
| Media Filename | Filename for the attached media (optional). |
Output
JSON
success- Indicates if the message was sent successfully.messageResponse- Response from the AiSensy API after sending the message.campaignDetailsid- ID of the campaign used.name- Name of the campaign used.type- Type of the campaign message (e.g., TEXT, IMAGE).status- Status of the campaign.audienceSize- Number of contacts in the campaign audience.templateText- Template text of the campaign message.sampleText- Sample text of the campaign template.totalParameters- Total number of template parameters in the campaign.parametersUsed- List of template parameters values used in the message.
sentTophoneNumber- Phone number to which the message was sent.contactName- Name of the contact to whom the message was sent.
mediaurl- URL of the media attached to the message (if any).filename- Filename of the attached media (if any).
Dependencies
- AiSensy API key credential required for authentication.
Troubleshooting
- If the selected campaign is not found, the node throws an error 'Selected campaign not found'. Ensure the campaign ID is correct and the campaign exists in AiSensy.
- If the API request fails, the node throws an error with the message from the AiSensy API. Check network connectivity, API key validity, and campaign configuration.
- For non-text campaigns, the Media URL is required. Omitting it will cause the message sending to fail.
Links
- AiSensy API Documentation - Official documentation for AiSensy WhatsApp API, useful for understanding campaign and message sending details.