WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node integrates with the WSAPI WhatsApp API, enabling automation and interaction with WhatsApp chats. Specifically, the Chat - Mark as Read operation marks a specified WhatsApp chat as read. This is useful in scenarios where you want to programmatically update the read status of messages in individual or group chats, for example:

  • Automatically marking incoming messages as read after processing them.
  • Synchronizing message read status between systems.
  • Managing notifications by clearing unread indicators.

Properties

Name Meaning
Chat ID The unique identifier of the WhatsApp chat to mark as read. For individual contacts, use phone number + @s.whatsapp.net. For groups, use the group ID + @g.us. Examples: 1234567890@s.whatsapp.net (individual), 120363123456789@g.us (group).

Output

The node outputs JSON data representing the result of the "mark as read" operation. Typically, this will include confirmation that the chat was successfully marked as read or an error message if the operation failed.

No binary data output is expected from this operation.

Dependencies

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

Troubleshooting

  • Common issues:

    • Invalid or incorrectly formatted Chat ID can cause failures. Ensure the Chat ID matches the required format for contacts or groups.
    • Authentication errors if the API key or base URL is misconfigured.
    • Network connectivity problems preventing access to the WSAPI endpoint.
  • Error messages:

    • "The resource "chat" is not known!" — indicates an invalid resource selection; ensure "Chat" is selected.
    • "The operation "markChatAsRead" is not implemented yet!" — suggests the operation name might be misspelled or unsupported; verify operation name.
    • API errors returned from WSAPI will typically include descriptive messages; check those for guidance.
  • Resolutions:

    • Double-check Chat ID formatting.
    • Verify API credentials and base URL.
    • Confirm network access to the WSAPI endpoint.
    • Enable "Continue On Fail" in the node settings to handle errors gracefully during batch executions.

Links and References

Discussion