Skip to main content
Community site session details

Community site session details

Session Id : 96vBLdRDofVXIS6Uuph4xf
Power Automate - Building Flows
Answered

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

Like (0) ShareShare
ReportReport
Posted on 3 Aug 2022 19:27:42 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.

  • sls22 Profile Picture
    8 on 08 Aug 2022 at 16:54:07
    Re: How to get the last part of URL using power automate flow?

    Hi @tom_riha 

    Thank you so much for your response. This worked.

     

    Appreciate all your time and help.

     

    Regards

    SLS

  • Verified answer
    tom_riha Profile Picture
    10,127 Most Valuable Professional on 06 Aug 2022 at 15:19:04
    Re: How to get the last part of URL using power automate flow?

    Hello @sls22 ,

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

     

  • sls22 Profile Picture
    8 on 04 Aug 2022 at 14:16:41
    Re: How to get the last part of URL using power automate flow?

    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. 

  • tom_riha Profile Picture
    10,127 Most Valuable Professional on 04 Aug 2022 at 13:47:51
    Re: How to get the last part of URL using power automate flow?

    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', '/'))

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete