Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

How to programmatically import a flow to a new sitecollection?

I created a flow for DocumentLlibraryA and the trigger is on created a new document. I exported this flow as json and as a zip file. Is it possible to pragrammatically import this flow to a new sitecollection with the same document library (name and metadata)? Maybe powershell or c#?? 


The reason why I ask this is because we created a template from our department sites in a pnp template. For each new sitecollection we provision this pnp template to this sitecollection. So the structure is always the same as columns, contenttypes, document libraries, lists, views, navigation, pages etc..But I would like also to add a flow to one of the document libraries.


I found some documentation from Microsoft but there are not many tutorials about this topic:


Power Automate
Power Automate

You have the correct documentation, the sections on imports and exports would be most relevant:


Where are you running into issues as you follow that guide?

I see only this technical documentation. I dont see somewhere a tutorial where someone do a request to the flow api in code. For example powershell or c# or some other language.

Helpful resources

Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (20,110)