Developing a Nintex Workflow for Office 365 to Create Sub-sites in a Site Collection Prerequisites to follow along with the example: • I have already created a custom SharePoint 2013 List titled Request a Site that includes 2 columns: Site Title (Single line of text) and Desired URL (Single line of text). • I have already created a custom SharePoint 2013 List titled Approved Owners that includes 4 columns: Team (Single line of text), Approved User (Person or Group), Manager (Person or Group) and Approved Owner(Choice with 2 choices: Yes and No). • You will need to have Nintex Workflow for Office 365 installed in the site with the Enterprise Provisioning Actions added from the Nintex Store. Steps to create a Nintex Workflow for creating SharePoint sites: 1. In the Request a Site list, click the List tab in the Ribbon. 2. In the Ribbon, click the Nintex Workflow Button 3. The Nintex Workflow User Interface will appear 4. In the Actions pane, click the Provisioning Category. 1 5. From the Actions pane, drag-and-drop the Office 365 create site action on the Designer between the start and stop points. 6. On the Designer, double click the newly added Office 365 create site action. The configuration window will open. 7. Click in the Title field of the configuration form. The Insert Reference pane will appear on the right. 8. In the Insert Reference pane, double click the Site Title item property. This will add a reference to the Title field. 9.Click the Site Owner field then in the Insert Reference pane, click the Workflow Context category at the bottom of the pane. 10. In the Insert Reference pane, double click Initiator login name. 11. Type the desired Parent Site URL. This will be the site where this new site will live under. 12. Click the URL name field then in the Insert Reference pane, double click Desired URL . 13. Select the desired Language. 2 14. Select the desired Template. 15. Type your SharePoint Online URL. 16. In the Username field, type the name you would like the workflow to run under. This should be a service account. 17. In the Password field, type the password of the username you entered above. 18. Make any other desired changes to the create site action then click Save. 19. In the Actions pane, click the User Interaction category 20. From the Actions pane, drag-and-drop the Send an Email action to the Designer below the Office 365 create site action. 21. On the Designer, double click the newly added Send an Email action. The configuration window will appear. 22. To the right of the To field, click the book icon. 23. In the first Equals drop down menu, select Workflow Context. 24. In the second Equals drop down menu, select Initiator. 25. Click Insert. 26.In the Subject field, type Your request for the site. Be sure to include a space after the word site. 27. In the Insert Reference pane, double click Site Title. 28. Add a space after the Site Title reference then type has been completed. 29. Type your desired Body for the email then click Save. 3 30. In the Actions pane, click the User Interaction category. 31. From the Actions pane, drag-and-drop the Assign a task action to the Designer above the Office 365 create site action. 32. On the Designer, double click your newly added Assign a task action. 33. In the Participant field, click the Book icon. 34. In the Equals drop down menu select List Lookup. 35.In the Source drop down menu select Approved Owners. 36. In the Field drop down menu select Manager 37. In the When drop down menu select Approved User. 38. In the first Equals drop down menu select Workflow Context. 39. In the second Equals drop down menu select Initiator. 40. Click Insert. 41. In the Task Title field, type A new site request has been submitted by. Be sure to add a space after the word by. 42. In the Insert Reference pane, double click the Created by reference. 4 43. Scroll to the bottom of the configuration window. 44. Click the drop down menu in the Task Outcome field then select Create new variable. A Workflow Variables pane will appear on the right. 45. Type the Name Site Request Approval Outcome then click Create. 46. Click Save in the configuration window. 47. In the Actions pane, click the Logic and Flow category. 48. From the Actions pane, drag and drop the Conditional Branch on the Designer below the Assign a task action. 49. Double click the newly added Conditional Branch action. A configuration window will open. 50. In the first Value drop down menu, select Workflow Variables. 51. In the next drop down menu, select Site Request Approval Outcome. 52. In the second Value text box, type 0. 0 represents an approve outcome on the task, 1 would represent a reject outcome. 5 53. Click Save to close the configuration window. 54. On the Designer, drag the Office 365 create site action to the right side of the Conditional Branch. This will indicate it will only happen when the outcome of the task is approve. 55. Do the same with the Send an Email action. 56. Click the drop down menu in the Send an Email action then select Copy. 57. On the left side of the Conditional Branch, right click the white square then select Paste. 58. Double click the newly pasted Send an Email action. A configuration window will appear. 59. Modify the subject field from completed to rejected. 60. Make the necessary changes to the Body field as well. 61. Click Save to close the configuration window. 62. In the Actions pane, click the Logic and Flow category. 63. From the Actions pane, drag and drop the Conditional Branch action in the Designer above the Assign a Task action. 64. Double click the newly added Conditional Branch action. The configuration window will appear. 65. In the Equals drop down menu select List Lookup. 66. In the Source drop down menu select Approved Owners. 6 67. In the Field drop down menu select Approved Owner. 68. In the When drop down menu select Approved User. 69. In the first Equals drop down menu select Workflow Context. 70. In the second Equals drop down menu select Initiator. 71. At the bottom in the Value text box type Yes. 72. Click Save to close the configuration window. 73. Drag and drop the Assign a task action to the right side of the Conditional Branch. 74. Drag and drop the bottom Conditional Branch to the right side of the top Conditional Branch under the Assign a task. Its logic will move with it. 75. Click the drop down menu in the Send an Email action that is configured to send a rejection message then select Copy. 76. On the left side of the top Conditional Branch, right click the white square then select Paste. 77. Double click the newly pasted Send an Email action. A configuration window will appear. 78. Modify the Subject field to include because you are not an approved owner. 79. Modify the Body field as necessary. 80. Click Save to close the configuration window. 81. In the Ribbon, click the Save button. 7 82. Type the Name Site Request Approval Workflow. 83. Select the Task list Workflow Tasks. 84. Select Start when items are created in the Start Options. 85. Click Save. 86. Click OK. 87. In the Ribbon, click the Publish button. 88. Click Publish. 89. Click OK. 90. Your workflow is now ready for testing. Click Close to return back to the site. Some other things to consider when building a Nintex workflow are: • Adding Update Workflow Status in places where it should change where the workflow might be in its progress. • Adding Log to History in places where you want to track something that has happened and retain that information. • • Adding Variables to store specific values for troubleshooting. Adding Log to History to see a variable value for troubleshooting. 8
© Copyright 2024