SharePoint web triggers enable you to monitor a SharePoint site for events. You can configure actions that activate when the monitored event occurs in the SharePoint site.

Overview

The SharePoint web triggers enable you to start an automation workflow based on the subscribed events. Configure the SharePoint web trigger to listen for the subscribed events. Once the event occurs in the SharePoint site, the trigger activates the subsequent automation workflow. The SharePoint web triggers allow you to create automations without any manual intervention with real-time data exchange.

The SharePoint web triggers use OAuth connection to authenticate the incoming data. For more information about OAuth connection for SharePoint, see Create OAuth connection.
Note: A significant latency occurs between the event happening in a SharePoint site and Control Room receiving the notification from SharePoint site. For more information, see the latency table in Microsoft Graph REST API Subscription latency.

Supported events

You can configure the SharePoint web triggers to listen for events in files, folders and lists. The SharePoint web triggers support following events.

Events Description
File created When a file is created in the monitored SharePoint site.
File updated When a file is updated in the monitored SharePoint site.
Folder created When a folder is created in the monitored SharePoint site.
Folder updated When a folder is created in the monitored SharePoint site.
List item created When an item is added to a list in the monitored SharePoint site.
List item updated When an existing list item is updated in the monitored SharePoint site.

Prerequisites

Ensure that the following prerequisites are met:

  • A Bot Creator or Citizen Developer license.
  • EVENT TRIGGERS and View my bots permissions.
  • Check in and Check out permission on the folders in which the automation is located.
  • An active OAuth connection for the SharePoint site.

Settings

The following settings are available for SharePoint web trigger.
SharePoint OAuth
The SharePoint OAuth option allows you to select the configured OAuth connection. Ensure that you add Microsoft Graph permission to the OAuth connection scope. The Microsoft Graph scope allows the trigger to read the SharePoint document library for file and folder related events, and read the SharePoint lists for list related events.
Site
The Site option allows you to configure the SharePoint site that you monitor for events. You can either enter the link directly or use the Select site option to select the site from the Sites drop-down list. The Sites drop-down list connects toSharePoint site and lists all the sites within the subdomain.
Event type
The Event type option allows you to configure the events on which the trigger activates the subsequent automation actions. You can configure the trigger on basis of File & Folder or List.
In File & Folder option, select the events from Listen to event drop-down and enter the file path for file events and folder path for folder events. Ensure that you enter the parent folder for the folder events. For example, to monitor folder events for a folder named XYZ, that is located inside another folder ABC within the SharePoint documents folder, enter Documents/ABC.
Response
The Response option allows you to capture the trigger response data in a record variable. You can select either create a record variable or select an existing record variable to capture the response data. The record variable captures the API response body information in a key-value pair format.

Reading trigger response data in Audit log

The trigger response data contains all the information of the events in which the change has occurred. The event payload data is generated using the resource properties of SharePoint APIs in Microsoft Graph. The data. You can view the data, stored in a key-value pair, on the Audit log page. For more information about the SharePoint event payload data, see Working with SharePoint sites in Microsoft Graph.

You can use the event payload data attributes captured in the Audit log as inputs for any subsequent actions within the session. You can also build the arguments for the attributes from the API resource type properties of SharePoint APIs in Microsoft Graph. For example, to view the folder path in which a file is created, you can use parentReference.path, where parentReference is from BaseItem resource properties and path is from the itemReference resource properties.