As a Microsoft MVP in Power Automate skills, I had the opportunity to work with numerous flows that involved string manipulation functions. Today, in this tutorial, I will explain two very important functions: the startsWith() and endsWith() functions.
By the end of the tutorial, you will get to know how to use the startsWith() and endsWith() functions in Power Automate.
What is the startsWith() Function in Power Automate?
The startsWith() function in Power Automate is a text operation that checks if a string begins with a specific substring. It returns a boolean value (true or false) based on the result of this check, making it perfect for conditional branching in your flows.
This function is part of Power Automate’s extensive text functions library and follows this syntax:
startsWith(text, searchText)Where:
textis the main string you want to checksearchTextis the substring you’re looking for at the beginning of the main string
Return Value:
- Returns true if the text starts with the search text.
- Returns false if the text does not start with the search text.
By default, the Power Automate startsWith() function is case-sensitive. This means “Hello” and “hello” are treated as different strings.
However, you can make case-insensitive comparisons by converting both strings to the same case:
startsWith(toLower(variables('MainText')), toLower('Hello'))This expression will return true whether your variable contains “Hello,” “HELLO,” or “hello.”
Check out Add Multiple Users To SharePoint Group Using Power Automate
Power Automate startsWith() Example
To help you understand it better, I will take two examples here.
In one example, I will take some static text, and in the other examples, we will see how to use the startsWith() function in a SharePoint list item.
Example-1: Power Automate startsWith() function using Instant cloud flow
Let’s see how to use the startsWith() function in Power Automate by creating an Instant cloud flow that gets triggered manually.
Here, I have provided a text as: “Hello Lidia! Merry Christmas”. In the flow, we will check if it starts with “Hello”, then it will return true.
Here is a screenshot for your reference.

Follow the steps below to create the flow with the logic:
- Open the Power Automate home page. Click on + Create -> Select the Instant cloud flow -> Provide the name of the flow and choose your trigger’s flow (Manually trigger the flow) -> Click on Create.
- Next, add the ‘Initialize variable‘ flow action. Configure parameters below:
- Name: Enter the name for a variable.
- Type: Select the type of the variable as String.
- Value: Here, I have given ‘Hello Lidia! Merry Christmas’ as the variable’s value.

- Then, add the ‘Compose’ flow action to give the startsWith() expression like below:
startsWith(variables('StartingText'),'Hello')
- Now, it’s time to save and test our flow. Here, test the flow manually, and once it is executed successfully, you can see the Compose Flow action that displays the output as shown below.

This is how to use the startsWith() function in Power Automate to check whether a string begins with a specific value.
Check out How to Create SharePoint List Items Using Power Automate?
Now, let’s move to the second example.
Example-2: startsWith() function using SharePoint list in Power Automate
I will show you here how to use the startsWith() function using a SharePoint list in Power Automate.
Here I have a SharePoint Online list as “Blog List”; below are the columns and the data types.
| Columns | Data Types |
| Blog Title(renamed Title column) | Single line of text |
| Blog Status | Choice |
| Blog Publish Date | Date and Time |
| Blog Author | Person and Groups |
I have added a few items to the SharePoint list.

In this case, we will create a flow that will check if the item title starts with “Power Automate,” then it will display true, else false. Below is a screenshot for your reference.
You can also apply your own logic; if anything specific you want to do if it returns true.

Follow the steps below to create the flow and implement the logic.
- Open the Power Automate home page, click + Create, then select Automated Cloud Flow. Enter the flow name and choose your trigger (e.g., When an item is created or modified), and finally click Create. Here, set the required fields for this trigger as shown below.
- Site Address: Provide the specific SharePoint site address.
- List Name: Select the name of the SharePoint list.

- To retrieve the value of a specific item from a SharePoint list, add the ‘Get item’ flow action. Configure the details like Site Address, List Name, and Id as shown in the screenshot below:

- To initialize the SharePoint list column, add an Initialize variable flow action and set all the details.
- Name: Provide the name of the variable.
- Type: Select the variable datatype as String.
- Value: I have given ‘Title‘ from dynamic content here.

- Next, add the ‘Compose‘ flow action to set the expression to check whether a given string starts with a specific string.
startsWith(variables('BlogStartsWith'),'Power Automate')
- Now, it’s time to Save and Test -> Then test it manually. Now add an item to the SharePoint list as below:

- The compose flow action will display the output according to the startsWith() expression below. The output returned from the Power Automate startsWith() function will give true.

