Hey friends!
I’m in the middle of building a chat app, but I’m seriously starting to pull my hair out over a problem with Supabase realtime database changes. I’m pretty new to all this…
- I’ve got a button (“Start chat”) that kicks off a subscription to “room1”.
- Then there’s the actual chat button (“Send message”), which runs a workflow that does an INSERT with the message.
- I also set up an app workflow that’s supposed to trigger on realtime database changes – it logs the activity and runs a SELECT to fetch the latest chat data.
Now here’s the weird part: Supabase shows that I’m successfully connected to “room1” (I can see my INSERTs being logged):
CHAT ROOM LOG
{
"schema": "public",
"table": "messages",
"commit_timestamp": "2025-06-16T20:05:29.380Z",
"eventType": "INSERT",
"new": {
"chat_id": "8f1c5fb1-920f-4307-b84f-044cfab4c4a1",
"created_at": "2025-06-16T20:05:29.375825+00:00",
"id": "ee1ce7d4-cf61-4337-842f-abc38e26993b",
"is_from_user": true,
"message": "TEST MESSAGE",
"user_id": "3mlkl-k3js-9384-8f13-4d164751a8d1"
},
"old": {},
"errors": null,
"latency": -238136065.19995117
}
BUT for some mysterious reason, my app workflow never triggers.
So I’ve got two questions:
- Are there any obvious mistakes that you can spot?
- Do I need to call a SELECT statement in the App workflow to load new information into the chat window? It feels like it would be expensive with so many calls to Supabase.
Feels like I’ve read the documentation 1000 times but I still can’t figure out what I’m doing wrong.
(Yes - I have enabled RLS and Realtime)
Any tips or working examples would be super appreciated!