Actions17
Overview
This node integrates with the Z-API WhatsApp service to send various types of WhatsApp messages programmatically. Specifically, the "Send Image" operation under the "Message" resource allows users to send an image message to a specified phone number or group ID on WhatsApp. This is useful for automating notifications, marketing campaigns, customer support, or any scenario where sending images via WhatsApp is required.
For example, a business could use this node to automatically send product images to customers after they place an order, or a support team might send screenshots or diagrams to assist users.
Properties
| Name | Meaning |
|---|---|
| Instance | Your Z-API instance ID used to identify your WhatsApp API session. |
| Token | Your Z-API token for authenticating API requests. |
| Client Token | Your Z-API client token for additional authentication in API headers. |
| Phone | The recipient's phone number or WhatsApp group ID where the image will be sent. |
| Image URL | The publicly accessible URL of the image to send. |
| Caption | Optional text caption to accompany the image message. |
Output
The node outputs a JSON object representing the response from the Z-API WhatsApp service after attempting to send the image. This typically includes status information about the message delivery, such as success confirmation or error details.
No binary data output is produced by this operation.
Example output structure (simplified):
{
"status": "success",
"messageId": "some-message-id",
"details": { ... }
}
Dependencies
- Requires access to the Z-API WhatsApp service.
- Needs valid credentials: instance ID, token, and client token.
- The node makes HTTP POST requests to the Z-API endpoints.
- Network connectivity to
https://api.z-api.iomust be available. - No additional environment variables are required beyond the provided credentials.
Troubleshooting
- Invalid Credentials: If the instance ID, token, or client token are incorrect or expired, the API will reject requests. Verify and update credentials accordingly.
- Invalid Phone Number or Group ID: Ensure the phone number or group ID is correctly formatted and registered on WhatsApp.
- Image URL Issues: The image URL must be publicly accessible and point directly to an image file. Private URLs or unsupported formats may cause failures.
- API Rate Limits: Excessive requests may trigger rate limiting; consider adding delays or batching messages.
- Error Messages: The node throws errors if the operation is not supported or if the API returns an error. Review the error message for clues and check API documentation for specific error codes.
Links and References
- Z-API WhatsApp Official Documentation
- WhatsApp Business API Overview
- n8n HTTP Request Node Documentation (for understanding underlying request mechanics)