cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dreamsat
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:

 

https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-trigger-flow-t...

https://docs.microsoft.com/nl-nl/flow/web-api

 

2 REPLIES 2
Audrie-MSFT
Power Automate
Power Automate

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

https://docs.microsoft.com/en-us/flow/web-api#import-flows

 

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

Announcements
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

Users online (64,644)