Hi everyone, I’m currently building a chat interface in Bubble where a user can send messages and get responses from an AI (via an API call). I’m still new to Bubble and would love some help setting this up properly.
What I want to build:
• A chat UI with:
• A text input for typing messages
• A send button
• A scrollable area that shows messages from both the user and the AI in chat bubble format
The flow I’m aiming for:
1. User types a message and clicks “Send”
2. The message is immediately shown in the chat view as a user bubble
3. An API call is triggered to get the AI’s response
4. The AI’s reply is then displayed as a separate bubble underneath
What I need help with:
• How should I structure the database (or use custom states) to store/display the messages?
• How can I use a Repeating Group to show messages in the right order?
• What’s the best way to update the chat dynamically when the AI response comes in?
• How can I visually distinguish between user and AI messages (e.g., bubble color, alignment)?
I’d really appreciate any guidance, examples, or tutorials. Thanks in advance for your help!