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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to get the last pa...
Power Automate
Answered

How to get the last part of URL using power automate flow?

(0) ShareShare
ReportReport
Posted on by 8

Hi,

 

I created a post looking for suggestions and solutions but it has been marked as spam, and I'm unsure. Can someone please help?

 

https://powerusers.microsoft.com/t5/Building-Flows/How-to-extract-the-last-part-of-the-site-Url-in-Power-Automate/m-p/1697541#M188194

 

Appreciate all your time and help. Thank you in advance.

Categories:
I have the same question (0)
  • tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @sls22 ,

    the original post was deleted so I don't know if there were any more details, but in general you'd want to split the url by / and take the last part (after the last /)

    last(split('urlAddress', '/'))
  • sls22 Profile Picture
    8 on at

    Hi @tom_riha ,

     

    Thank you for your response.

    My apologies, I didn't know that the post was deleted. Here's my question.

     

    I have a requirement to search for a SharePoint group whose title looks like this - '123456 Section' where '123456' is the site ID and the site URL looks something like this - 

    https://abc.sharepoint.com/sites/appname/123456.

     

    I need the last part of the above URL i.e. 123456. I tried using 

    Last(Split("url", "/")).Result but it didn't work.

     

    Also, once I have the ID, I need to concat/append it to 'Section' so that the group title reads '123456 Section' to filter the results from _api/web/sitegroups. . Please let me know how to accomplish this?

     

    Any help is greatly appreciated. Thank you so much in advance. 

  • Verified answer
    tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @sls22 ,

    Concat(Last(Split('https://abc.sharepoint.com/sites/appname/123456', '/')), ' Section')

     

  • sls22 Profile Picture
    8 on at

    Hi @tom_riha 

    Thank you so much for your response. This worked.

     

    Appreciate all your time and help.

     

    Regards

    SLS

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard