Wassenger icon

Wassenger

Interact with Wassenger WhatsApp API

Actions148

Overview

This node interacts with the Wassenger WhatsApp API to retrieve chat data associated with a specified WhatsApp number. It is designed to fetch chats filtered by various criteria such as status, unread messages, chat type, assigned agents, labels, and more. This functionality is useful for automating workflows that require monitoring or processing WhatsApp conversations, such as customer support ticketing, sales follow-ups, or analytics on chat activity.

For example, you could use this node to:

  • Retrieve all active chats for a specific WhatsApp number to display in a dashboard.
  • Filter chats that have unread messages to trigger notifications or reminders.
  • Search chats by keywords or labels to segment conversations for targeted actions.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) from which to retrieve chats.
Filters A collection of optional filters to narrow down the chats returned:
- Status Filter chats by their status. Options: Pending, Active, Resolved, Archived, Muted.
- Unread Only If true, only chats with unread messages are returned.
- Active Chats Only If true, only active chats/groups/channels are included.
- Can Send Messages If true, only chats that can receive messages are included.
- Read-Only Chats If true, only read-only chats that cannot accept messages are included.
- Chat Type Filter chats by type. Options: Chat, Group, Channel, Community.
- Assigned Agent IDs Filter chats assigned to specific agents by their IDs. Multiple values allowed.
- Search Term Text search to match phone numbers, names, etc., within chats.
- Labels Filter chats by labels. Multiple values allowed. Use * to include any labeled chat.
- Exclude Labels Exclude chats with specific labels. Multiple values allowed. Use * to exclude any labeled chat.
- Include Items Specify related data to include in the response. Options: Messages, Notes, Participants.
- Results Page Size Number of results per page (pagination). Default is 20.
- Page Number Page number for pagination, starting from 0.
- Sort Sort order for results. Options: Most Recent First, Oldest First, Unread First, Name A-Z, Name Z-A.

Output

The node outputs an array of JSON objects representing the chats retrieved from the Wassenger API according to the specified filters. Each chat object may include details such as chat ID, name, status, unread count, type, assigned agents, labels, and optionally related data like messages, notes, and participants if requested.

If binary data were involved (e.g., files or media), it would be summarized accordingly, but this operation focuses on chat metadata and related textual information.

Dependencies

  • Requires an API key credential for authenticating with the Wassenger WhatsApp API.
  • The node depends on the Wassenger service being accessible and properly configured.
  • Pagination and filtering rely on the API's support for these features.
  • The node uses internal methods to load options dynamically for properties like WhatsApp numbers, agents, and labels.

Troubleshooting

  • Common Issues:

    • Invalid or missing API key will cause authentication failures.
    • Specifying a WhatsApp number (device) that does not exist or is inactive will result in no data or errors.
    • Using incompatible filter combinations might return empty results.
    • Pagination parameters out of range may lead to empty pages.
  • Error Messages:

    • Authentication errors typically indicate invalid credentials; verify the API key.
    • "No chats found" or empty output means filters may be too restrictive or no matching data exists.
    • Network or API downtime will cause request failures; check connectivity and service status.
  • Resolutions:

    • Ensure the API key is correctly set up in n8n credentials.
    • Validate the WhatsApp number ID and other filter inputs.
    • Adjust filters to broaden the search if no results appear.
    • Retry after some time if the API service is temporarily unavailable.

Links and References

Discussion