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 / How to detect end of url
Power Automate
Unanswered

How to detect end of url

(0) ShareShare
ReportReport
Posted on by
I am trying to post the message into Microsoft Teams whenever recieving email messages from certain system, using Flow bot.
This message always contains URL, and needs to convert the URL to markdown so that posted message in Teams contains clickable URL (not just text).

I understand we can use the markdown to specify the beginning of the URL as:
replace(variables('TransBody1'),'https:','[Please click here to see the contents](https:')

But having difficulty specifying the end of the URL, as URL is getenarated randomly with unique ID each time, such as "https://foo.com/test.asp?ID=23" where the last ID number always changes.
This is preventing from making a markdown TransBody as URL ending can not be specified.
replace(variables('TransBody2'),'ID=RAMDOM_ENDING_ID','ID=RANDOM_ENDING_ID)') <== where "RAMDOM_ENDING_ID" is unique number each time...

Is there a way to grab the variable string in Flow?

Thank you in advance.
Categories:
I have the same question (0)
  • Verified answer
    Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    @Takashi1 

    Hi there!  So, probably a couple of ways to do this depending on your comfort level.  You seem fine with expressions (which I'm not)...but it feels like we could probably do some string manipulation using "indexof" and/or "lastindexof" to find the positions of "?ID=" and whatever character follows the end of the URL, then use "substring" to single out those bits with a bit of math (to figure the length of the ID).

     

    Another option would be a parsing tool like Parserr or Plumsail to do essentially the same thing, but with a friendlier interface.

     

    Do either of those sound good?

     

    -Ed-

     

     

    If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

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