Overview
This node integrates with the Whatsapp WebJS API to manage Whatsapp sessions and send messages. Specifically, the Session - Start operation initiates a new Whatsapp session by registering a webhook URL where session events will be sent. This is useful for automating Whatsapp interactions, such as receiving message notifications or status updates in real-time.
Common scenarios include:
- Starting a new Whatsapp session programmatically to begin sending and receiving messages.
- Setting up a webhook endpoint to listen for session events like incoming messages or connection status changes.
- Automating Whatsapp workflows that depend on session lifecycle management.
Example: You want to start a Whatsapp session and provide your server’s webhook URL so that all session-related events are pushed to your system for further processing.
Properties
| Name | Meaning |
|---|---|
| Webhook URL | The URL of the webhook endpoint where session events will be sent. Must be a valid URL. |
Output
The output JSON contains the response from the Whatsapp WebJS API after attempting to start the session. It typically includes details about the session status or any errors encountered during startup.
No binary data is output for this operation.
Example output structure (simplified):
{
"status": "success",
"sessionId": "your-session-id",
"message": "Session started successfully"
}
Dependencies
- Requires an active API key credential for the Whatsapp WebJS API.
- The node uses the base URL and session identifier from the configured credentials.
- The webhook URL must be publicly accessible to receive session event callbacks.
Troubleshooting
- Invalid Webhook URL: If the webhook URL is malformed or unreachable, the session start may fail. Ensure the URL is correct and accessible over the internet.
- Authentication Errors: Missing or invalid API credentials will cause authentication failures. Verify that the API key credential is correctly set up.
- Session Already Active: Attempting to start a session that is already running might result in an error or unexpected behavior. Check session status before starting.
- Network Issues: Connectivity problems between n8n and the Whatsapp WebJS API can cause request failures. Confirm network access and API availability.
Links and References
- Whatsapp WebJS API Documentation
- n8n Webhook Documentation (for setting up webhook URLs)