WaliChat icon

WaliChat

Interact with WaliChat WhatsApp API

Actions148

Groups → Get Groups

AI-generated

Overview

This node interacts with the WaliChat WhatsApp API to perform various operations related to WhatsApp messaging and management. Specifically, for the Groups resource with the Get Groups operation, it retrieves group chats associated with a selected WhatsApp number (device). This is useful for scenarios where you want to list or manage WhatsApp groups linked to your account, such as fetching all groups for monitoring, analytics, or sending targeted messages.

Practical examples include:

  • Fetching all WhatsApp groups of a specific number to display in a dashboard.
  • Filtering groups by type (e.g., regular groups vs broadcast lists) for segmentation.
  • Paginating through large sets of groups to process them in batches.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) from which to retrieve groups.
Filter by Kind (Only for "getDeviceGroupChats" operation) Filter groups by their kind: "Group" or "Broadcast".
Results Page Size (Only for "getDeviceGroupChats" operation) Number of results to return per page.
Page Number (Only for "getDeviceGroupChats" operation) The page number to retrieve, starting from 0.

Output

The output is an array of JSON objects representing the groups retrieved from the specified WhatsApp number. Each object contains details about a group chat, such as its ID, name, type (group or broadcast), and other metadata provided by the WaliChat API.

If binary data were involved (not indicated here), it would typically represent media files or attachments related to groups, but this operation focuses on JSON data describing groups.

Dependencies

  • Requires an active connection to the WaliChat WhatsApp API.
  • Needs an API key credential configured in n8n to authenticate requests.
  • The node depends on internal methods that handle different resources; for groups, it calls executeGroupOperations from the groups action module.
  • The "WhatsApp Number" property dynamically loads available devices via a method named getDevices.

Troubleshooting

  • Common issues:

    • Invalid or missing WhatsApp number/device ID will cause the API call to fail.
    • Pagination parameters (size and page) must be valid numbers; otherwise, the API may return errors or empty results.
    • Network or authentication failures due to incorrect API keys or connectivity issues.
  • Error messages:

    • Errors returned from the WaliChat API will be surfaced as error messages in the node output.
    • If "Continue On Fail" is enabled, errors will appear in the output JSON under an error field instead of stopping execution.
  • Resolutions:

    • Verify the WhatsApp number/device ID is correct and accessible.
    • Check API key validity and permissions.
    • Adjust pagination parameters to valid ranges.
    • Ensure network connectivity to the WaliChat service.

Links and References

Discussion