Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Extract part of url from two different formats in same compose action

(0) ShareShare
ReportReport
Posted on by

Hi guys,

Need some inputs on how to extract from the same place of different URL from the Banner Image URL info. I need to do this, in order to make 'Send a HTTP request to Sharepoint' action to convert the Banner URL into Base64 format.
Basically, if I create a News Post or News Links (copy link from other Sharepoint sites), the Banner Image URL format is different in the Get Items, but still includes the same necessary text to make a 'Send a HTTP request to Sharepoint' action with and create a Base64 image.
The differences is seen in theese examples:

https://domain.sharepoint.com/sites/PP/_layouts/15/getpreview.ashx?guidSite=60a1ec0582bd4abbb4d52ef1c4f232f1&guidWeb=dcca16d1263746f2b75d8e44e0ca684e&guidFile=26423bb09f6e492a98e7f12dd12d04e4


https://domain.sharepoint.com/_layouts/15/getpreview.ashx?path=%2Fsites%2FPP%2FIcons%20logos%2FP%26I%20News%20-%20Thumbnail.png

I would love to do a Compose action to extract and get the same output from _layouts/15/getpreview.ashx...
Is it possible, when the links can be different depending on the news type?

  • Verified answer
    LASMA Profile Picture
    on at
    Re: Extract part of url from two different formats in same compose action

    Solved.
    Did a Compose action to recognize by the _layouts string in the URL where I readded the _ before


    _last(split(items('Apply_to_each')['BannerImageUrl'],'/_'))


    Did the trick.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492