Actions21
- Message Actions
- Group Actions
- Chat Actions
- Contact Actions
Overview
This node integrates with the Green API service to manage WhatsApp groups and messages. Specifically, for the "Group" resource and the "Set Group Picture" operation, it allows users to set or update the picture of a WhatsApp group by uploading a JPG image.
Common scenarios where this node is beneficial include:
- Automating group management tasks such as updating group images based on events or campaigns.
- Maintaining consistent branding by programmatically setting group pictures.
- Enhancing group identity in WhatsApp by dynamically changing group images via workflows.
Practical example:
- A marketing team uses this node to update the group picture of their WhatsApp broadcast group every time a new campaign starts, ensuring the group image reflects the current promotion.
Properties
| Name | Meaning |
|---|---|
| Group ID | The unique identifier of the WhatsApp group to perform the action on (e.g., 972501234567-1587570015@g.us). |
| Group Image | Path to the JPG image file on the local filesystem that will be uploaded as the group's picture. |
Output
The node outputs a JSON array containing the response from the Green API after attempting to set the group picture. The structure typically includes success status and any relevant metadata returned by the API.
If the operation involves binary data (the group image), it is read from either the input binary data or the specified file path and sent as form data in the request.
Dependencies
- Requires an active Green API account with valid credentials: an instance ID and an API token.
- The node makes HTTP POST requests to the Green API endpoints.
- Access to the local filesystem is needed if the image is provided via a file path.
- Node environment must have permissions to read the specified image file.
- No additional external libraries beyond standard Node.js modules (
fs,path) are required.
Troubleshooting
- Failed to read file: If the node cannot read the image file at the specified path, ensure the path is correct and accessible by the n8n process.
- API errors: Errors returned by the Green API (e.g., invalid group ID, unauthorized access) will be thrown as node operation errors with details. Verify your credentials and group ID correctness.
- File format issues: The image must be a JPG file; other formats may cause the API to reject the upload.
- Binary data handling: If providing the image as binary input, ensure the binary property is correctly named and contains valid base64 data.
Links and References
- Green API Documentation – Official API docs for managing WhatsApp via Green API.
- WhatsApp Group Management – WhatsApp official guide on group features.
- n8n HTTP Request Node – For understanding how HTTP requests are made within n8n nodes.