Wazend API icon

Wazend API

Interact with Wazend API

Overview

The node named "Wazend API" provides integration with the Wazend API, allowing users to interact programmatically with this service. Specifically, for the Resource "Chat" and Operation "Buscar Mensajes" (Find Messages), the node enables retrieving chat messages from a specified contact within a given instance of the Wazend platform. This is useful for scenarios such as fetching conversation history, auditing communications, or building custom chat analytics.

Practical examples include:

  • Retrieving the last 10 messages exchanged with a particular contact.
  • Paginating through chat history by specifying page number and message count per page.
  • Integrating chat data into other workflows for processing or reporting.

Properties

Name Meaning
Nombre De La Instancia The name of the Wazend instance to connect to.
Contacto The contact's phone number or identifier whose messages are to be retrieved.
Página The page number of the message list to fetch (used for pagination).
Cantidad Por Página The number of messages to retrieve per page (page size).

Output

The node outputs a JSON array where each element represents a message retrieved from the specified contact in the given instance. Each message object typically contains details such as message content, timestamp, sender information, and any metadata provided by the Wazend API.

If the node supports binary data output (not explicitly shown in the code), it would represent media attachments or files associated with chat messages.

Dependencies

  • Requires an active connection to the Wazend API endpoint at https://docs.wazend.net/wazend.
  • Needs an API authentication credential configured in n8n to authorize requests.
  • The node depends on the internal helper functions mapped under resourceOperationsFunctions to execute the specific operation logic.

Troubleshooting

  • Operation not supported error: If you select an unsupported operation or resource, the node throws an error indicating the function is not supported. Ensure that the Resource is set to "chat-api" and Operation to "find-messages" for this use case.
  • Missing required parameters: The properties "Nombre De La Instancia" and "Contacto" are mandatory. Omitting them will likely cause request failures.
  • API connectivity issues: Network problems or invalid credentials can prevent successful API calls. Verify API keys and network access.
  • Pagination errors: Providing invalid page numbers or offsets may result in empty results or errors. Use positive integers for these fields.

Links and References

Discussion