Skip to main content

Events node

The Events node lets you stream live data into your flow using WebSockets or server-sent events. It’s designed for real-time dashboards, monitoring tools, or any flow that reacts to updates as they happen.

What can it do?

  • Connect to a WebSocket or event stream using a URL
  • Continuously receive data as events occur
  • Automatically emit a pulsating output — new data shows up live in your flow
  • Supports optional headers, body content, and proxying for local setups

How to use it

  1. Add an Events node to your flow.

  2. Fill in the following settings:

    • URL – the WebSocket (ws:// or wss://) or event stream URL
    • Method – usually GET, but some event sources allow other methods
    • Headers – add auth tokens, custom headers, or content types
    • Body – optional; used if the event stream requires an initial payload
    • Proxy – enable this if you're running Datastripes locally and the source has CORS restrictions
  3. Once connected, the node will start receiving data and output each event as it arrives — your flow reacts in real time.

Example

Imagine you're tracking live sensor data from a warehouse:

URL: wss://sensors.example.com/live
Method: GET
Headers:
{
"Authorization": "Bearer abc123"
}

As sensor readings come in, they flow through the node as a pulsating stream, allowing you to filter, chart, or log them immediately.

Real-time output

  • Each event is treated as a new row in your flow
  • Works well with visual nodes (e.g., live charts or gauges)
  • You can throttle, buffer, or transform the data downstream

Supported formats

FormatParsed automatically?
JSON✅ Yes
Text/event-stream✅ Yes (if text payload is valid JSON)
XML/Text🔶 Treated as raw string

Tips for using event streams

  • Use WebSocket (ws:// or wss://) URLs for true bi-directional streaming
  • Use Proxy = true for local development or CORS issues
  • Many public services offer demo streams — try one to test (e.g., crypto price feeds, IoT simulators)
  • Combine with filter or transform nodes to manage data volume

Use cases

  • Real-time dashboards (metrics, logs, KPIs)
  • Streaming stock prices or crypto data
  • IoT devices or telemetry feeds
  • Monitoring webhooks or event queues
  • Chat messages, notifications, or social media feeds

Troubleshooting

  • 🚫 Connection fails? Check the URL starts with ws://, wss://, or matches your event source format
  • 🔄 No events? Some streams only send updates on change — try triggering an event manually
  • 🔐 Auth problems? Make sure your headers are set correctly
  • 🧪 Debugging? Test the stream URL in a tool like wscat or Postman

With the Events node, your flow becomes alive — always listening, always up-to-date.