Give user an alert when other user has added chat message

Two users are logged in simultaneously with the chat window opened. I am looking to create an alert for user A, when B has added a new chat message and vice versa.
Can someone help with creating a proper action? I tried both “do every 5 secs” and “do when condition is true”.

I have field “message read” (yes/no), which defaults at no and turns to yes when the page is loaded. I could use that.

So it would be something like this: When condition is true: [search for chats where Message Read = NO], show popup (by the way I used a wrong popup window here deliberately, the real one has yet to be made).

And believe it or not, this worked. Once. Just one time when I made a new chat message as user A, B got the popup. When I did it again (same sessions), nothing.

I strongly advise not trying to build real-time chat like this in bubble - it’s generally slow and now, with WU pricing, it will be quite expensive. The right way to do that is to use web-sockets which involves a decent amount of coding. How many users are you expecting will be engaging in chat?

That’s what I also noticed, exploding WU making chat on bubble not economical viable when building a startup. When you are passing several millions of revenue it will I think because WU gets cheaper at large scale.

Bubble pricing is focused on enterprise and large scale companies now. In those cases it makes economical sense. When you start a startup, most business models and go to market strategies will not work on Bubble. WU are just to expensive.

As for chat, what do you recommend?

Just curious what WU is?

How to do that?

Workflow units. You can see it in your logs → app metric and there you can hoover over your pie chart and see the WU consumption.