Wappfy icon

Wappfy

Interact with WhatsApp through Wappfy API

Overview

This node integrates with the Wappfy API to interact with WhatsApp data and functionality. Specifically, for the Chat - List operation, it retrieves a list of chats from a WhatsApp session managed by Wappfy. This is useful for workflows that need to process or analyze chat metadata, such as monitoring active conversations, generating reports, or triggering actions based on chat activity.

Practical examples:

  • Automatically fetching recent chats to display in a dashboard.
  • Filtering chats by date or name for targeted messaging campaigns.
  • Integrating chat lists into CRM systems to synchronize communication history.

Properties

Name Meaning
Limit Number of chat items to return (default 20).
Offset Number of chat items to skip before starting to return results (default 0).
Sort By Field to sort the chat list by. Options: Message Timestamp, ID, Name.
Sort Order Order to sort the results. Options: Ascending, Descending (default Descending).

Output

The output is an array of JSON objects representing individual chats retrieved from the Wappfy API. Each object contains chat metadata such as chat ID, name, last message timestamp, and other relevant details provided by the API.

The node does not output binary data for this operation.

Example output structure (simplified):

[
  {
    "id": "123456789@c.us",
    "name": "John Doe",
    "messageTimestamp": 1680000000,
    "unreadCount": 5,
    ...
  },
  {
    "id": "987654321@g.us",
    "name": "Family Group",
    "messageTimestamp": 1680000500,
    "unreadCount": 0,
    ...
  }
]

Dependencies

  • Requires a valid Wappfy API credential with:

    • Base URL of the Wappfy API instance.
    • Instance name identifying the WhatsApp session.
    • An API key for authentication.
  • The node makes HTTP GET requests to the endpoint:

    {baseUrl}/api/{instanceName}/chats?limit={limit}&offset={offset}&sortBy={sortBy}&sortOrder={sortOrder}
    
  • Proper configuration of the Wappfy API credentials in n8n is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing API key or instance name will cause authentication failures.
    • Incorrect base URL or network connectivity issues may prevent API calls.
    • Requesting too large a limit may result in slow responses or timeouts.
  • Error messages:

    • Authentication errors typically indicate invalid credentials; verify API key and instance name.
    • HTTP 404 or 400 errors suggest incorrect endpoint parameters; check property values.
    • Network errors require checking internet connection and API server availability.
  • To resolve errors, ensure all required credentials are correctly set, and input parameters conform to expected formats and ranges.

Links and References

Discussion