How to Replace Multiple Strings using Power Automate?

I was recently working on a Power Platform project for a client who assigned me a task to replace multiple strings in a variable that stores a string.

Power Automate has a replace() function that allows you to replace strings, substrings, characters, and array objects.

This tutorial will guide you on how to replace multiple strings using Power Automate.

Let’s see how to do this!

Replace Multiple Text Strings in Power Automate

To illustrate this example, I used the following text string: “The HR team collaborated with the IT department to implement a secure employee onboarding system using cloud-based technology.”

Now, I wanted to replace the multiple string values, ie, ‘HR‘ with ‘Human Resources‘ and ‘IT ‘ with ‘Information Technology‘ in the above-mentioned text string.

For this, we can create a Power Automate Instant cloud flow that will be triggered by clicking the button.

Here are the steps to do:

  1. Browse make.powerautomate.com in the browser to log in to the Power Automate Home page, where you can create an Instant cloud flow.
  2. Next, add an ‘Initialize variable‘ action to store the text string in a variable. Set the parameters, such as Name, Type as ‘String’, and Value with the text string.
Power Automate replace multiple strings
  1. After that, to replace the multiple strings in a given string, I will add a ‘Compose‘ action. In the Inputs parameter, insert the expression given below.
Replace Multiple Strings using Power Automate
  1. The flow is ready now. Let me save it by clicking on the Save icon and then test the flow.
  2. When the flow executes successfully, you can see that the strings have been replaced with other text strings. Have a look at the screenshot for your reference.
Replace multiple strings in Power Automate

This way, you replace the multiple strings present in a text using replace() in Power Automate.

I hope you found this tutorial informative and helpful. If you have any suggestions for me, please mention them in the comments section.

You may also read the other Power Automate tutorials:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…