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 to specified phone numbers in international format. Additionally, it can create new contacts with optional tagging.
Common scenarios where this node is beneficial include:
- Automating customer notifications or alerts via WhatsApp.
- Sending multimedia promotional content or updates.
- Managing contact lists by programmatically adding new contacts.
For example, a business could use this node to automatically send order confirmations as text messages or share product images directly with customers.
Properties
| Name | Meaning |
|---|---|
| Phone Number | The recipient's phone number in international format (e.g., +1234567890). |
| Message | The text message content to be sent (only for Send Message operation). |
| Instance ID | Identifier of the SM Click instance used to send messages or manage contacts. |
Note: Although not requested here, other operations support additional properties such as base64-encoded media data, filenames, audio URLs, contact names, and tags.
Output
The node outputs an array of JSON objects, each representing the result of an attempted operation on an input item. Each object includes:
success: A boolean indicating if the operation succeeded.operation: The name of the performed operation (e.g., "sendMessage").- Additional fields returned by the SM Click API response, which may contain details about the sent message or created contact.
No binary data output is produced by this node.
Dependencies
- Requires an active SM Click API account with valid credentials (API key and API URL).
- Needs configuration of these credentials within n8n to authenticate API requests.
- Uses the Axios HTTP client library internally to perform REST API calls.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Incorrect phone number format may lead to message delivery errors.
- Missing required parameters for specific operations (e.g., message text for Send Message) will cause errors.
- Base64 media data must include proper data URI prefixes; otherwise, the node prepends default prefixes but malformed data may still fail.
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 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
To resolve errors, verify all required inputs, ensure correct formatting, and confirm API credentials are valid.
Links and References
- SM Click API Documentation (example placeholder, replace with actual URL)
- WhatsApp Business API Overview
- Axios HTTP Client