/bubble-tutorials

How to integrate SignalR in Bubble

Learn how to integrate SignalR with Bubble using clear steps to enable real-time updates, seamless connections, and dynamic app experiences.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web or mobile app? RapidDev builds Bubble apps with your growth in mind.

Book a Free Consultation

How to integrate SignalR in Bubble

To integrate SignalR in Bubble, you cannot use Bubble’s built‑in features directly because Bubble does not support WebSockets (which SignalR uses). The only working way today is to put a small custom HTML/JavaScript block on the page that connects to your SignalR hub, listens for messages, and then triggers Bubble events using Bubble’s “window.trigger” event bridge. SignalR runs entirely in the browser; Bubble just reacts to the messages.

 

The Realistic Approach That Works

 

You add an HTML element with custom JS that:

  • loads Microsoft’s SignalR JavaScript client
  • creates a connection to your SignalR hub URL
  • listens for events from SignalR
  • fires a Bubble event when data arrives so you can run workflows

This is the same pattern used for Pusher, Ably, and other WebSocket services in Bubble.

 

Step-by-Step Explanation

 

In your Bubble page:

  • Drag an HTML element onto the page
  • Paste the code below (replace the hub URL and event name)
  • Use Bubble’s “When a custom event is triggered (JavaScript to Bubble)” workflow to handle incoming data

 

<!-- Load SignalR client -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/microsoft-signalr/7.0.5/signalr.min.js"></script>

<script>
// Connect to your SignalR Hub
const connection = new signalR.HubConnectionBuilder()
    .withUrl("https://YOUR_DOMAIN/hubname") // your hub URL
    .withAutomaticReconnect()
    .build();

// Start connection
connection.start().catch(err => console.error(err.toString()));

// Listen to a message type from SignalR
connection.on("newMessage", (data) => {
    // Send data into Bubble
    window.dispatchEvent(new CustomEvent("signalr_message", { detail: data }));
});
</script>

 

Handle the Event Inside Bubble

 

On the page, add a “When Page is loaded” workflow and use Toolbox’s “Add event listener” action (or your own JS) to catch the event:

// This listens to the SignalR event and exposes it to Bubble
window.addEventListener("signalr_message", function(e){
    bubble_fn_signalr(e.detail); // Calls Bubble's exposed function
});

Then create the matching Bubble exposed function using Toolbox plugin’s “Run JavaScript (expose function)” feature.

  • This lets you trigger workflows
  • Store the message in the database
  • Update repeating groups in real time

 

This is the only reliable way to integrate SignalR with Bubble right now because SignalR depends on WebSockets, which Bubble does not handle natively. The browser-side JS bridge is the correct and production‑safe solution.

Explore More Valuable No-Code Resources

How to integrate Bubble.io with Git?

Learn how to seamlessly integrate Bubble.io with Git through our comprehensive step-by-step guide. Perfect for beginners and professionals.

Explore

How to integrate Bubble.io with Reddit Ads?

Learn how to seamlessly integrate Bubble.io with Reddit Ads using our easy step-by-step guide. Boost your ad management today!

Explore

How to integrate Bubble.io with AWS S3?

Explore our step-by-step guide on integrating Bubble.io with AWS S3, making your app development process more efficient and secure.

Explore

How to integrate Bubble.io with Lucidchart?

Follow our step-by-step guide to seamlessly integrate Bubble.io with Lucidchart, enhancing your workflow & productivity.

Explore

How to integrate Bubble.io with Kentico?

Learn how to seamlessly integrate Bubble.io and Kentico with our comprehensive, easy to follow step-by-step guide.

Explore

How to integrate Bubble.io with Box?

Discover easy-to-follow steps for integrating Bubble.io with Box. Boost your workflow and secure your files seamlessly today.

Explore

Stuck in Bubble.io? We’re here to help!

Fix broken workflows | Optimize logic | Boost performance | Scale with confidence

4.9
Clutch rating 🌟
600+
Happy partners
17+
Countries served
190+
Team members

By clicking “Accept”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.

Cookie preferences