cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DynAB
Frequent Visitor

Use an Environment Variable in a Flow trigger (MS Form new response trigger)

We have a flow which is triggered on submission of a Microsoft Form (When a new response is submitted). We want to set up Environment Variables so that e.g. the dev flow references the dev form, the test flow references the test form and the production flow references the production form.

 

I have set up an Environment Variable with no default value and a current value in the dev environment.

 

In the flow, if I go to a later action related to the form, I can remove the hard-coded form id value and choose 'enter custom value'. I now get the list of available Environment Variables come up and I can choose the one I set up.

 

However, when I delete the hard-coded form id value in the trigger, and click 'enter custom value', I get no list of Environment Variables. Just a sad sorry empty field. 

 

The documentation here says that Environment Variables can be used in triggers, but this isn't happening for me. Does anyone have any insight please?

 

Trigger - not able to select environment variableTrigger - not able to select environment variableAction within Apply to Each - Environment Variable selectedAction within Apply to Each - Environment Variable selected

1 ACCEPTED SOLUTION

Accepted Solutions
Jcook
Super User
Super User

Hello @DynAB 

 

When entering a custom value into the trigger, type this:

 

 

@parameters('MSFormsParam')

 

 

 

Snag_3eb9a40a.png

 

 


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

4 REPLIES 4
Jcook
Super User
Super User

Hello @DynAB 

 

When entering a custom value into the trigger, type this:

 

 

@parameters('MSFormsParam')

 

 

 

Snag_3eb9a40a.png

 

 


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





DynAB
Frequent Visitor

Thank you vey much - much appreciated!

ACT
Frequent Visitor

Hello @Jcook 

I have just tried to write as you said, in the trigger @parameters('my_env_var') but the flow is not being triggered actually. Taking the responses I use the variable without problems. Am I missing something?

If I write the form id it works perfectly. 

ACT_0-1628168376729.png

Thanks in advance for your help

 

ACT
Frequent Visitor

I can confirm that environment variables are not supported yet for MS Forms trigger:

https://docs.microsoft.com/en-us/powerapps/maker/data-platform/environmentvariables#current-limitati...

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PWREduCon768x460.png

Join us at PWR EduCon - A Power Platform Conference

Learn from the top Power BI, Power Apps, Power Automate & Power Virtual Agents experts!

Top Solution Authors
Top Kudoed Authors
Users online (3,484)