Registry / devops / n8n-nodes-websockets-lite-a

n8n-nodes-websockets-lite-a

JSON →
library0.6.3jsnpmunverified

Community node package for n8n (stable v0.6.3) that adds WebSocket trigger and send nodes. Supports events: open, close, message; custom request headers, initial data, timed heartbeat, and one-time reply to webhook. Released under Apache-2.0, requires n8n-workflow peer dependency and Node >=18.10. Lightweight alternative to full WebSocket nodes.

npm install n8n-nodes-websockets-lite-a
INSTALL
IMPORT
SIG · N8N-NODES-WEBSOCKE
N
n8n-nodes-websockets-lite-a
devopsjavascriptv0.6.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WebsocketsNode
import { WebsocketsNode } from 'n8n-nodes-websockets-lite-a'
const { WebsocketsNode } = require('n8n-nodes-websockets-lite-a')
ESM import; CommonJS require may not work depending on n8n version.
WebsocketsSendNode
import { WebsocketsSendNode } from 'n8n-nodes-websockets-lite-a'
Named export for the send node.
default import
import WebSocketsLite from 'n8n-nodes-websockets-lite-a'
import * as WebSocketsLite from 'n8n-nodes-websockets-lite-a'
Default export is an object containing both nodes.

Demonstrates importing both nodes and typical parameter setup for a WebSocket trigger with heartbeat.

import { WebsocketsNode, WebsocketsSendNode } from 'n8n-nodes-websockets-lite-a'; // In your n8n workflow: // Use WebsocketsNode as a trigger node (event: open, close, message) // Use WebsocketsSendNode to send messages // Example credential setup (if needed): const wsNode = new WebsocketsNode(); wsNode.description.name = 'WebSocket Trigger'; // Parameters: // url: 'wss://example.com/ws' // event: 'message' // headers: { Authorization: 'Bearer token' } // initialData: '{"type":"subscribe"}' // heartbeatInterval: 30000 // heartbeatData: '{"type":"ping"}'
Debug
Known issues
gotchaHeartbeat data is sent as-is; must be valid JSON string.
fix
Use JSON.stringify() or ensure string is valid JSON.
affects: >=0.1.0
gotchaWebsocketSendNode can only send one reply per trigger execution (one-time reply).
fix
Use multiple send nodes if multiple replies are needed.
affects: >=0.1.0
breakingCustom headers must be provided as object, not array.
fix
Use { 'Header-Name': 'value' } format.
affects: >=0.5.0
Errors
Common errors & fixes
Error: Cannot find module 'n8n-nodes-websockets-lite-a'
Package not installed or not in n8n's node_modules.
fix
Install with `npm install n8n-nodes-websockets-lite-a` or manually add to custom nodes folder.
TypeError: WebsocketsNode is not a constructor
Using default import incorrectly or wrong import path.
fix
Use `import { WebsocketsNode } from 'n8n-nodes-websockets-lite-a'`.
WebSocket connection failed: Error in initial data
Initial data is not valid JSON.
fix
Ensure initialData is a stringified JSON object, e.g., '{"key":"value"}'.
Upgrade
Version history
0.6.3latest on npm
Audit
Dependencies
n8n-workflowrequiredPeer dependency required for n8n node development
Agent activity
4 hits · last 30 days
node
4
Resources
n8n-nodes-websockets-lite-a — npm install n8n-nodes-websockets-lite-a · libregistry