Extract URLs from Text and Documents with Power Automate

November 9th 2023

Post #11 of our Build Flows Faster series covering our new utility actions for Power Automate. We will publish many more posts and accompanying videos over the coming weeks, but today’s lesson is about extracting URLs from text (and documents) in Power Automate.

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!

Introducing the ‘Extract URLs from Text’ Utility Action

The ‘Extract URLs from Text‘ utility action identifies and returns an array of all URLs found within the text value provided to the action.

Video Guide: Extract URLs from Text in Power Automate

Instructions: Extract URLs from Text in Power Automate

As with many of our utility actions, there are a myriad of scenarios where you may need to extract URLs from text. So, we’ll focus on how the ‘Extract URLs from Text‘ utility action works as opposed to a specific scenario. The accompanying video guide details a more advanced scenario detailing how to extract URLs from a file.

The trigger

Consider the following basic and manually triggered flow, where a text (string) value is provided:

Extract URLs from Text

1. Add the ‘Extract URLs from Text‘ utility action to the flow

1.a. Text: Select the first text value to process. For this example, I’ve selected the ‘Text‘ property the trigger action provides.

The Encodian ‘Extract URLs from Text‘ utility action will return an array of email addresses contained within the ‘Result‘ property. You can either perform an action on each URL returned by using the ‘Apply to each’ loop, for example:

Or, generate a single text value containing all URLs by concatenating each URL in the array to a single text value. We can use the Encodian ‘Utility – Concatenate Text‘ utility action for this purpose!

Using Concatenate Text

2. Add the Encodian ‘Utility – Concatenate Text‘ action beneath the Encodian ‘Extract URL’s from Text‘ utility action.

2.a. Click the ‘Switch to input to entire array‘ button

2.b. Text Values: Select the ‘Result‘ property provided by the Encodian ‘Extract URL’s from Text‘ utility action

2.d. Delimiter: Enter ‘, ‘

The Encodian ‘Utility – Concatenate Text‘ utility action will return a single string containing all of the URLs found. We’ll send an email to the requesting user containing the URLs found.

Send an email

3. Add the’ Send an email notification (V3)‘ action

3.a. To: Set where you would like to send the email, I’ve selected the ‘User email‘ property provided by the trigger action

3.b. Subject: Configure the email subject value as required

3.c. Body: Configure the email body as required, including the ‘Result‘ property provided by the ‘Utility – Concatenate Text‘ utility action

Upon execution, the URLs found within the text value provided will be emailed to the requesting user.

And the email:

If you require further advice or support regarding Encodian utility actions, please email our support team at support@encodian.com where the team would be delighted to help.

UPDATE: We’re excited to announce some significant updates to Flowr for Power Automate! As of October 2024, we’ve improved by updating action names and splitting Flowr’s central Power Automate connector into nine specialized connectors. These changes will make your workflow faster, smoother, and more efficient. The new action names are more precise and intuitive, saving you time, while the focused connectors enhance performance and flexibility. This update also helps future-proof the platform for even more powerful features. Check out our updated action names blog.

Author
Jay Goodison

Managing Director

You might also be interested in...