WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node integrates with the WSAPI WhatsApp API to manage WhatsApp chats programmatically. Specifically, the "Mute Chat" operation allows users to enable or disable notifications for a particular WhatsApp chat, either an individual contact or a group chat. This is useful in scenarios where you want to silence notifications from specific chats temporarily or permanently without manually muting them in the WhatsApp app.

Practical examples include:

  • Automatically muting promotional or support group chats during non-working hours.
  • Enabling notifications again when important conversations resume.
  • Managing notification preferences for multiple chats in bulk via automation workflows.

Properties

Name Meaning
Chat ID The unique identifier of the WhatsApp chat to mute or unmute. For individual contacts, this is the phone number followed by @s.whatsapp.net. For groups, it is the group ID followed by @g.us. Example: 1234567890@s.whatsapp.net (individual) or 120363123456789@g.us (group).
Muted Boolean flag to enable or disable chat notifications. true mutes notifications for the specified chat; false enables notifications.

Output

The node outputs JSON data representing the result of the mute/unmute operation on the specified chat. The exact structure depends on the WSAPI response but generally includes confirmation of the action taken and possibly updated chat metadata.

No binary data output is indicated for this operation.

Dependencies

  • Requires an active connection to the WSAPI WhatsApp API service.
  • Needs an API key credential configured in n8n to authenticate requests to the WSAPI endpoint.
  • The base URL for the WSAPI must be set in the credentials configuration.

Troubleshooting

  • Invalid Chat ID: If the chat ID format is incorrect or does not exist, the API may return an error. Ensure the chat ID matches the expected format (phone@s.whatsapp.net for individuals, groupID@g.us for groups).
  • Authentication Errors: Missing or invalid API credentials will cause authentication failures. Verify that the API key credential is correctly set up.
  • Operation Not Implemented: If the node throws an error about the operation not being implemented, ensure the node version supports the "Mute Chat" operation.
  • Network Issues: Connectivity problems with the WSAPI endpoint can cause timeouts or request failures. Check network access and WSAPI service status.

Links and References

Discussion