Actions148
- Send messages Actions
- Outbound Messages Actions
- WhatsApp Numbers Actions
- Groups Actions
- Channels Actions
- Chats Actions
- Chat Contacts Actions
- Chat Messages Actions
- Chat Files Actions
- Team Actions
- Labels Actions
- Departments Actions
- Files Actions
- Quick replies Actions
- Queue Actions
- WhatsApp session Actions
- WhatsApp profile Actions
- Business catalog Actions
- Campaigns Actions
- Meeting Links Actions
- User Status Actions
- Webhooks Actions
- Other Actions
Overview
The "Sync session" operation under the "WhatsApp session" resource in this node is designed to synchronize the state of a WhatsApp session associated with a specific WhatsApp number (device). This operation is useful for ensuring that the session data within n8n stays up-to-date with the actual WhatsApp session status, which can be critical for workflows that depend on real-time or accurate session information.
Practical scenarios include:
- Automatically updating session status before sending messages.
- Monitoring session connectivity to trigger alerts or fallback actions.
- Synchronizing session data after manual interventions or external changes.
Properties
| Name | Meaning |
|---|---|
| WhatsApp Number | The ID of the WhatsApp number (device) whose session you want to synchronize. This is selected from available devices loaded dynamically. |
Output
The output of this operation is a JSON object representing the synchronized session data for the specified WhatsApp number. It typically includes details about the session's current state, such as connection status, authentication info, and other relevant metadata.
If the node supports binary data output for this operation, it would represent any session-related files or media, but based on the provided code and context, the output is purely JSON structured data reflecting session synchronization results.
Dependencies
- Requires an API key credential for authenticating with the Wassenger WhatsApp API service.
- The node depends on the external Wassenger API to perform session synchronization.
- Proper configuration of the API key credential in n8n is necessary.
- The "WhatsApp Number" property relies on a dynamic options loader method (
getDevices) to fetch available devices.
Troubleshooting
Common Issues:
- Invalid or expired API key leading to authentication failures.
- Specifying a WhatsApp number (device) that does not exist or is not linked to the account.
- Network connectivity issues preventing communication with the Wassenger API.
Error Messages:
- Errors related to authentication usually indicate problems with the API key; verify and update credentials.
- Errors indicating device not found suggest checking the "WhatsApp Number" selection.
- Timeout or network errors require checking internet connectivity and API endpoint availability.
Resolution Tips:
- Ensure the API key credential is correctly set up and has sufficient permissions.
- Use the dynamic device loader to select valid WhatsApp numbers.
- Retry operations after resolving network issues.
Links and References
- Wassenger Official API Documentation (for detailed API capabilities and authentication)
- n8n Documentation on Creating Custom Nodes
- General WhatsApp Business API guidelines for session management (varies by provider)