Overview
This node integrates with the AiSensy WhatsApp API to send campaign messages, fetch campaign details, and send individual WhatsApp messages using predefined campaigns. 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 template parameters and details before sending messages.
- Sending a direct WhatsApp message using a campaign name and comma-separated template parameters.
Properties
| Name | Meaning |
|---|---|
| Campaign | Select the campaign to use for sending the message. |
| Phone Number | Phone number with country code to send the message to (e.g., 917896541235). |
| Contact Name | Name of the contact receiving the message. |
| Parameter 1 | Value for template parameter {{1}} in the campaign message. |
| Parameter 2 | Value for template parameter {{2}} in the campaign message. |
| Parameter 3 | Value for template parameter {{3}} in the campaign message. |
| Parameter 4 | Value for template parameter {{4}} in the campaign message. |
| Parameter 5 | Value for template parameter {{5}} 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- Current 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 message template.totalParameters- Total number of template parameters in the campaign.parametersUsed- List of template parameter values used in the message.
sentTophoneNumber- Phone number to which the message was sent.contactName- Name of the contact to which the message was sent.
mediaurl- URL of the media attached to the message (if any).filename- Filename of the media attached to the message (if any).
Dependencies
- AiSensy API with project ID credential for authentication
Troubleshooting
- Common issues include selecting a campaign that does not exist or is not found, which results in an error 'Selected campaign not found'. Verify the campaign ID is correct and available in the AiSensy project.
- Errors may occur if required parameters like phone number or contact name are missing or incorrectly formatted. Ensure phone numbers include the country code and required fields are filled.
- If sending media with a non-TEXT campaign, ensure the media URL is valid and accessible; otherwise, the message may fail to send.
- API request failures due to network issues or invalid credentials will throw errors. Check API key validity and network connectivity.
Links
- AiSensy API Documentation - Official documentation for AiSensy WhatsApp API used by this node.