Get a Power Pages site URL dynamically per environment to send emails via Power Automate

michelcarloModern Workplace2 months ago13 Views


When we deploy Power Automate flows that send emails with URLs in the body across environments, it’s never a good practice to have those URLs hardcoded in the body.

For the cases where those URLs target a Power Pages site, there are some ways we can make them dynamic per environment, you can think of environment variables but there is an even simpler way. I know this can look simple but the other day there was someone asking me about it, and the person had hardcoded the URLs with conditions in their flow?

As the Website record ID for a site never changes across different environments when you deploy the same site from Dev to Test, and etc…We can use the same Website identifier in our flow (yeah I know it’s not pretty but it will be the same across environments).

We can grab the value directly from Dataverse, from the Websites table and the Website record for that environment:

Notes

  • The WebSite table for the Standard Data model is the adx_websites table, and for…



Source link

Leave a reply

Join Us
  • X Network2.1K
  • LinkedIn3.8k
  • Bluesky0.5K
Support The Site
Events
February 2025
MTWTFSS
      1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28   
« Jan   Mar »
Follow
Sign In/Sign Up Sidebar Search
Popular Now
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...