Post #21 of our Build Flows Faster series covering our new utility actions for Power Automate. Today’s lesson is about replacing specified text contained within a text value using Power Automate with Encodian Utility Actions.
Our utility actions are targeted at helping you build flows more quickly with less complexity, and they brilliantly only use 0.05 actions from your Encodian Flowr and Vertr subscription allowance. For example, under a standard plan that permits 500 actions per month (uses), you could use the utility actions 10,000 times!
We provide two utility actions for replacing values within text (also known as a string) using Power Automate and the Encodian connector (Flowr).
Both actions are used to replace specified values within text. However, the Replace Value with Text action searches for the replacement text as a specified value. In contrast, the Replace Value with Regex action will replace all text values matching the regular expression provided.
As with many of our utility actions, there are a myriad of scenarios where you may need to replace text. Therefore, we’ll focus on how the Replace Value with Text action utility and Replace Value with Regex utility action work instead of focusing on a specific scenario.
Consider the following basic and manually triggered flow:
The user will be prompted for three values:
Let’s configure the flow to process the values provided and then send the result back to you via email.
1. Add the ‘Replace Value with Text’ utility action
1.a Text: Select the ‘Text‘ property provided by the trigger action
1.b. Search Text: Select the ‘Search For‘ property provided by the trigger action
1.c. Replacement Text: Select the ‘Replace With‘ property provided by the trigger action
2. Add the ‘Send me an email notification‘ action
2.a. Subject: Configure the email subject value as required
2.b. Body: Configure the email body as required, including the ‘Result‘ property provided by the ‘Replace Value with Text’ utility action
Execute the flow with the following example values:
This generates the following email:
This (hopefully) provides a good example of how to use the Encodian ‘Replace Value with Text’ utility action to replace text within a text value.
But what if I needed to replace all email addresses found in the ‘Text’ value with ‘REDACTED’? For this, you cannot easily use the ‘Replace Value with Text’ utility action because it searches for an explicit value. For this requirement, we can use the ‘Replace Value with Regex’ utility action, which uses a regular expression to find values that need replacing.
Let’s update the flow used in the previous example:
Update the trigger actions as follows:
1. Remove the ‘Replace Value with Text’ utility action
2. Add the ‘Replace Value with Regex‘ utility action
2.a Text: Select the ‘Text‘ property provided by the trigger action
2.b. Regex: Select the ‘REGEX‘ property provided by the trigger action
2.c. Replacement Text: Select the ‘Replace With‘ property provided by the trigger action
3. Update the ‘Send me an email notification‘ action
3.a. Subject: Configure the email subject value as required
3.b. Body: Configure the email body as required, including the ‘Result‘ property provided by the ‘Replace Value with Regex‘ utility action
Execute the flow with the following example values:
This generates the following email:
If you require further advice or support regarding Encodian Utility Actions, please email our support team at support@encodian.com, and the team would be delighted to help.
Search 150+ Actions to see how Flowr can save you time
CEO