Power Automate Desktop provides various text actions that allow to manipulate, extract, and work with text in a variety of ways. In this tutorial, I will explain various Power Automate Desktop text actions with examples.
I will cover the following desktop actions:
- Append line to text
- Get subtext
- Crop text
- Pad text
- Trim text
- Reverse text
- Change text case
- Create random text
- Split text
- Replace text
Text Actions in Power Automate Desktop
Here, I will explain a list of all Power Automate Desktop text actions, along with their parameters, using one example for each.
Append line to text
It is useful when you want to combine information into a single text or a variable. This action adds a new text line to a single text value or list of text values.
Input Parameters:
- Original text: The original text to which the text should be added.
- Line to append: The new text value to add on as a new line.
Output:
It produces the ‘Result‘ variable that has the value of the combined text value of the original text in a new line.
Example:
Suppose I have a text value in a variable as ‘Product ID: P1025 | Name: Bluetooth Speaker‘. Then, I wanted to append a new text [Stock Updated To: 150 units] to the original string.

Input:

Output:

See Connect Power Automate Desktop to Cloud
Get Subtext
It retrieves the subtext from a text value, specifying the start index and length of the text. With this action, you can extract a specific portion of text or a list of text values.
Parameters:
| Parameter | Options Available | Default Value | Description |
| Original text | – | – | Text variable from where the subtext is retrieved. |
| Start index | Start of text, Character position | Character position | Select one option to specify the starting point for text retrieval. |
| Character position | Numeric value | – | Enter the position of the character to retrieve text. Zero-based index, count zero from the first character. |
| Length | End of text, Number of chars | Number of chars | Choose one option: whether the subtext continues at the end of the text or includes only certain characters. |
| Number of chars | Numeric value | – | The number of characters to retrieve |
It produces ‘Subtext’ as a variable that stores the retrieved subtext value.
Example:
Suppose I took a text variable with the value ‘Power Automate Desktop Flows‘. From the text, I want to get the subtext ‘Desktop Flows‘.
Input:

Output:

Crop text
This action retrieves the text value that occurs before, after, or between the specified text values from the original text string.
Input Parameters:
| Parameter | Options Available | Default Value | Description |
| Original text | – | – | Original text string from which you can crop the part of the text. |
| Mode | Get text before the specified flag, Get text after the specified flag, Get text between the two specified flags | Get text before the specified flag | Choose the option whether to retrieve the text before, after, or between flags. |
| Start flag | Text value | – | The cropped text will be after this flag. |
| End flag | Text value | – | The retrieved text will be before this end flag. |
| Ignore case | Boolean value | Toggle off | It finds the case-sensitive or case-insensitive text values. |
It produces the CroppedText variable, which contains the new cropped text value.
Example:
Let me take a text string as ‘Power Automate Desktop Flows’. From this, I want to crop the ‘Power Automate‘ string from the original text string. Specify the parameters, such as Original text, Mode, and End flag.

Output:

Check Variables in Power Automate Desktop
Pad text
In desktop flows, the Pad text action creates a fixed-length text by adding characters to the left or right of the provided original text.
With this, you can add white spaces, words, or phrases before or after the text or list of text values.
Input Parameters:
- Text to pad: Select the text variable that you want to increase in length.
- Pad: Option to add padding to the left or right side of the text.
- Text for padding: The text or character added to increase the length of the original text.
- Total length: The total character length of the final padded text.
It provides the ‘PaddedText‘ variable, which contains text with padded characters.
Example:
Let’s take the example of ‘Product Code’, such as ‘X9Zj32‘. You can increase the length of this product code by using the Pad text action.
Here, you can lengthen the Product code text by adding characters to it. I wanted to display it as ‘****X9Zj32‘ with the length of 10 characters.

Output:

