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

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard