How to create environments for Development, UAT and Production in Power Automate

Do you know how to create environments in Power Automate to manage your flows better?

Taking the next steps to multiple environments

Setting the site url with a switch

When you have been using Power Automate for a while and you implement business critical processes then you might find that the multiple environments in Flow works well, as you can create multiple copies of your flows and keep them separated. Quite quickly however you will also want to separate your data.

But one of the problem when you separate your data is that you can’t easily copy your flows between the environments anymore. Yes of course you could copy the flows but you want the Development flows to access data in a development SharePoint site.

In my case I created 3 site collection a production site collection in /sites/ftp, development in /sites/devftp and uat in /sites/uatftp

Then using the following expression I collect the first 34 characters from my site collection so that I can recognise the environment I’m in.

substring(triggerBody()?['{Link}'],34,3)

Adding this to a switch and then I set the Site url within set variable actions. All easy stuff!

Get file properties is happy to take this and it looks like there is no pain in this post!

Get file properties with dynamic content

Then I tried to do an update file properties actions.

Cannot evaluate the parameter 'dataset' at design-time; it is empty or has a runtime expression

Cannot evaluate the parameter ‘dataset’ at design-time; it is empty or has a runtime expression.

Obviously this is because Microsoft Flow cannot find the fields on the library as it doesn’t know which library to look at. So what to do?

The easiest solutions that I can thing of are:

  1. Use REST API to do the Item/File properties updates ( for the real developers)
  2. Put a switch above the update file properties and depending on which environment we are in use a different update file properties action (for the less development focused FLOWers)
  3. Ask someone who has done it before to do the work for you 😉 (hybrIT Services)

In my solution I decided to go for the HTTP request to SharePoint options.

How to create environments for Development, UAT and Production in Power Automate Microsoft Flow, Microsoft Office 365 httprequest

If this looks too complicated? Then you might want to go for option 3. Or wait until I get the 2nd part of this series written up.

See Also

https://sharepains.com/2018/03/12/multiple-versions-flow-power-automate/

One thought on “How to create environments for Development, UAT and Production in Power Automate

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 4,912 other subscribers

Recent Posts

Archive

Thank you for visiting SharePains

%d bloggers like this: