Creation of Group Chat preventing creation of individual Chat

I have set up a chat app whereby you can create chats with individual users and also create group chats. I have set it up so that when i search for a user and select that user it creates a new chat if one doesn’t already exist. The problem i have is if the current user is in a group chat with the user they are trying to create an individual chat with then it won’t let me create a new chat. Do i need a condition adding to ignore this rule? if so what do i need. Below is how my data is set up and the workflows to create a new chat:

WHen i click the user i want to create the chat with i have 2 workflows as shown below depending if there is already a chat created.
1st if there is a chat already i have this workflow

The above workflow seems to be stopping me creating a new chat with an individual if theyare in a group chat together.
Below is the workflow that was working before i created the group chat function to add a new chat with the individual:


the above happens its the next step that isnt being created

Any help on how to create an individual chat with a user that is already in a group chat would be really appreciated.

I am assuming that the chat is the same as the group chat with the difference being on the number of Chat-users with chat having 2 chat-user and group chat 3 or more chat-users. If that is the case, add an advanced filter in your ‘only when’ conditional using this fact.
Something like Advanced: This chat's Chat-Users' count: <= 2

For my group chat i have the following workflow from selecting multiple users in a multi dropdown search and pressing save

Will the filter still work with this?

If it is possible for a chat group to have 2 chat-users, then consider adding another data field the chat data type to differentiate between a chat and a group chat. For example something like ‘is-a-group-chat’ set to yes/no. Add any field that will differentiate the two and then add a constraint based on the new field. The above filter assumed group chats have 3 or more chat-users

I have the is group chat yes no in my data type but im not sure what you mean sorry

Ohh, I had not seen it. In that case simply add another constraint where ‘is-group-chat’ = no

Thank you so much that was such an easy fix. I really appreciate your help

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.