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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

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


Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (69,127)