WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node interacts with the WSAPI WhatsApp API to manage WhatsApp chats programmatically. Specifically, the "Archive Chat" operation allows users to move a chat into or out of the archived folder in WhatsApp. This is useful for organizing conversations by hiding less active chats without deleting them.

Common scenarios include:

  • Automatically archiving chats after a conversation ends to keep the main chat list clean.
  • Restoring archived chats when new messages arrive or when user interaction is needed.
  • Managing chat visibility in bulk as part of workflow automation.

Example: Automatically archive customer support chats once resolved, then restore them if the customer sends a follow-up message.

Properties

Name Meaning
Chat ID The unique identifier of the WhatsApp chat. For individual contacts, this is the phone number plus @s.whatsapp.net. For groups, it is the group ID plus @g.us. Example: 1234567890@s.whatsapp.net or 120363123456789@g.us.
Archived Boolean flag indicating whether to move the chat to the archive (true) or restore it back to the main chat list (false).

Output

The node outputs JSON data representing the result of the archive/unarchive action on the specified chat. The exact structure depends on the WSAPI response but typically includes confirmation of the chat's updated archived status.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authenticating with the WSAPI WhatsApp API.
  • The node expects the base URL of the WSAPI endpoint configured in the credentials.
  • No additional external dependencies are required beyond the WSAPI service.

Troubleshooting

  • Invalid Chat ID: If the provided chat ID does not exist or is malformed, the API may return an error. Ensure the chat ID matches the format for individual or group chats.
  • Authentication Errors: Missing or invalid API credentials will cause authentication failures. Verify that the API key and base URL are correctly set in the node credentials.
  • Operation Not Implemented: If the node throws an error about the operation not being implemented, ensure you have selected the correct resource ("Chat") and operation ("Archive Chat").
  • Network Issues: Connectivity problems with the WSAPI endpoint can cause timeouts or request failures. Check network access and endpoint availability.

Links and References

Discussion