Best practices for migrating Flows (Power Automate) from Dev to Prod Environment in Office 365

354
3
06-21-2021 10:15 AM
erica_tefft
Occasional Contributor III

Hi,

My organization is taking steps to refine and lock down our Office 365 environments. They are migrating us from the "default" environment to new 'Development' and 'Production' environments. 

I was wondering if anyone here could share best practices or lessons learned for migrating existing Flows between environments. Currently, all my Flows live in the "default" environment and will need to be moved to another location. I am curious how this will impact my end users and if anyone has suggestions on the best ways to move a Flow between environments, get it working again with Survey123, and minimize downtime to end users. 

Thank you,

Erica
3 Replies
ZacharySutherby
Esri Regular Contributor

Hello @erica_tefft

There may be a better workflow out there, but the best workflow that I can think of is to export the flow as a zip package and then reupload that package in the new organization. 

ZacharySutherby_0-1625070450953.pngZacharySutherby_1-1625070545750.png

 

Here is a Microsoft doc link for the workflow: https://flow.microsoft.com/en-us/blog/import-export-bap-packages/

Thank you, 

Zach

0 Kudos
erica_tefft
Occasional Contributor III

Hi Zach,

This is something I have tried, and it does work. I have been doing more testing between environments and noticed a few odd behaviors - maybe you have suggestions or know why this happens.

When moving a Flow from Dev to Prod, I use the Export package option. I then turn off/disable to Flow in Dev. When I Import and set up the Flow in Prod, it is turned off/disabled. When I turn it on, it also turns on the Flow in Dev. I am unsure if this is expected behavior, or if it is because I have named the Flow the same thing between Dev and Prod. It also resulted in duplicate email notifications when I submitted a test survey. The only way I could think to resolve this was to delete the Dev version. However, I am unsure if this is best practice.

Any thoughts?

Also, when sharing a Flow with someone, I noticed that the incorrect connections were listed. I use a service account for email generation, but the dialog said it was sharing my named account credentials (which aren't even used in the Flow, although my named account owns/authored the Flow). 

Thank you,

Erica
0 Kudos
ZacharySutherby
Esri Regular Contributor

Hello @erica_tefft

I would check the Settings tab on the Survey123 website to remove the Dev flow. There may be two webhooks present on the survey and that's why it's submitting to both

ZacharySutherby_0-1625162367420.png

Either deleting the connection on the survey side, or disabling the trigger events and turning it off should prevent from submitting to the payload URL. 

Thank you, 

Zach

0 Kudos