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. Additionally, it can create new contacts with optional tagging.
Common scenarios where this node is beneficial include:
- Automating customer notifications or alerts through WhatsApp.
- Sending multimedia content such as promotional images, videos, or documents directly to users.
- Managing contact lists by programmatically adding new contacts with tags for segmentation.
For example, a business could use this node to automatically send an invoice PDF file to a customer after a purchase or send a welcome message with an image to new subscribers.
Properties
| Name | Meaning |
|---|---|
| Phone Number | The recipient's phone number in international format (e.g., +1234567890). |
| File (Base64) | Base64 encoded file data including the data URI prefix (e.g., data:application/pdf;base64,). |
| Filename | The name of the file including its extension (e.g., document.pdf). |
| Instance ID | Identifier of the SM Click instance used to send the message or manage contacts. |
Note: The above properties are specific to the Send File operation under the Default resource. Other operations have additional properties like message text, image/video/audio data, contact name, and tags.
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 performed operation name (e.g.,sendFile).- Additional fields returned from the SM Click API response, which may include message IDs, status, or contact details depending on the operation.
No binary data is outputted by this node; all responses are JSON objects representing the result of the API call.
Dependencies
- Requires an active SM Click API account with valid credentials (an API key and API URL).
- The node uses HTTP POST requests to the SM Click API endpoints.
- Proper configuration of the API key credential within n8n is necessary for authentication.
Troubleshooting
Common issues:
- Missing or invalid API key will cause authentication failures.
- Incorrectly formatted Base64 strings without the required data URI prefix may lead to errors or rejected uploads.
- Using unsupported operations or missing required parameters will throw errors.
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 like invalid phone numbers, file size limits, or quota exceeded. - If you see
Operation ... not supported, verify that the operation name matches one of the supported options.
- Errors from the SM Click API are caught and rethrown with the prefix
Resolution tips:
- Ensure all required fields are provided and correctly formatted.
- Confirm the Base64 data includes the proper prefix (e.g.,
data:application/pdf;base64,). - Check your API key and instance ID for correctness.
- Review SM Click API documentation for any limitations or constraints.
Links and References
- SM Click API Documentation (example placeholder, replace with actual URL if known)
- WhatsApp Business API Overview
- Base64 Encoding Reference