WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node interacts with the WSAPI WhatsApp API to perform operations related to WhatsApp groups. Specifically, the "Get Group" operation retrieves detailed information about a specified WhatsApp group using its unique group identifier.

Common scenarios where this node is beneficial include:

  • Fetching metadata or current state of a WhatsApp group for monitoring or reporting.
  • Integrating WhatsApp group data into other systems or workflows.
  • Automating management tasks that require knowledge of group details before proceeding.

Practical example:

  • A user wants to retrieve the name, description, participants, and other details of a WhatsApp group identified by its group ID to display in a dashboard or trigger further automation based on group attributes.

Properties

Name Meaning
Group ID The unique identifier of the WhatsApp group. Format: group ID + @g.us (e.g., 120363123456789@g.us). This is required to specify which group to retrieve.
Cache Results Boolean option to cache the result of the request for repeated calls with the same Group ID. Helps reduce API calls if the same group info is requested multiple times.
Cache TTL (sec) Time-to-live in seconds for the cached entry when caching is enabled. Defines how long the cached data remains valid before a fresh API call is made. Minimum value is 1 second.

Output

The node outputs JSON data representing the WhatsApp group's details. This typically includes fields such as group name, description, participants list, group picture URL, invite links, and other metadata provided by the WSAPI.

If the node supports binary data output (not explicitly shown here), it would likely be used for group pictures or media associated with the group, but this operation primarily returns JSON metadata.

Dependencies

  • Requires an active connection to the WSAPI WhatsApp API service.
  • Needs an API key credential configured in n8n to authenticate requests.
  • The base URL for the WSAPI must be set in the credentials.
  • No additional external dependencies are indicated.

Troubleshooting

  • Invalid Group ID format: Ensure the Group ID follows the correct format (<group_id>@g.us). Incorrect formatting will cause the API to reject the request.
  • Group not found or inaccessible: If the group does not exist or the authenticated account lacks permission, the node may return an error or empty response.
  • Caching issues: When enabling caching, stale data might be returned if the cache TTL is too long. Adjust TTL according to your freshness requirements.
  • API connectivity errors: Verify that the API key and base URL are correctly configured and that the WSAPI service is reachable.
  • Unhandled operation error: If the operation is not implemented or recognized, the node throws an error indicating the operation is not supported.

Links and References

Discussion