SOLVED

Create a site from template and attach Flow programmatically/via script

Brass Contributor

I need to create a site from a template and automatically attach a flow to one of the lists that would be included in the site template. It looks like I can use this link as a starting point: https://social.technet.microsoft.com/wiki/contents/articles/52486.office-365-auto-provision-site-ass..., but it doesn't go into programmatically attaching a flow to a list. I thought I had read something about adding a flow to a list via script (or flow or something), but I can't find anything on it now when I search. Hopefully that all makes sense, but please let me know if it's unclear.

 

Has anyone done anything like this? Can you offer any links for adding a flow to a list via script? 

2 Replies
best response confirmed by Jason Barnes (Brass Contributor)
Solution

If anyone finds this later:

 

You can programmatically create flows. Read more about the specific action here: https://docs.microsoft.com/connectors/flowmanagement/#create-flow and the announcement here: https://flow.microsoft.com/blog/planner-triggers-connector-improvements/ The API is also now documented here: https://docs.microsoft.com/flow/web-api so you can use whatever tools you want to create or update flows programatically. 

 

Source 

@Jason Barnes how did you achieve updating the trigger to point at your new list?

1 best response

Accepted Solutions
best response confirmed by Jason Barnes (Brass Contributor)
Solution

If anyone finds this later:

 

You can programmatically create flows. Read more about the specific action here: https://docs.microsoft.com/connectors/flowmanagement/#create-flow and the announcement here: https://flow.microsoft.com/blog/planner-triggers-connector-improvements/ The API is also now documented here: https://docs.microsoft.com/flow/web-api so you can use whatever tools you want to create or update flows programatically. 

 

Source 

View solution in original post