Showing results for 
Search instead for 
Did you mean: 
Advocate II
Advocate II

Using environment variables in trigger

I'm trying to use an environment variable in a OneDrive trigger. I know some time ago the docs stated that only 3 trigger types could take env vars (I believe it was SharePoint, and some other two that were neither OneDrive nor Outlook). Nowadays the docs do not state such a limitation so it seems like basically any trigger can take an env var now.


However, my 'When an item is created in OneDrive' trigger doesn't open up the dynamic content. Some forum answers mention typing in "@parameters('MyVarName')" but if I do that, the trigger doesn't get triggered. If you peek at the code, you see "@@parameters('MyVarName')", ie. it has a double "@". If you omit the "@", then peek code reveals "parameters('MyVarName')", ie. it's missing the "@".


I've been waiting for a while to be able to use env vars in any trigger (or at least the most common ones) but it seems like that's not the case yet?


Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,132)