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 Automate / Different Triggers in ...
Power Automate
Unanswered

Different Triggers in Test and Prod Environments

(0) ShareShare
ReportReport
Posted on by

I have a solution-aware flow that needs to have a manual trigger in my test environment, but in production it needs to run every 10 minutes.  When I update the production flow from test, is there a way to specify that the trigger to NOT be overwritten?

 

I understand that one solution is to just turn off the flow in Test and then back on when I need to run it for testing, but there's no way I'm going to keep remembering to turn it on and off.

Categories:
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @Ukiman1014 

    You can create an environment variable named "FlowStatus." In UAT, it can be set as false, whereas in Production it should be set to true. Subsequently, add a trigger condition within your workflow that responds accordingly to the "FlowStatus" variable.

    Solved: Can we access environment variables inside Trigger... - Power Platform Community (microsoft.com)

    Trigger conditions - just what I needed - Powering your Apps (sudeepghatak.com)

     

  • Ukiman1014 Profile Picture
    on at

    @SudeepGhatakNZ, if I'm following correctly, I would keep the trigger as scheduled in test and prod but add a trigger condition which checks my "FlowStatus" environment variable.  This would only allow the trigger to fire when it's in the production environment.  The only way for me to run the flow in test would be to click the "Test" button when editing the flow, which should override the trigger.

    I will have to try this out as soon as I have time.

  • Ukiman1014 Profile Picture
    on at

    I am not able to get this working.  I used this article as reference when attempting to access an environment variable inside a trigger, but the example is hard to follow and does not have much instruction at all.  I may just need to start a new post, asking how to do this.

  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    Please follow these steps

    1) Define an environment variable

    SudeepGhatakNZ_0-1715848943625.png

     

    2) Add the environment variable in a compose action to get the name of the parameter.

    mARXx27pOh.png

    3) Add the trigger.

    SudeepGhatakNZ_1-1715848999172.png

     

    SudeepGhatakNZ_2-1715849045693.png

     

    In the example above, the flow will only run if the variable value is Dev. Hope that helps!

     

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

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 289

#2
11manish Profile Picture

11manish 282 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard