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 communication workflows where images need to be shared, such as sending product photos, event flyers, or visual updates directly through WhatsApp.
Practical examples include:
- Sending promotional images to customers.
- Sharing screenshots or diagrams in support conversations.
- Broadcasting event invitations with images to groups.
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 header required by the API. |
| 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 via WhatsApp. |
| 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, any error messages if applicable, and metadata returned by the API.
No binary data output is produced by this operation; all responses are JSON-formatted.
Dependencies
- Requires access to the Z-API WhatsApp service.
- Needs valid credentials: an instance ID, a token, and a client token.
- The node makes HTTP POST requests to the Z-API endpoints.
- Proper network connectivity to
https://api.z-api.iois necessary. - No additional environment variables or n8n-specific configurations beyond credential setup are required.
Troubleshooting
Common issues:
- Invalid or expired tokens may cause authentication failures.
- Incorrect phone number or group ID format can result in message delivery errors.
- Network connectivity problems can prevent API calls from succeeding.
- Missing required parameters (e.g., image URL) will cause the request to fail.
Error messages:
- Authentication errors usually indicate invalid instance/token/client token values. Verify and update credentials.
- "The operation 'send-image' is not supported for resource 'messages'" indicates a misconfiguration in the node parameters.
- API response errors may include details about invalid URLs or unsupported media formats.
Resolution tips:
- Double-check all input properties for correctness.
- Ensure the image URL is publicly accessible and points to a valid image file.
- Confirm that the phone number or group ID is correctly formatted according to WhatsApp standards.
- Review API documentation for rate limits or usage restrictions.
Links and References
- Z-API WhatsApp Official Documentation
- WhatsApp Business API Guidelines
- n8n HTTP Request Node Documentation (for understanding underlying HTTP calls)