MARKETPLACE
PLUGINS
WEBSOCKET CLIENT
Websocket Client logo

Websocket Client

Published November 2025
   •    Updated June 2026

Plugin details

A production-grade WebSocket client for Bubble, built with native browser WebSocket APIs and optimized reconnection, heartbeats, and JSON handling.
Connect to any WebSocket server directly from your Bubble app — no external API connector, no server-side plugins, and no extra infrastructure.
Send and receive messages, maintain persistent connections, auto-reconnect, send queued messages, and parse JSON — all in real time.

Perfect for chat apps, multiplayer tools, dashboards, IoT streams, AI agents, event feeds, and anything requiring instant communication.

$60

One time  •  Or  $12/mo

stars   •   0 ratings
7 installs  
This plugin does not collect or track your personal data.

Platform

Web

Contributor details

The Future Unlocked. logo
The Future Unlocked.
Joined 2019   •   12 Plugins
View contributor profile

Instructions

1. Connect to a WebSocket Server
Use the workflow action “Connect WebSocket” and configure:
• Server URL → wss://your-server.com/socket
• Subprotocols (optional) → CSV list, e.g. json,auth
• Auto-connect → yes/no
• Reconnect delay (ms) → e.g. 3000
• Heartbeat (optional) → message + interval in ms
• Send on open (optional) → string or JSON payload

The plugin then establishes a WebSocket connection and exposes connection state to Bubble.

⸻

2. Send Messages

Use the actions:
• Send String → sends text as-is
• Send JSON → safely validates + stringifies JSON

If the connection is not ready, messages are queued and sent automatically after reconnection.

⸻

3. Handle Incoming Messages

The plugin triggers the Bubble event “Message” whenever data arrives.

The following states update automatically:
• last_message → raw text message
• last_json → pretty-formatted JSON (if parseable)
• message_count → running count of messages
• last_event → “message”, “open”, “error”, “close”
• last_error → last error string
• ready_state → WebSocket readyState 0–3

Use these states in workflows, repeating groups, or logic flows.

⸻

4. Monitor Connection State

These states update in real time:
• connected → true/false
• ready_state → 0=connecting, 1=open, 2=closing, 3=closed
• last_event → lifecycle event string
• last_error → error or close reason

You can condition workflows based on connection stability or failures.

⸻

5. Automatically Reconnect (Optional)

If auto_connect is enabled and reconnect_ms > 0:

The plugin will:
1. Detect the socket closing
2. Wait the specified number of milliseconds
3. Reconnect automatically
4. Re-send queued messages

This creates a self-healing connection suitable for production applications.

⸻

6. Close the Connection

Use “Close WebSocket” to immediately terminate the connection.

Types

This plugin can be found under the following types:
Element   •   Event   •   Action

Categories

This plugin can be found under the following categories:

Resources

Support contact
Documentation
Tutorial

Rating and reviews

No reviews yet

This plugin has not received any reviews.
Bubble