Wazend API icon

Wazend API

Interact with Wazend API

Overview

This node, named "Wazend API," allows interaction with the Wazend API to perform various operations on different resources. Specifically, for the Chat resource and the Gestionar Archivo (Manage Archive) operation, it enables users to archive or unarchive chat conversations by specifying details such as the contact number, message ID, and whether the message was sent by the instance.

Common scenarios include:

  • Archiving old or inactive chat conversations to keep the chat list organized.
  • Unarchiving conversations when a user wants to revisit or continue a previously archived chat.
  • Managing chat archives programmatically within automated workflows.

Practical example:

  • Automatically archive chats after a certain period of inactivity.
  • Unarchive chats when a new message arrives from an archived conversation.

Properties

Name Meaning
Nombre De La Instancia The name of the instance interacting with the API; identifies the source of the request.
Contacto The phone number or identifier of the chat contact whose conversation is to be archived/unarchived.
Acción Choose between "Archivar" (archive) or "Desarchivar" (unarchive) the conversation.
ID Del Último Mensaje The ID of the last message in the conversation, used to identify the specific chat thread.
El Mensaje Es Mío Boolean indicating if the last message was sent by the instance itself (true/false).

Output

The node outputs a JSON array containing the result of the archive management operation. The exact structure depends on the API response but generally includes confirmation of the archive/unarchive action performed on the specified chat conversation.

If the node supports binary data output, it is not indicated in the provided code or properties, so the output is purely JSON-based.

Dependencies

  • Requires an active connection to the Wazend API endpoint at https://docs.wazend.net/wazend.
  • Needs an API authentication credential configured in n8n (referred generically as an API key or token).
  • The node uses standard HTTP headers for JSON content type and accepts JSON responses.

Troubleshooting

  • Unsupported Operation Error: If the selected operation is not supported for the chosen resource, the node throws an error stating the operation is not supported. Ensure that the resource and operation names are correctly set.
  • Missing Required Parameters: All required fields such as instance name, contact, message ID, and archive action must be provided; otherwise, the API call may fail.
  • API Connectivity Issues: Network problems or incorrect API credentials can cause failures. Verify API keys and network access.
  • Invalid Message ID or Contact: Providing incorrect identifiers may lead to errors or no changes in the archive status.

Links and References

Discussion