cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
GreySnowOgre
New Member

Best practice - environment-specific variables and connections

I'm looking for advice on how to manage (solution-aware) Flows that move between environments. Right now the whole process seems woefully hard so I'm certain I'm doing something wrong!

 

Simple example - I have a Flow that is triggered in CDS (I can now use the CDS "Current Environment" connector - that's one thing off the list!). When a record is created, connect to SharePoint and then create a file or folder there. In this scenario, I need to switch connections to SharePoint between each environment (i.e. upload to the Sharepoint online subsite for DEV or TEST or PROD) but also some Sharepoint actions require me to also specify the name of the subsite as a string (e.g. "subsite-dev", "subsite-test", "subsite-prod" etc).

 

How do I best manage thiese dependencies? I imagine that I could create a Settings entity in CDS that allows me to set some constants. This could work where I need strings but 1) I don't see this working for Connections and 2) seems inefficient to have to read that setting on every transaction.

 

Can anyone point me to a best practice blog, article or post that gives some guidance; I know this isn't a unique issue but I can't seem to find the right search terms to get to the answer I need!

 

Thanks

4 REPLIES 4
v-lin-msft Post Prodigy
Post Prodigy

Re: Best practice - environment-specific variables and connections

Hi @GreySnowOgre ,

 

I understand roughly what you mean is that there are three environments, and there is one SharePoint in each environment. You want to create a flow so that SharePoint data in these three environments can be exchanged, right?

 

Although environments provide many benefits, they also introduce new limitations. The fact that environments are an isolation boundary means that you can never have resources that reference resources across environments. For example, you may not create a SharePoint connection in one environment and then create a flow that uses that SharePoint connection in a different environment:

https://docs.microsoft.com/en-us/flow/environments-overview-admin#limitations

 

Best Regards,

Community Support Team _ Lin Tu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

GreySnowOgre
New Member

Re: Best practice - environment-specific variables and connections

Thanks for your reply Lin, but I think my question is wider than simply understanding the challenges of environments. There are many situations where variables/constants that are appropriate for development or test scenarios are not appropriate for production. This could a path, a username, a record id, a url... What I'm seeking here is some advice to best manage such variables at design time in Flow so that I can minimise the risk of propogating a Flow from a TEST scenario to a PRODUCTION scenario and make sure that everything points in the right place. Connections are part of the same problem, though there may be a different solution there.

 

I'm simply looking to understand what is the recommended approach at design-time to help manage these problems.

 

In the case of my Sharepoint example earlier, I am not using "Environments" (note the captial letter) rather have a choice of Sharepoint subsites thatI should write to; the one I use for production has the same structure as the ones I use for development and test, they just differ in the URL at the top level. How would I most efficiently ensure that my TEST Flow points to the TEST Sharepoint subsite and my PRODUCTION Flow points to my Production subsite?

Vrvlssm
New Member

Re: Best practice - environment-specific variables and connections

Hi,
We struggle with the same difficulties. For now we tend to use LogicApps instead of Flow when we meet his issue with environmental variables.
Anand_M1
New Member

Re: Best practice - environment-specific variables and connections

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (5,772)