WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node integrates with the WSAPI WhatsApp API to manage chat presence indicators. Specifically, the Set Presence operation allows users to update the activity status shown in a WhatsApp chat, such as indicating when someone is typing, recording a voice message, or has paused these activities.

Common scenarios include:

  • Automating chatbots or customer support agents to show typing or recording indicators while preparing responses.
  • Enhancing user experience by signaling active engagement in a conversation.
  • Pausing indicators once the user stops interacting to reflect accurate presence.

For example, a chatbot could set the presence to "typing" while generating a reply and then switch to "paused" once the message is sent.

Properties

Name Meaning
Chat ID WhatsApp chat identifier. For individual contacts: phone number followed by @s.whatsapp.net. For groups: group ID followed by @g.us. Example: 1234567890@s.whatsapp.net or 120363123456789@g.us.
Presence Activity indicator to show in the chat. Options:
- Typing: Show typing indicator
- Recording: Show voice recording indicator
- Paused: Stop all indicators

Output

The node outputs JSON data representing the result of the presence update operation. This typically includes confirmation of the action or any relevant metadata returned by the WSAPI WhatsApp API.

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 service to be configured in the credentials.
  • Network connectivity to the WSAPI endpoint is necessary.

Troubleshooting

  • Invalid Chat ID: If the chat identifier format is incorrect (e.g., missing @s.whatsapp.net or @g.us), the API may reject the request. Ensure the chat ID matches the expected pattern.
  • Authentication Errors: Missing or invalid API credentials will cause authentication failures. Verify that the API key credential is correctly set up.
  • Unsupported Operation: If the operation name is misspelled or not implemented, the node will throw an error indicating the operation is unknown.
  • Network Issues: Connectivity problems to the WSAPI endpoint can cause timeouts or failed requests. Check network settings and endpoint availability.
  • Rate Limits: Excessive presence updates in a short time might be throttled by the API. Implement appropriate delays if needed.

Links and References

Discussion