Trim text
This action removes all occurrences of white spaces, such as spaces, tabs, and new lines, from the beginning and end of a text.
Input Parameters:
It has a ‘What to trim‘ parameter with the following options. You can specify where white space characters will be removed from the text.
- whitespace characters from the beginning
- whitespace characters from the end
- whitespace characters from the beginning and end
It will produce the ‘Trimmedtext‘ variable that stores the new trimmed text.
Example:
If you have a string with white spaces at the beginning and end of the text, as shown in the image below.
Product ID: P1025
Name: Bluetooth Speaker
You can erase them by using the trim text action in Power Automate Desktop.
Input:

Result:

Reverse text
This text action in Power Automate desktop reverses the left and right sides of a text string. It reverses the order of letters in a text string. It produces the ‘ReversedText‘ variable.
Parameter:
- Text to reverse – Provide the text variable or enter the text to reverse.
For example, the reverse of ‘Power Automate‘ -> ‘etamotuA rewoP‘.

Result:

Change text case
You can use the Change text case action in Power Automate desktop to convert the case of text values.
The text string can be changed into uppercase, lowercase, title case (where every word starts with a capital letter), or sentence case.
Parameters:
- Text to convert: Provide the text that needs to be changed.
- Convert to: Choose case style from Upper case, Lower case, Title case, Sentence case options.
Example:
I will use a text string as ‘power platform’. Then, it will produce the output based on the selected text case conversion option.

Output:
- Upper case – POWER PLATFORM
- Lower case – power platform
- Title case – Power Platform
- Sentence case – Power platform

Learn Data Table in Power Automate Desktop
Create random text
This action is mainly used to create passwords. It generates a specific length of text consisting of random characters.
You can define the parameters that are included in the password, like uppercase, lowercase, digits, and symbols.
- Minimum length: Specify the minimum length of random text.
- Maximum length: Specify the maximum length of a password.
Note:
If the minimum and maximum lengths are different, password length will be random in between the min and max values.

Result: Generated Password

Learn Data Table in Power Automate Desktop
Split text
Power Automate desktop split text action will split the text string into a list of substrings separated by a specific delimiter. In this, you can choose standard delimiters (Space, Tab, and Newline) or custom delimiters.
The split text action produces the ‘TextList’ variable that stores a new list of items.
Parameters:
- The text to split: Enter a value or provide a text variable that needs to be split.
- Delimiter type: You can choose between standard and custom type.
- Custom delimiter: Provide the delimiter.
Is regular expression is a toggle button that can be used when you want to specify the regular expression as a delimiter. For example: ‘\ d means that the delimiter could be any digit.
Example:
Suppose I take a text string as ‘Power Automate, Power BI, Power Apps, Power Virtual Agents’.

Here, the text will be split by (,) as a delimiter and produce a list of items.

Replace text
Power Automate’s desktop replace text action identifies a string in a text and replaces all occurrences with another string or character.
Input Parameters:
Input Parameters:
| Parameter | Default Value | Description |
| Text to parse | – | Original text string in which you want to replace the text. |
| Text to find | – | The substring or a regular expression to search |
| Use regular expressions for find and replace | False | Specify whether the subtext to find is a regular expression. |
| Ignore case | False | Toggle on if you want to find subtext that is case-sensitive. |
| Replace with | – | Provide the text or regular expression to be replaced with. |
| Activate escape sequences | False | Specify whether to use special sequences. Ex: ‘\t’ in the replacement text will be interpreted as a tab. |
The variables produced from this action will be ‘Replaced‘, which consists of new updated text.
Example:
I will manually enter a text string that represents the contact email of our Organization [[email protected]]. Now, I wanted to replace the text ‘tsinfotech‘ with ‘tsinfotechnologies‘.

Output: Replaced text

While working with the desktop flows in Power Automate, many of these actions help format the text to maintain uniform data.
In this tutorial, I explained how to use various text actions in Power Automate Desktop with real examples.
Also, you may like:
- Power Automate If Contains
- Power Automate String Functions
- Power Automate Date Functions
- Power Automate Desktop Get Substring
- Retrieve Excel Column Values Into List 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.