Actions29
- Sessions Actions
- Chats Actions
- Contacts Actions
- Groups Actions
- Messages Actions
Overview
This node integrates with a WhatsApp HTTP API to manage sessions. Specifically, the "Add Session SSE" operation under the "Sessions" resource allows users to add or register a session using Server-Sent Events (SSE) for real-time communication or event streaming related to a WhatsApp session.
Common scenarios include:
- Establishing a live connection to monitor or interact with a WhatsApp session.
- Automating session management workflows where real-time updates from WhatsApp are needed.
- Integrating WhatsApp messaging capabilities into broader automation pipelines that require session tracking.
Example use case:
- A business wants to track incoming messages or status changes in a WhatsApp session and trigger further actions in n8n when events occur. This node operation would help set up the session stream to receive those events.
Properties
| Name | Meaning |
|---|---|
| Phone | The phone number identifying the WhatsApp session to add via SSE. Typically the user's phone associated with the WhatsApp API credentials. |
Output
The node outputs JSON data representing the response from the WhatsApp HTTP API after attempting to add the session via SSE. This typically includes session details or confirmation of the SSE connection setup.
If binary data is output, it would generally represent streamed event data from the session, but this is not explicitly detailed in the source.
Dependencies
- Requires an active WhatsApp HTTP API service endpoint.
- Needs an API authentication token or key configured in the node's credentials to authorize requests.
- The base URL for the WhatsApp API must be set in the credentials.
- Uses the
@devlikeapro/n8n-openapi-nodepackage internally to build properties and handle API requests.
Troubleshooting
Common issues:
- Invalid or missing phone number: Ensure the "Phone" property is correctly set and matches the format expected by the WhatsApp API.
- Authentication errors: Verify that the API key or token in credentials is valid and has necessary permissions.
- Connection failures: Check network connectivity and that the WhatsApp API base URL is reachable.
- SSE stream interruptions: Network instability can cause dropped connections; consider retry logic or monitoring.
Error messages:
- Authorization errors usually indicate invalid credentials.
- 404 or resource not found may mean the session ID (phone) does not exist or is incorrect.
- Timeout or connection refused errors suggest network or server availability problems.
Resolving these typically involves verifying input values, credential correctness, and network access.
Links and References
- WhatsApp HTTP API documentation (refer to your specific API provider)
- n8n OpenAPI Node integration guide: https://docs.n8n.io/integrations/builtin/app-nodes/n8n-openapi-node/
- Server-Sent Events (SSE) overview: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events