SharePoint Server
SharePoint trigger events
Start a workflow when a SharePoint list item or file is created, modified, deleted, renamed, approved, versioned or checked in, with field conditions, content type and folder filters.
The trigger SharePoint item or file changed starts a workflow when something happens to an item or file in a connected list or library.
Settings#
| Setting | |
|---|---|
| List or library | A connected list or library |
| Events | See the table below. New workflows default to Created and Modified |
| Only when these fields change | Conditions on the list's columns: changes, changes to, changes from, is / is not, greater or less than (numbers, dates), contains (people, lookups, multi-choice, text), is empty. All or any |
| Content type | A content type name or ID prefix |
| Folder | A folder in the list or library, subfolders included |
| Check every | How often the change log is read as a fallback: 1, 2 (default), 5, 10, 15, 30 or 60 minutes |
| Can be started by hand | Offer the workflow on the item menu (manual start); on by default |
Test with the latest event reads the most recently changed item and shows the event it makes and whether this configuration would start. Nothing runs and nothing is saved.
Events#
| Event | Fires when |
|---|---|
| Created | An item or file is added, or restored from the recycle bin (with restored from recycle bin set) |
| Modified | Fields change or a new version is saved |
| Deleted | An item is moved to the recycle bin or deleted permanently |
| Moved to the recycle bin / Deleted permanently | Only one kind of delete |
| Renamed / Moved or renamed | A file or folder's name or location changes |
| Attachment added / removed | A list item's attachments change |
| Approval status changed | Content approval moves to approved, rejected, pending, draft or scheduled |
| New version | The version label changes (versioned lists) |
| Checked in / Checked out / Major version published | Document check-in, check-out and publishing |
| Folder created | A folder is added |
A finer event always comes together with the broader one that already covered the change, which stays the primary event. A workflow on Deleted keeps starting for both kinds of delete; choose Moved to the recycle bin or Deleted permanently to react to one only.
How changes arrive#
Events arrive by push, through remote event receivers the add-in registers for the events the list's workflows need (usually within a second), and by polling SharePoint's change log as a fallback. Both feed one pipeline, so a change seen both ways starts each workflow once.
What the workflow receives#
| Variable | |
|---|---|
| event, events | The primary event, and every event of this change |
| item_id, item_url, title, file_name, folder, content_type, version | The item |
| before, after | Field values by internal name, typed (people, lookups, terms and links as objects). after is empty for deletes |
| changed_fields | The fields whose values changed |
| user | Who made the change, matched to a UserTasks member by e-mail |
| approval_status, approval_status_before, version_before | Content approval and versions |
| attachments_added, attachments_removed, previous_name, deletion | Details of the change |
One workflow per event#
Limits#
- Items the connection's account can't read are invisible to the trigger.
- An item added and deleted between two polls, with no push, fires nothing.
- Long text values are cut at 8,000 characters in before and after.