Overview
This node integrates with the SM Click API to send various types of messages and manage contacts via WhatsApp. It supports sending text messages, images, videos, audio files, and generic files encoded in Base64 format, as well as creating new contacts.
A common use case is automating customer communication through WhatsApp by sending multimedia content or text messages programmatically. For example, a business can automatically send product images or promotional videos to customers, or add new contacts to their messaging list.
Specifically for the Send Image operation, the node sends an image encoded in Base64 format (including the data URI prefix) to a specified phone number on WhatsApp.
Properties
| Name | Meaning |
|---|---|
| Phone Number | The recipient's phone number in international format. |
| Image (Base64) | Base64 encoded image data including the data URI prefix (e.g., data:image/jpeg;base64,). |
| Instance ID | Identifier of the SM Click instance used to send the message. |
Output
The node outputs a JSON array where each element corresponds to one input item processed. Each output object includes:
success: A boolean indicating if the operation was successful.operation: The name of the operation performed (e.g., "sendImage").- Additional fields returned from the SM Click API response, which may include message IDs or status information.
No binary data is output by this node; all responses are JSON objects representing the API results.
Dependencies
- Requires an active SM Click API account with valid credentials (API key and API URL).
- The node expects these credentials to be configured in n8n under a generic API authentication token.
- Uses the Axios HTTP client library internally to make POST requests to the SM Click API endpoints.
Troubleshooting
Common issues:
- Missing or invalid API credentials will cause authentication errors.
- Incorrectly formatted Base64 image data (missing the data URI prefix) will be automatically prefixed with a default JPEG prefix, but ensure your data is correctly formatted to avoid corrupted images.
- Invalid phone numbers not in international format may cause message delivery failures.
- Network or API downtime can result in request failures.
Error messages:
- Errors from the SM Click API are caught and rethrown with the prefix
SM Click API error:followed by the API's error message. This helps identify issues such as invalid parameters or quota limits. - If an unsupported operation is selected, the node throws an error stating that the operation is not supported.
- Errors from the SM Click API are caught and rethrown with the prefix
Links and References
- SM Click API Documentation (example link, replace with actual)
- WhatsApp Business API Overview
- Base64 Encoding Reference