Actions29
- Chat Actions
- Group Actions
- Instance Actions
- Message Actions
- Webhook Actions
Overview
This node operation sends a WhatsApp message containing a text with a link that WhatsApp will automatically generate a preview for. The preview works for supported link types such as YouTube videos, websites, articles, and other common URLs. This is useful when you want to share rich link previews in WhatsApp conversations without manually creating the preview content.
Common scenarios:
- Sharing a YouTube video link with an automatic thumbnail and title preview.
- Sending website URLs where recipients can see a snippet or image preview.
- Broadcasting article links with previews to contacts.
Practical example:
You want to send a promotional YouTube video link to a customer via WhatsApp. Using this node, you provide the contact's WhatsApp ID and the message text including the video URL. The recipient receives the message with the video preview automatically generated by WhatsApp.
Properties
| Name | Meaning |
|---|---|
| To (Contact) | The WhatsApp contact to send the link preview to. Format must be phone_number@s.whatsapp.net (e.g., 551199999999@s.whatsapp.net). |
| Text with Link | The text message containing the link. WhatsApp will automatically generate a preview for supported links like YouTube videos, websites, etc. |
| Information | A notice explaining that the message will include a link preview generated automatically by WhatsApp. |
Output
The node outputs JSON data representing the result of the send message operation. This typically includes confirmation details such as message IDs or status returned from the WhatsApp API service.
If the node supports binary data output (not explicitly shown here), it would represent media content or attachments related to the message, but for this operation, the output is focused on JSON metadata about the sent message.
Dependencies
- Requires an active connection to the MegaAPI WhatsApp service.
- Needs valid API credentials (an API key/token and host URL) configured in n8n credentials to authenticate requests.
- The WhatsApp contact must be formatted correctly and registered on WhatsApp.
- The link included in the message should be a supported type for WhatsApp to generate a preview.
Troubleshooting
- Invalid Contact Format: If the "To (Contact)" property is not in the correct format (
phone_number@s.whatsapp.net), the message will fail to send. Ensure the phone number includes country code and no extra characters. - Unsupported Link: If the link is not supported by WhatsApp for preview generation, the message may be sent without a preview or could cause an error.
- Authentication Errors: Missing or invalid API credentials will prevent the node from sending messages. Verify the API token and host configuration.
- Network Issues: Connectivity problems with the MegaAPI service can cause timeouts or failures.
- Error Messages: The node throws errors indicating unknown operations or resources if misconfigured. For example, selecting an unsupported operation for the resource will raise an error.
To resolve errors:
- Double-check input parameters and their formats.
- Confirm API credentials are valid and have necessary permissions.
- Review network connectivity and service status.
Links and References
- WhatsApp Link Preview Documentation
- MegaAPI WhatsApp Service Documentation (generic placeholder, replace with actual if available)
- n8n Documentation - Creating Custom Nodes