none
Create subsite when adding item to list using sharepoint workflow 2013

    Question

  • Hi everyone

    I have a SharePoint online (plan1) environment where i have a subsite for the R&D department. This subsite is a simple page with a list where you have a small overview off all the R&D projects. I want to have a workflow that triggers the creation of a subsite each time an item is added to that list. Each subsite uses the same custom sitetemplate. To achieve this i tried following  a tutorial: https://www.dmcinfo.com/latest-thinking/blog/id/8661/create-site-from-template-using-sharepoint-2013-workflow

    This tutorial works great, each time i create a list item a subsite will be added with a certain template just as i wanted. But the problem is that this tutorial only works if i use it for a list on the site collection level (highest level). If i create the exact same workflow for a list on my R&D subsite it won't create a subsite if i add an item to the list. If i look at the status of the workflow it is always completed succesfully so there are no errors at all.

    I really don't know how to fix this, i've been struggling with this for days now but there isn't alot of documentation on this topic. I'm a full admin of the whole SharePoint environment and i granted full control to the workflows.

    Any help would be greatly appreciated.

    Kind regards

    Jason Robesyn



    mardi 10 juillet 2018 10:27

Réponses

  • Hi Jason,

    Type below URL to go to the hidden workflow history list to check if there are more error message:

    http://[servername]/[sitename]/lists/Workflow%20History

    You can add log actions to find more message. For example, use log action to log the contents of ResponseContent.

    Without testing this scenario, the two things that come to mind are:

    1. App Permissions: you may need to change this to grant full control to the whole site collection, this way the workflow has the permissions it needs to create webs within the scope of the entire SPSite.

    2. The REST Url: you will probably want/need to dynamically build the URL based on the values in the form. That is, instead of just hardcoding the value to create the SPWeb under the root of the site collection, I would think you’d want to change the URL of the parent web depending on the Company value of the form.

    I will test this workflow in my subsite and will tell you my result. 

    Best regards,

    Allen Bai


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    mercredi 11 juillet 2018 10:06

Toutes les réponses

  • Hi Jason,

    Type below URL to go to the hidden workflow history list to check if there are more error message:

    http://[servername]/[sitename]/lists/Workflow%20History

    You can add log actions to find more message. For example, use log action to log the contents of ResponseContent.

    Without testing this scenario, the two things that come to mind are:

    1. App Permissions: you may need to change this to grant full control to the whole site collection, this way the workflow has the permissions it needs to create webs within the scope of the entire SPSite.

    2. The REST Url: you will probably want/need to dynamically build the URL based on the values in the form. That is, instead of just hardcoding the value to create the SPWeb under the root of the site collection, I would think you’d want to change the URL of the parent web depending on the Company value of the form.

    I will test this workflow in my subsite and will tell you my result. 

    Best regards,

    Allen Bai


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    mercredi 11 juillet 2018 10:06
  • Dear Linda

    Thank you for the feedback. With it I'm now able to create a site under a subsite.

    Kind regards and many thanks!

    Jason Robesyn

    mardi 17 juillet 2018 08:30