Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Template
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

Reconnect Power Automate flow to a different SharePoint site/lists

Posted on July 23, 2023July 23, 2023 by Tom

“I’d like to reuse my Power Automate flow on a different SharePoint site, is there some easy way how can I reconnect all the lists without updating all the actions one by one?”


When you build Power Automate flows, the right approach should be to have two environments. One where you’ll develop the flow and do all the testing, and a second one for the final flow. If it’s a flow connected to SharePoint, it might be two SharePoint sites. One with testing data, another one with the production data. Only properly tested flows should make it to the production data.

Yet if you are building flows over SharePoint, all the actions will be connected to the development site (unless you use solutions, topic for some post in the future). Moving them to the production site might need an update in all the SharePoint actions. A task that’s quite risky – what if you miss one of the actions? And how annoying it might be to update site and list/library in tens of actions? Is there an easier way to reconnect everything in the flow to a different site?

Start by exporting the flow

You can’t make any mass updates directly using the flow designer, but you can do it directly in the flow code. Start by exporting the flow in a .zip package.

Enter some name for the exported file and export it.

Open the flow definition file

Once downloaded, extract the .zip file and go deep into the folder structure until you get to the definition.json file.

Power Automate different SharePoint site

Open it in a code editor (I personally use Visual Studio Code) and you’ll see the original site url and list guid in the code.

Power Automate different SharePoint site

This tells the flow where to connect, and that’s the part where you can reconnect the flow. But to get that you’ll need guid of all the lists and libraries on both of the sites. Copy/paste all the guids into a text file.

Now you can start replacing the values in the definition.json files, the old url with the new one, the old guid with the new one.

Power Automate different SharePoint site

Replace the file in the .zip file

After you replace all the guids, replace the definition.json file in the .zip file with the new one.

Note: you’ll have to do this in Windows as Mac OS adds an additional folder in .zip files that makes the flow .zip file invalid.

Import the new flow

Import the flow again using the updated .zip file. Go to the flows overview and select Import -> Import Package.

Select the .zip file, pick the connections it should use, and import it.

The imported flow will be connected to the new SharePoint site, lists, and libraries.

Summary

It might be time consuming to reconnect Power Automate flows to a different SharePoint site if you use the designer. Luckily, you don’t have to. You can download the flow as a .zip file, find the connections in the definition.json file and replace them, and import the flow again. Instead of replacing sites/lists/libraries one by one you can replace multiple at once with the editor ‘replace all’ functions. The only challenging part might be to not get lost in all the guids, but if you store them in an organised way you should be fine.


πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

1 thought on “Reconnect Power Automate flow to a different SharePoint site/lists”

  1. James says:
    August 21, 2023 at 12:09 am

    Love your stuff Tom! But this feels like a case of just because we can doesn’t mean we should … Solutions and Environment variables would likely be faster as well, looking forward to that post πŸ™‚

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Working on an Approval process?

Use the Approval Process Template and the Task Delegation App to skip the hard part and deploy a fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes