Wuzapi User icon

Wuzapi User

Get user information and manage presence with Wuzapi WhatsApp API

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-sized avatar image. Users can choose to save the avatar as binary data within the workflow for further processing or storage.

Practical scenarios include:

  • Displaying user avatars in customer support dashboards.
  • Archiving profile pictures alongside chat logs.
  • Using avatars in automated messaging or CRM systems.

Properties

Name Meaning
Phone Number The phone number of the user whose avatar is to be retrieved. Example format: 5491155553934.
Preview Whether to get a thumbnail version (true) or the full picture (false) of the avatar.
Save as Binary Whether to save the avatar image as binary data inside the workflow for further use.
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 string pointing to the avatar image, which may be an HTTP URL or a base64-encoded data URI.
  • If the avatar is saved as binary, the node adds a binary property to the item with:
    • data: Base64-encoded image data.
    • mimeType: The MIME type of the image (e.g., image/jpeg).
    • fileExtension: File extension derived from the MIME type (e.g., jpg).
    • fileName: A generated filename like avatar-<phoneNumber>.<extension>.

If the avatar URL is an HTTP link, the node adds a note suggesting to use an HTTP Request node to download the image.

Dependencies

  • Requires an active connection to the Wuzapi WhatsApp API via an API key credential.
  • The node uses internal helper functions to validate phone numbers and make authenticated API requests.
  • No additional environment variables are explicitly required beyond the API authentication setup.

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: If the user has no profile picture or the phone number is not registered, the API may return empty or null data.
  • Binary Data Issues: When saving as binary, ensure the binary property name is unique and valid. If the avatar URL is HTTP, remember to use an HTTP Request node to download the image since the node only provides the URL.
  • API Errors: Network issues or invalid API credentials will cause request failures. Verify API key validity and network connectivity.

Links and References

Discussion