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 Platform Community / Forums / Power Apps / How to determine in wh...
Power Apps
Answered

How to determine in which CDS environment a flow (power automate) has been triggered

(0) ShareShare
ReportReport
Posted on by 156

Hi,

 

I have implemented a flow which is triggered when a CDS record is added (with the current environment option).

I have 2 different environments (Sandbox and Prod) where the solution containing the flow is deployed.

Once triggered the flow calls an azure function using the HTTP action.

I would like to pass as a parameter the CDS runtime environment to my azure function

 

How can I do that ?

 

Thanks

 

Arioule

 

I have the same question (0)
  • AmirBakht Profile Picture
    262 on at

    Have you looked into the trigger header to see if you can find something useful there? Just thinking out loud.

  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    You can see that by which environment is selected in make.powerapps.com. To see the run history from another environment, select the desired environnment. Cheers

    2020-06-17_17-14-06.png

  • Arioule Profile Picture
    156 on at

    Hi @EricRegnier ,

     

    Thanks for your answer.

    I may have not been very clear in my question.

    I want to pass as a parameter to the azure function called in the flow the CDS environment from where it has been triggered.

    Is it possible ?

  • Verified answer
    EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Thanks for clarifying. Unfortunately there is no way to get that environment from the body nor the headers.

    If you have a custom configuration entity, you can use that and have a config record in each environment with the value of the current environment or the desired Azure Function URL. If you don't have a configuration type of entity then you can use the out-of-the-box environment variables.

    Then once you have your configuration set up in each environment, in your flow, before calling the Azure function, get the configuration record and then call you function accordingly.

    If you end up using environment variables: here's a tip on how to get the value in Power Automate: https://crmtipoftheday.com/1363/get-environment-variables-in-power-automate-and-power-apps/

    Hope this helps!

  • Arioule Profile Picture
    156 on at

    Thanks a lot @AmirBakht  for your help

  • Arioule Profile Picture
    156 on at

    Thanks @EricRegnier 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard