Forum Discussion

Jason Barnes's avatar
Jason Barnes
Brass Contributor
Jan 30, 2019
Solved

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

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-assets-in-sharepoint-online-using-pnp-provisioning-templatesmicrosoft-flow-and-azure-functions.aspx#Summary, 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? 

  • 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. 

     

    https://powerusers.microsoft.com/t5/Flow-Ideas/programmatically-create-a-flow/idi-p/112491 

2 Replies

  • Jason Barnes's avatar
    Jason Barnes
    Brass Contributor

    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. 

     

    https://powerusers.microsoft.com/t5/Flow-Ideas/programmatically-create-a-flow/idi-p/112491 

Resources