Wappfy icon

Wappfy

Interact with WhatsApp through Wappfy API

Overview

This node enables interaction with WhatsApp through the Wappfy API, providing a wide range of operations on various WhatsApp resources such as sessions, messages, chats, contacts, groups, statuses, channels, profiles, linked IDs, and files. Specifically, for the Chat resource and the Delete All Messages operation, the node deletes all messages within a specified chat.

This operation is useful when you want to clear the entire message history of a particular chat programmatically, for example:

  • Cleaning up old conversations in bulk.
  • Resetting a chat before starting a new conversation flow.
  • Managing storage or privacy by removing all messages from a chat.

Properties

Name Meaning
Chat ID The unique identifier of the chat whose messages will be deleted (e.g., 123456789@c.us for direct chat or 123456789@g.us for group chat).

Output

The output of this operation is the JSON response returned by the Wappfy API after attempting to delete all messages in the specified chat. This typically includes confirmation of success or details about any error encountered.

The node outputs an array of items where each item contains a json property holding the API response object.

No binary data output is involved in this operation.

Dependencies

  • Requires an active Wappfy API credential configured in n8n, including:
    • Base URL of the Wappfy API.
    • Instance name identifying the WhatsApp session.
    • An API key for authentication.
  • The node makes HTTP DELETE requests to the endpoint:
    /api/{instanceName}/chats/{chatId}/messages

Troubleshooting

  • Common issues:

    • Invalid or missing Chat ID: Ensure the Chat ID is correctly provided and corresponds to an existing chat.
    • Authentication errors: Verify that the API key and instance name are correctly set in credentials.
    • Network or API availability issues: Confirm that the Wappfy API service is reachable and operational.
  • Error messages:

    • "404 Not Found": The specified chat does not exist or the Chat ID is incorrect.
    • "401 Unauthorized" or "403 Forbidden": API key or credentials are invalid or lack necessary permissions.
    • "400 Bad Request": The request parameters are malformed; check the Chat ID format.

To resolve these errors, double-check input parameters, credentials, and network connectivity.

Links and References


If you need details on other operations or resources, feel free to ask!

Discussion