cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ozzie6616
Level: Power Up

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
Community Support Team
Community Support Team

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.
ozzie6616
Level: Power Up

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

Community Support Team
Community Support Team

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

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 222 members 4,674 guests
Please welcome our newest community members: