Overview
This node interacts with the Wuzapi WhatsApp API to retrieve user-related information and manage presence status. Specifically, the "Get Avatar" operation fetches a user's profile picture based on their phone number. It supports retrieving either a thumbnail preview or the full avatar image. Users can choose to save the avatar as binary data within the workflow for further processing or simply get a URL or base64 string.
Common scenarios:
- Displaying a contact's WhatsApp profile picture in a CRM or dashboard.
- Downloading and storing user avatars for offline use or archival.
- Using the avatar image in automated messaging or notification workflows.
Practical example:
You have a list of customers' phone numbers and want to display their WhatsApp profile pictures in your app. This node can fetch each avatar, optionally saving it as binary data, so you can embed or manipulate the images directly.
Properties
| Name | Meaning |
|---|---|
| Phone Number | The phone number of the user whose avatar you want to retrieve (e.g., "5491155553934"). |
| Preview | Whether to get a thumbnail version (true) or the full-size avatar (false). |
| Save as Binary | Whether to save the avatar image as binary data inside the workflow (true or false). |
| Binary Property Name | The name of the binary property where the avatar will be stored if "Save as Binary" is enabled. |
Output
The output JSON contains the response from the Wuzapi API under the data field. This typically includes:
- A URL to the avatar image or a base64-encoded image string.
- If "Save as Binary" is enabled and the avatar is provided as a base64 data URI, the node converts this into binary data attached to the item under the specified binary property name. This binary data includes:
data: Base64-encoded image content.mimeType: The MIME type of the image (e.g.,image/jpeg).fileExtension: The file extension derived from the MIME type (e.g.,jpg).fileName: A generated filename likeavatar-{phoneNumber}.jpg.
If the avatar URL starts with "http", the node adds a note suggesting to use an HTTP Request node to download the image.
Dependencies
- Requires an API key credential for authenticating with the Wuzapi WhatsApp API.
- Uses internal helper functions for phone number validation and making authenticated API requests.
- No additional external dependencies beyond the configured API credentials.
Troubleshooting
- Invalid phone number format: The node validates phone numbers before sending requests. Ensure phone numbers are in the correct international format without spaces or special characters.
- Avatar not found or empty response: The user may not have a profile picture set on WhatsApp, or the phone number might be incorrect.
- Binary data not saved: If "Save as Binary" is enabled but the avatar URL is an HTTP link instead of a base64 string, the node does not download the image automatically. Use an HTTP Request node to fetch the image.
- API errors: Errors returned by the Wuzapi API will be surfaced. Check that your API key is valid and has sufficient permissions.
Links and References
- Wuzapi WhatsApp API Documentation (example placeholder, replace with actual)
- n8n documentation on Working with Binary Data
- n8n documentation on HTTP Request Node