WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node integrates with the WSAPI WhatsApp API to perform various operations on WhatsApp resources. Specifically, for the Contact resource and the Get Picture operation, it retrieves the profile picture of a specified WhatsApp contact by their unique identifier (phone number plus domain). This is useful in scenarios where you want to display or process the contact's profile image within your workflow, such as enriching contact data, displaying user avatars in dashboards, or archiving profile pictures.

Practical examples:

  • Automatically fetching and displaying WhatsApp contact pictures in a CRM system.
  • Archiving profile pictures of contacts for record-keeping.
  • Using contact images in customer support workflows to personalize interactions.

Properties

Name Meaning
Contact ID The WhatsApp contact identifier, formatted as phone number with country code plus @s.whatsapp.net. Example: 1234567890@s.whatsapp.net. This uniquely identifies the contact whose picture will be retrieved.
Cache Results Boolean option to cache the result of the picture retrieval for repeated requests with the same Contact ID. Helps reduce API calls and improve performance when requesting the same contact multiple times.
Cache TTL (sec) Time-to-live in seconds for the cached entry if caching is enabled. Defines how long the cached picture remains valid before a fresh request is made. Minimum value is 1 second. Default is 300 seconds (5 minutes).

Output

The node outputs JSON data representing the contact's profile picture information. The exact structure depends on the WSAPI response but typically includes metadata about the picture and possibly a URL or binary data reference to the image itself.

If the node supports binary output for the picture (not explicitly shown in the source), it would provide the image data in the binary field, allowing downstream nodes to handle or save the image directly.

Dependencies

  • Requires an API key credential for authenticating with the WSAPI WhatsApp API.
  • The base URL for the WSAPI must be configured in the node credentials.
  • Network access to the WSAPI endpoint is necessary.
  • No additional external dependencies are indicated beyond the WSAPI service.

Troubleshooting

  • Invalid Contact ID format: Ensure the Contact ID follows the required format (phoneNumber@s.whatsapp.net). Incorrect formatting will likely cause errors or no results.
  • API authentication errors: Verify that the API key credential is correctly set up and has sufficient permissions.
  • Cache not updating: If caching is enabled but updated pictures are not reflected, consider lowering the Cache TTL or disabling caching temporarily.
  • No picture found: Some contacts may not have a profile picture set; the node might return empty or null data in such cases.
  • Network issues: Connectivity problems to the WSAPI endpoint will cause failures; check network settings and endpoint availability.

Links and References


Note: The above summary is based solely on static analysis of the provided source code and property definitions.

Discussion