Actions50
- Account Actions
- Call Actions
- Chat Actions
- Contact Actions
- Group Actions
- Instance Actions
- Media Actions
- Message Actions
- Session Actions
- User Actions
Overview
The node integrates with the WSAPI WhatsApp API to perform various chat-related operations. Specifically, the Set Presence operation allows users to update their activity status in a WhatsApp chat, such as showing typing, recording voice, or pausing these indicators. This is useful for creating interactive chatbots or automation workflows that simulate real-time user presence, enhancing user experience by signaling when a message is being composed or a voice note is being recorded.
Practical examples:
- A chatbot can show "typing" status while preparing a response.
- An automated system can indicate "recording" when sending voice messages.
- The presence indicator can be paused to stop showing any activity once the message is sent.
Properties
| Name | Meaning |
|---|---|
| Chat ID | WhatsApp chat identifier. For individual contacts, use phone number followed by @s.whatsapp.net. For groups, use 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 activity indicators |
Output
The node outputs JSON data representing the result of the presence update operation. The exact structure depends on the WSAPI response but typically includes confirmation of the presence status change or error details if the operation failed.
No binary data output is indicated for this operation.
Dependencies
- Requires an active connection to the WSAPI WhatsApp API.
- 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 (e.g., missing domain suffix like
@s.whatsapp.netor@g.us). - Network connectivity problems preventing access to the WSAPI endpoint.
- Missing or invalid API authentication token.
- Unsupported presence value or operation not recognized by the API.
- Invalid or incorrectly formatted Chat ID (e.g., missing domain suffix like
Error messages and resolutions:
"The resource "chat" is not known!": Indicates the resource parameter is incorrect; ensure "Chat" is selected."The operation "setPresence" is not implemented yet!": Suggests the operation name might be misspelled or unsupported; verify operation selection.- API errors returned from WSAPI will be included in the output JSON under an error field; check API credentials and request parameters.
- If the node fails but "Continue On Fail" is enabled, errors are returned as JSON objects per item instead of stopping execution.
Links and References
- WhatsApp Presence Indicators Documentation (general reference for presence concepts)
- WSAPI official documentation (requires access via your WSAPI provider)
- n8n documentation on creating custom nodes