cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Extract text from URL of an RSS Feed Body in Flow

I'm trying to populate a Google Sheet with blog post details from an RSS feed.  The post URL contains the post content category tag that I would like to extract into a cell on the sheet of Post Category.  How do I extract that piece of text from the URL and populate it into the cell?

 

ex: "http://myexamplesite.com/post-category/2017/10/post.html"

I would like to get "post-category" and populated into my worksheet.

 

Thanks!

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Extract text from URL of an RSS Feed Body in Flow

Hi ozzie6616,

 

Please consider using the workflow definition language substring returns a subset of characters from a string.

 

Please check this documentation for more details about this function:
https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language

 

A simple test on my side for your reference.


I add the function in a Compose action, and it is configured as:

“@substring('http://myexamplesite.com/post-category/2017/10/post.html',25,13)”


Then when the flow is triggered, the Outputs of this action would be “post-category”.

3.PNG

4.PNG

Please try it on your side.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
New Member

Re: Extract text from URL of an RSS Feed Body in Flow

Thanks, Mabel!

 

This helps and gets me 85% there.  Now the issue that I have is that because it's an RSS feed, the categories in the URL do not all have the same character length.  How do I account for making sure the workflow only captures what is in-between the .com/ and before the first / after?

 

Workflow-Substring.png

 

Many Thanks,

Ozzie

Highlighted
Community Support
Community Support

Re: Extract text from URL of an RSS Feed Body in Flow

Hi ozzie6616,

 

Please try to use the two functions indexof and lastindexof to see if it will work for you.

 

But seems that there is no direct function can be used to get the in-between value within a string dynamically.

 

You may also consider to create an idea at Flow ideas forum about this function, I will help collect and report it on my side.
https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (9,003)