Table of contents
What are Triggered Actions?
Triggered Actions allow configuring actions that are applied to a list or library when an event occurs (add, update or add/update) and some condition evaluates to 'true'. Triggered Actions is a SharePoint Online exclusive feature.
- Execute actions on trigger: Item Added, Item Updated, Item Added & Updated
- e.g. send email notifications or update items when some event occurs
- Serial execution of multiple actions
- Define execution condition on each action
- Use FieldName.isChanged placeholder to execute Triggered Action only if field value is changed
Triggered Actions can be found on the 'Things in Background' tab. Configure like a rule to plan automated executions with actions from a set of powerful action types.
Triggered Actions feature works only when item versioning is enabled.
Clicking the 'Add Triggered Action' button leads to opening the Triggered Action wizard.
The first step you'll see is the Details step
Note: Triggered Actions are created for the current list
Proceeding to the next wizard step Triggers, you can configure item event trigger of the action.
- Item Added - actions will be executed if item is added to the list or document file is uploaded to the library
- Item Updated - actions will be executed if item updated and version of item or file is increased.
- Item Added & Updated - actions will be executed if item/file is added as well if item is updated and version is increased.
Note: Triggered Actions will be executed as many times as many updates were made on the item
The next step Actions lets you configure actions. Clicking 'Configure Actions' button will open Action Builder.
Clicking 'Finish' button on the Overview step will create Triggered Action.
In the History tab you can see execution history of the Scheduled Action. 'Export history' button allows you to send history to .txt file.
By default, all Background Features executions: Aggregation, Metadata Inheritance, Calculated Expressions, Scheduled Actions, and Triggered Actions - don't activate triggered action execution.
In this case there is an option ‘Execute triggered actions’ which allows execution of triggered actions by current calculated value configuration.
Note: This option is visible on UI only if versioning is enabled.
The best practice is to use it together with a condition on field change in triggered action configuration. It allows to reduce unneeded executions.
For this we implemented the [[FieldName.isChanged]] placeholders for each field that return true/false value.
Background features loop handling
Complex background features configurations have many risks of creating loops, especially when ‘Execute triggered actions’ option is enabled for some calculated values.
To foresee this, we implemented a loop detection functionality that is executed whenever the background feature configuration is saved. You are prevented from saving such a configuration, but we are providing information about the loop source.
In most cases it can be resolved by one of the following actions:
- Disabling 'Execute triggered actions' option for calculated value (only when versioning is enabled)
- Changing lists/columns for calculated value configurations
- Changing trigger type and/or actions for the triggered actions
When the configuration is changed and there is no loop threat anymore, the configuration can be saved.
Triggered Actions on deployment
For the case if Triggered Action throwing an error continuously (i.e. list is deleted), Triggered Action will be deactivated. In this case you need to click on 'Reactivate execution' button in Deployment Maintenance tab for selected deployment in order to reactivate Triggered Action.
In order to open History logs you need to click on your Triggered Action (i.e. create onboarding tasks).