Actions21
Overview
This node, named "ZuckZapGo AI," integrates with the ZuckZapGo WhatsApp API to perform various WhatsApp messaging and information retrieval operations. The "Get Avatar" operation specifically allows users to download profile pictures (avatars) from WhatsApp users, groups, newsletters, or LIDs. It supports fetching either a thumbnail preview or the full-quality avatar image. Users can optionally save the avatar as binary data for further processing or storage.
Common scenarios where this node is beneficial include:
- Retrieving user or group avatars for display in dashboards or CRM systems.
- Archiving profile pictures for contact management.
- Using avatars as part of AI workflows that analyze or personalize communication based on profile images.
Practical example:
- A business automation workflow fetches the avatar of a customerβs WhatsApp number to display alongside their chat messages in a support dashboard.
- An AI assistant retrieves group avatars to better identify conversation contexts when summarizing chats.
Properties
| Name | Meaning |
|---|---|
| Target | Phone number, Group ID (@g.us), Newsletter ID (@newsletter), or LID (@lid) to get the avatar from. This identifies the WhatsApp entity whose avatar will be retrieved. |
| Preview | Boolean flag indicating whether to retrieve a thumbnail preview (true) or the full picture (false). |
| Save as Binary | Boolean flag to decide if the avatar should be saved as binary data in the output instead of just JSON metadata. |
| Binary Property Name | The name of the binary property under which the avatar image will be stored if "Save as Binary" is enabled. Defaults to "avatar". |
| Optimize Response | (Tool mode only) Whether to optimize the response to reduce token usage and improve AI processing. |
| Max Response Length | (Tool mode only) Maximum number of characters in the response; longer responses will be truncated. |
| Include Only Essential Fields | (Tool mode only) Whether to include only essential fields in the response to reduce noise. |
| Response Format | (Tool mode only) How to format the response for optimal AI agent understanding. Options are: "Optimized" (clean, structured), "Raw" (complete raw API response), or "Summary" (brief key info). |
Output
The node outputs a JSON object containing the API response data about the requested avatar. The structure includes at least an avatarUrl field pointing to the URL of the avatar image.
If "Save as Binary" is enabled and an avatar URL is present, the node performs an HTTP GET request to download the avatar image and stores it as binary data in the specified binary property. This binary data includes:
- Base64-encoded image data.
- MIME type (typically "image/jpeg").
- A generated filename based on the target identifier.
If no avatar is found or the user has no avatar, the output JSON will contain an error message indicating this.
Dependencies
- Requires an active connection to the ZuckZapGo WhatsApp API via an API key credential configured in n8n.
- Uses internal helper functions to prepare media data and make authenticated API requests.
- For binary avatar saving, the node makes an additional HTTP request to download the avatar image.
Troubleshooting
- Binary Property Not Found: If "Save as Binary" is enabled but the specified binary property does not exist in the input data, the node will throw an error like
Binary property "X" not found. Ensure the binary property name matches the actual input binary data property. - No Avatar Found: If the target user/group/newsletter/LID has no avatar, the node returns an error message in the JSON output. Verify the target identifier is correct and that the entity has a profile picture.
- Invalid Target Format: The target must be a valid phone number or ID string including suffixes like
@g.us,@newsletter, or@lid. Incorrect formatting may cause the API call to fail. - API Authentication Errors: Ensure the API key credential is correctly set up and has permissions to access the avatar endpoint.
- Network Issues: Downloading the avatar image for binary saving requires network access. Failures here may result in errors or missing binary data.
Links and References
- ZuckZapGo GitHub Repository β Official source and documentation for the ZuckZapGo WhatsApp API integration.