Adding message to existing chat

Hi bubble crew,
Trying to either create a new chat when one doesn’t exist or if it does exist then add a message to an existing chat.
Can’t ask the right expression likely because it is a list (chat users) , my approach likely wrong.



appreciate your thoughts.

Cheers Cyril

The reason for that error occurring is that your only when condition searches for chats, so theoretically it would bring back many chats. You can eliminate this error by saying Search for chats: first item.

Most likely, there will only be one chat conversation between two users, so using first item may work for you.

Tal
nocodify.com

1 Like

Yes I tried that and also last item figuring bubble thought it was a list, still getting error

So try Search for chats: Count > 0 … meaning a chat conversation exists (Because the count is greater than 0).

1 Like

this worked, Thanks @Nocodify. so <1 means create a new chat as none exist