Welcome back! In our last lesson, you built your first functional tool, the word and character counter. You saw how dynamic expressions can be used to analyze and display data in real-time. This was a fantastic first step into the application logic of Bubble.
Today, we're going to build another essential utility for your platform: a text case converter. While the concept is simple, the implementation will introduce you to one of Bubble's most powerful features: workflows. Unlike the real-time counter, this tool will perform an action—converting text—only when the user explicitly tells it to by clicking a button. This event-driven approach is fundamental to building almost any interactive feature you can imagine, from simple tools to complex user dashboards.
By the end of this lesson, you will have built a tool that can convert text to uppercase, lowercase, and title case, and you'll have a solid grasp of how to use workflows and custom states to manage user-triggered actions.
Let's begin.

Part 1: Assembling the User Interface
As before, we'll start by setting up the interface. A clean, responsive structure is key, so we'll reuse the same two-column layout you've been practicing. This consistency is a core principle of good UI/UX design and will also help you build your platform faster.
On a new page, please set up the responsive two-column layout we've used in the previous lessons.
In the Group - Input Column (left side):
- Add a
Multiline Inputelement. This will be where users paste or type their text. Give it a descriptive placeholder like "Enter your text here...". - Below the input, add a
Groupand set its layout toRow. This will hold our action buttons. - Inside this new group, add three
Buttonelements. Label themUPPER CASE,lower case, andTitle Case.
In the Group - Output Column (right side):
- Add a
Textelement. This is where the converted text will appear. For now, you can put some placeholder text in it like "Your converted text will appear here."
Your layout should now have a clear input area with action buttons on one side, and an output area on the other.
Part 2: Using Custom States to Manage Output
In the last lesson, we linked our output text directly to the input field with a dynamic expression. This time, our logic is different. The output shouldn't change as the user types; it should only change after a button is clicked and a conversion happens.
So, where do we store the converted text before displaying it? The perfect place is a custom state. A custom state is like a temporary variable that lives on a page. Our workflow will take the input text, convert it, and save the result to a custom state. The output text element will then simply display whatever value is in that state.
Let's set this up:
- Click on the page itself (the main
indexor your page name in the top-left element tree). - In the property editor, click the small "i" icon to open the element inspector.
- Click "Add a new custom state."
- Name the state
convertedText. - Set its
State typetotext. ClickCreate.
Now that the state exists, let's connect our output element to it.
- Select the
Textelement in your output column. - In the
Contentbox, delete the placeholder text. - Click
Insert Dynamic Data. - Find your page name (e.g.,
index) in the list. - From the options that appear, select your custom state:
's convertedText.
The Text element will now display the value of the convertedText state. It will be empty at first, which is exactly what we want.
Part 3: Building Workflows with Text Operators
This is where we bring the tool to life. We'll create a workflow for each button. When a button is clicked, it will trigger a series of actions. In our case, the action will be to take the input's value, transform it using a text operator, and save it to our convertedText custom state.
Bubble has built-in operators for common text transformations. Let's review the ones we'll be using.
Operators and comparisons - Bubble Docs
The Bubble documentation provides a comprehensive list of operators you can use on different data types. We're interested in the ones for the 'Text type'.
In this document, find the section titled Text type. Please read the short descriptions for the following three operators: :capitalized words (this is Bubble's version of Title Case) :uppercase :lowercase
Now that you're familiar with the operators, let's build the first workflow.
The Uppercase Workflow
- Select the
UPPER CASEbutton on your page. - Navigate to the
Workflowtab. You should see an event box that saysWhen Button UPPER CASE is clicked. - Click the
Add an actionbox. - Choose
Element Actions>Set state. - In the
Set stateaction properties:- Element: Select your page (e.g.,
index). - Custom state: Select
convertedText. - Value: This is where we define the logic. Click
Insert Dynamic Data.- Select your
Multiline Inputelement's name. - Choose
's value. - From the list of operators, select
:uppercase.
- Select your
- Element: Select your page (e.g.,
The expression should now be MultilineInput A's value:uppercase.

Go to your app's preview, type some text in the input box, and click the UPPER CASE button. The text on the right should immediately update to the uppercase version of your input.
Part 4: Implementing the Other Conversions
Now you'll apply the same pattern to the other two buttons. This repetition is excellent practice and will help solidify your understanding of the workflow process.
The Lowercase Workflow
- Go back to the
Designtab and select thelower casebutton. - Switch to the
Workflowtab and create a newSet stateaction for this button's click event. - Configure it exactly as before, but for the
Value, use the expression:MultilineInput A's value:lowercase.
The Title Case Workflow
- Select the
Title Casebutton. - Create its
Set stateworkflow. - For the
Value, use the expression:MultilineInput A's value:capitalized words.
Now, test your complete tool. All three buttons should correctly take the text from the input, apply the respective transformation, and display the result in the output area. You have successfully used workflows and custom states to create an interactive tool!
Your Task: Build the Text Case Converter (15 minutes)
If you haven't been building along, now is the time. Follow these steps from start to finish to create your Text Case Converter.
- UI Setup:
- On a new page, create your standard two-column responsive layout.
- In the left column, add a
Multiline Inputand threeButtonelements below it (UPPER CASE,lower case,Title Case). - In the right column, add a single
Textelement for the output.
- Create Custom State:
- Select the page element itself.
- Open the element inspector (the 'i' icon) and create a new custom state named
convertedTextwith aState typeoftext.
- Link Output to State:
- Select the output
Textelement. - Set its
Contentto be the dynamic value of theconvertedTextcustom state.
- Select the output
- Build Workflows:
- For the
UPPER CASEbutton, create a workflow that triggers on click. - Add a
Set stateaction that sets theconvertedTextstate's value toMultilineInput's value:uppercase. - Repeat this process for the
lower casebutton, using the:lowercaseoperator. - Repeat again for the
Title Casebutton, using the:capitalized wordsoperator.
- For the
- Test:
- Preview your page.
- Enter text and test each button to ensure the conversion works as expected.
Conclusion
Excellent work! You've successfully moved beyond real-time data display and into the world of event-driven logic with workflows. This is a massive step in your journey to building a functional multi-tool platform.
Here are the key takeaways from today's lesson:
- Workflows execute actions based on triggers: The most common trigger is a user clicking an element.
- Custom states are essential for managing temporary data: They act as a bridge between a workflow's calculation and what the user sees on the page.
- The
Set stateaction is fundamental: It's how you update a custom state's value from within a workflow. - Bubble's built-in operators simplify complex tasks: You used
:uppercase,:lowercase, and:capitalized wordsto perform text transformations with zero code.
In our next lesson, we will continue building native tools by creating a simple unit converter. This will combine the workflow skills you learned today with conditional logic and different input types like dropdowns, further expanding your Bubble development toolkit.