web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Extract part of url fr...
Power Automate
Unanswered

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?

Categories:
I have the same question (0)
  • Verified answer
    LASMA Profile Picture
    on at

    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard