How to extract part of http url in logic app

Yahya Shareef 1 Reputation point
2021-12-22T14:12:50.487+00:00

Hi i need to extract last part of the below url in my logic app which is (d3aba6d3-0bf6-492f-e053-3a55050ab2ee) how can i do this.

https://www.ggogle.com/d3aba6d3-0bf6-492f-e053-3a55050ab2ee

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Andrew Blumhardt 10,071 Reputation points Microsoft Employee
    2021-12-22T15:56:41.453+00:00
    0 comments No comments

  2. MayankBargali-MSFT 70,986 Reputation points Moderator
    2021-12-23T05:25:47.09+00:00

    @Yahya Shareef You can use the below expression to get your desired output. Splitting your input value / which I have stored in URL variable of type string and getting the last index of the array to get your desired output. As Andrew has shared the reference document for the different functions that you can use in the logic app.

    Navigate to dynamic content (on any of the actions where you want to use) --> Expression

    last(split(variables('URL'),'/'))  
    

    159942-image.png

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.