This is how to use the startsWith() function in Power Automate for a column in a SharePoint list.
Check out Create Outlook Calendar Events Using Power Automate
Now, let us see how to use the endsWith() function in Power Automate.
Power Automate endsWith() Function
The endsWith() function in Power Automate is a text expression that checks if a string ends with a specific value. It returns a boolean value – TRUE if the string ends with the specified value, and FALSE if it doesn’t.
According to Microsoft’s official documentation, the function returns TRUE if a string ends with the given value, otherwise it returns FALSE.
Syntax and Basic Usage
The basic syntax of the endsWith() function is:
endsWith(text, suffix)Where:
text: The main string you want to checksuffix: The ending text you’re looking for
For example, if you want to check if an email address ends with “.com”:
endsWith('[email protected]', '.com')This expression would return true since the email address does end with “.com”.
Another use for the endsWith() function in Power Automate is to identify file types based on their extensions.
endsWith('quarterly_report.pdf', '.pdf')This would return true, confirming that we’re working with a PDF file.
Check out How to Delete SharePoint Folders Using Power Automate?
Power Automate endsWith() Function Examples
Now, let me show you a few examples of using the endsWith() function in Power Automate.
Use Power Automate endsWith() Function Manually
To better understand the Power Automate endsWith() function, let us create a Power Automate flow that will trigger manually.
Here I have a string “Your Registration is Completed” and we will check if the string ends with “Completed”.
After using the Power Automate endsWith() function, the return output will be true, as shown in the screenshot below:

To implement this example, follow the steps below:
- Open your browser and type https://make.powerautomate.com -> Click on + Create -> Select the Instant cloud flow -> Provide the name of the flow and choose your trigger’s flow (Manually trigger the flow) -> Click on the Create button -> Add a Text input inside the trigger.
- Then, add an Initialize variable flow action to store the text value. Set the properties like Name, Type, and Value as below:
- Name: Provide a name for a variable.
- Type: Select the data type as a String from the drop-down.
- Value: Take Text from the dynamic content.

- To see the output returned, add a Compose flow action and provide an endsWith() expression.
Inputs: Select field -> Click Expression -> Insert the code -> Then click on OK.
endsWith(variables('Text'),'Completed')
- After that, Save the flow. Then, click on “Test” to run the flow manually. In the Runflow window, take a text input. After that, tap on the Runflow button. Here, I have given the input text as “Your Registration is Completed” as you can see below:

- After the flow runs successfully, open the compose flow action and check the output returned from endsWith() function expression. The Power Automate endsWith() function returned a ‘true‘ value.

This is how to use the Power Automate endsWith() function expression to determine a text ending with a specific string.
Check out Power Automate If Contains
Power Automate endsWith() Using SharePoint list
Now, I will walk you through the Power Automate endsWith() function using a SharePoint list.
To achieve this, I will create a Power Automate Automated cloud flow that triggers when an item is created in the SharePoint list.
You can see the SharePoint list having different columns in the screenshot below:
| Column Name | Datatype |
| Task Title | Single line of text – Title column |
| Task Assigned to | Single line of text |
| Task Deadline | Single line of text column |
I have also added a few items to the SharePoint list.

We will verify here if the item title ends with a specific substring “Project”.
To create the flow, follow the instructions below:
- Navigate to https://make.powerautomate.com/ -> click on +Create and select Automated cloud flow. In the next window, provide a name for the flow, choose the trigger “When an item is created,” and click on Create. Here are the details below:
- Site Address: Select a site name from the drop-down.
- List Name: Choose a list name from the drop-down

- Next, add an “Initialize variable” flow action that stores the SharePoint column values and is used during the flow. Provide details below.
- Name: Give a name for the variable.
- Type: Select the datatype as String from the drop-down.
- Value: Select the column name Title column from the dynamic content.

- Then, add a Compose flow action and set the details below.
- Inputs: Take the below-given code value in it.
endsWith(variables('Task Name'),'Project')
- Now, the flow is ready. Let’s Save it. Test it manually. Now, add an item to the SharePoint list.
- Then, the outputs of the compose flow action will indicate whether the created string ends with a specific string, returning true or false. In this case, it returned the true value.

This is how to use an endsWith() string function in a Power Automate based on a SharePoint list.
I hope you now understand how to use the startsWith() and the endsWith() functions in Power Automate. In Power Automate, the endsWith() checks the end of a string, startsWith() checks the beginning.
You may also like:
- Auto Generate Serial Number in Power Automate
- Check if a String Contains Numbers in Power Automate
- Compare Date Using Ticks Function in Power Automate
- Replace Commas With New Lines in Power Automate
- Extract Tables from a PDF using Power Automate Desktop

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.