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 Automate
Answered

Buildin

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

I've got a Flow that is being passed a shipping company name (UPS or DHL) and a Tracking Number ('TrackingNumber')and I need it to dynamically build the URL to paste into an e-mail to track a shipment.  Currently I'm just handling UPS and it's working fine if I use this in my send an e-mail step.  

UPS is http ://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=@{triggerBody()['TrackingNumber']}">@{triggerBody()['TrackingNumber']} (i have a href tags in it but its messing up this post so I removed them)

 

Now I'm also initializing a value im calling "Shipper" and it will be set to "UPS" or "DHL".  If it's UPS, I want it to leverage the above URL.  If it's DHL, I want it to be (my dhl url stuff) /en/express/tracking.html?AWB=@{triggerBody()['TrackingNumber']}">@{triggerBody()['TrackingNumber']}</a>

 

I can't seem to get my ifs and variables and concat just right :(.  Basically I need it to be If the variable "Shipper" = UPS use the UPS url and if "Shipper" = "DHL" use the 2nd.

 

Thanks in advance!

Categories:
I have the same question (0)
  • RezaDorrani Profile Picture
    12,145 on at

    @russrimm 

     

    In Flow add a condition to check the value for Shipper

     

    conditon Shipper equals UPS

    Yes branch - set variable to UPS url

    No branch - set variable to DHS url

     

    and then send ur email

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

  • russrimm Profile Picture
    Microsoft Employee on at

    Thanks Reza,

    I started going down that path and then thought i'd try to prevent having a condition check and have it handled in a if then compose in the event I needed to add more shipping companies in the future - so I could just use multiple ifs vs having a web of yes/no logics if I expand to 3+ shippers.  Now that I'm struggling with that, I think i'll fall back to what you recommend instead as it seems like it's just complicating things since i'm not that fluent w/expressions yet  :|.  

    Thanks!

  • Verified answer
    RezaDorrani Profile Picture
    12,145 on at

    @russrimm 

     

    Ideally you should have a SP list with following info

    Shipper name

    and shipping url

     

    In flow then based on shipper selected, you can query the list and get the information for the url and accordingly use it

     

    This will give u max flexibility

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 412

#2
Vish WR Profile Picture

Vish WR 289

#3
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

Last 30 days Overall leaderboard