In this article, let’s learn how data can be moved between Dataverse environments using a Power Automate cloud flow.

Scenario:

  • I have an environment Developer Dev that contains the following Account records.
  • I have another environment Test which does not have any Account records
  • Lets create a cloud flow to move Account records from the Developer Dev to Test environments.

Steps to create the flow:

  • Create a new Instant Flow.
  • Next, select the Environment and Table name as shown below.
  • You can also choose options such as Select columns and Filter rows to optimize the fetch.
  • Now that we have the Fetch Account Records action in place, lets loop through the fetched accounts.
  • Add Apply to each control and select the value property of Fetch Account Records action as shown below.
  • Now add Add a new row to selected environment action inside the Apply to each action and select Environment and Table name.
    • Environment : Target environment (i.e., Test) where you want to move the data to.
  • Set the Accounts table properties as shown below. I am setting the Account Name and Account Number properties using Dynamic Expression.
    • Account Name : items(‘Apply_to_each’)?[‘name’]
    • Account Number : items(‘Apply_to_each’)?[‘accountnumber’]
  • That’s it. Save and test the flow.
  • Note : If you wish to retain the same Account GUID in the target environment, set the Account property with Fetch Account Records > Account, as shown below.
  • After the flow runs successfully, navigate to the target environment, and you should see the Account records.

Setting Concurrency:

  • You have the option to speed up the record creation by setting the Concurrency in Apply to each control as shown below.
  • For each loops execute sequentially by default. We can override the default setting to customize the degree of parallelism as shown above.
  • Save and test the flow, and you will notice a performance improvement in the way records are created.

🙂

Advertisements
Advertisements

4 responses to “Power Automate cloud flow : Move data between environments”

  1. THIRU VENKAT N Avatar
    THIRU VENKAT N

    But GUIDs would be different from dev env right?

  2. THIRU VENKAT N Avatar
    THIRU VENKAT N

    GUIDs would be different from dev environment to test env right?

    1. Rajeev Pentyala Avatar

      Added a step in the article to cover this scenario.

  3. Dataverse : Migrate data between environments using the dataflows | Rajeev Pentyala - Microsoft Power Platform Avatar

    […] one of my previous articles, I explained how to migrate data between environments using cloud […]

Leave a reply to THIRU VENKAT N Cancel reply