Create a workflow from a SharePoint list or library
When integrating a SharePoint list or library with the product, you can add a workflow at that time or at a later date. To add a workflow to your application when creating it, follow these steps:
Images in this section may differ depending on your version of SharePoint. For more information on the recent changes to SharePoint Online user interface (UI), see SharePoint Online User Interface changes.- Select the Application icon from the SharePoint ribbon.
Legacy K2 for SharePoint app
SharePoint Online (SPFx) app - On the Create Application page, select the check box next to Workflow. Provide the configuration for the new workflow, such as the workflow name and how the workflow is to be started.
- Select one of the radio buttons to specify how you want to start your workflow:
- When a SmartForm is submitted: Starts your workflow only when someone completes and submits a SmartForm. This option is only available if you checked Forms in Step 2. Use the drop-down menu to select the form used to start the workflow:
- New...: form displayed when you add a new item to a list (does not apply to libraries)
- Edit....: form displayed when you edit an item in a list or document properties
- Display....: form displayed when you view a single item from a list
- When the following events occur: Starts the workflow after one or more selected SharePoint events occur. Use this option to automatically start a workflow when other applications or people create a new item in the SharePoint list or library. Select events such as adding, updating, or deleting an item.
For the product in SharePoint Online, the event receiver now functions using Webhooks. Webhooks is a modern web integration scheme to allow third party services to receive notifications when an event occurs in the source system. This allows the product to receive notifications instead of having to poll at regular intervals to find out if something has changed. Webhooks are not SharePoint specific and more web services are supporting Webhooks in general to allow system integration.
SharePoint raises Webhook events asynchronously. Workflows may start out of order or with a time delay based on SharePoint queuing. Typically this is around one minute, but may be as great as five minutes.For more information see Webhooks Events.
- If you want people to be able to manually start the workflow, select the Workflow is manually started event.
- Click OK at the bottom of the page.
- The Workflow Designer displays:
- From this point you can start building your workflow, start by configuring the Start step then use steps from the Toolbox.
For detailed information on the Toolbox see the Toolbox overview topic.
To add a new workflow to an existing application, click + New at the top of the Application page and select Workflow from the menu, and then follow the steps above.