Enhanced WebSocket nodes for n8n (v1.0.1) providing real-time bidirectional communication between workflows and external applications, including a WebSocket trigger (server) and a WebSocket response node. Features include broadcast, reply-to-sender, targeted messaging, authentication via tokens/query parameters, heartbeat, and connection management. Released under MIT, maintained on GitHub, requires n8n-workflow as a peer dependency. Regularly updated, with community support.
npm install n8n-nodes-websocketNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows minimal setup for an echo server using WebSocketTrigger and WebSocketResponse nodes in n8n.
Set Bind Address to 'localhost' in node configuration to restrict connections.
Ensure data includes property 'connectionId' (camelCase) when sending to specific connection.
Update to use 'Reply to Sender' as operation name.
Set Heartbeat Interval to at least 30 seconds for production.
Update workflow expressions that reference $json.data.message to $json.data.data.
npm install n8n-workflow --save
Change to import { WebSocketTrigger } from 'n8n-nodes-websocket'Check port availability with 'netstat -an | grep 8080' or use a different port
Ensure WebSocket client is still connected and connectionId is valid