WebSocket Trigger
AI-generatedSummary
Connect to a specified WebSocket URL, optionally sending cookies and custom headers, to receive and emit incoming WebSocket messages as JSON data including raw messages with timestamps if parsing fails. Automatically reconnect with configurable intervals and maximum attempts upon disconnection.
Inputs
- WebSocket URL (required) — The WebSocket URL to connect to (wss://...) for receiving messages.
- Cookie — Optional cookies to send with the WebSocket connection (e.g., sessionid=abc123; csrftoken=xyz789).
- Headers — Additional custom headers to send with the WebSocket connection, specified as multiple Name/Value pairs.
- Reconnect Interval — Time in milliseconds to wait before attempting to reconnect after disconnection. Use 0 to disable automatic reconnections.
- Max Reconnect Attempts — Maximum number of times to reconnect if disconnected. Use 0 for unlimited reconnections.
Output shape
a stream of JSON objects on separate events, each containing 'message' (the parsed JSON or raw string with timestamp), 'timestamp' (ISO string when message received), and 'url' (the connected WebSocket URL).
Messages failing JSON parsing are returned with 'raw' string and timestamp. The trigger auto-reconnects based on configured interval and max attempts, emitting messages continuously while connected.