Create system messages within a conversation

Hello helpful bubblers!

I have built a messenger in my app, that allows two users to chat with each other. It looks like this:

I would like to have system generated ‘messages’ be sent to this conversation and displayed within this chat when certain actions take place.

Think: “Piston accepted your request!”

But as a line item styled within the chat thread. How would you go about doing this?

I have thought that at some point, adding an admin as a member of the conversation via a workflow - but then I could not wrap my head around how I would create the message with that admin as my message ‘creator’

Anyways - hope that was not too confusing, and thank you!!

Sal

I’ve already built exactly what you’re talking about!

Here’s the setup:

Backend

  1. Create an option set called “Message type”
  2. Create an option for each type of message.
    Ex: text, image, accepted, declined, etc
  3. Add that option set as a data field on your message thing
    Make sure to give every message a type when it’s created

Frontend

  1. Create a group (this holds everything)
  2. Inside that group, create a group for each message type
  3. On each of these groups, add a conditional that says “when This Message’s Message Type is [X]” → this element is visible

Hope this helps!

3 Likes

Wow thank you!! I am going to play with this idea I really appreciate the help.

Sal

You’re welcome!

1 Like

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