SharePoint Based Triggers In MS Flow - Part Two

In the previous article, we introduced the available triggers based on SharePoint. We have also learned in detail about five trigger points. This article will focus on the next five trigger points.

Trigger - When a file is deleted

Description from MS: Triggers when a file is deleted in a library. You can optionally specify a folder to watch as well. When a folder is deleted, the trigger will fire only once for the deleted folder.

This will trigger workflow when an item is deleted from the library. We can also specify a folder if we want to keep a watch on the SharePoint document library folder and only when to trigger when a file is deleted under a specific folder.

 Document library

  • Site Address: It will list all the sites collected by our tenant; we can choose anyone.
  • Library Name: It will list down libraries based on the site selected above.
  • Folder: Select any folder within the library selected above or keep it blank to trigger workflow when any file is deleted at any level.

Trigger - When an item is created

Desc from MS: Triggers when an item is created.

Do we need any explanation here? MS Flow will trigger when an item is created in the list. It will return all list item properties that can be used in the Flow.

Item

  • Site Address: It will list all the sites collected by our tenant. We can choose anyone.
  • List Name: It will list down lists based on the site selected above.
  • Limit columns by View: This field is to select view so that we can limit the number of columns which are returned.

Trigger - When an item is created or modified

Desc from MS: Triggers when an item is created and modified as well as each time it is.

Similar to the above workflow, it also triggers when an item is modified. MS Flow will trigger when the item is created or modified in the list. It will return all list item properties that can be used in the Flow.

Trigger

  • Site Address: It will list all the sites collected by our tenant. We can choose anyone.
  • List Name: It will list down lists based on the site selected above.
  • Limit columns by the view: This field is to select view so that we can limit the number of columns that are returned.

Trigger - When an item is deleted

Desc from MS: Triggers when an item is deleted from a list.

This trigger point can be used when we want to perform an operation when an item is deleted from the list. Please note that this triggers once an item is deleted, so only a few reference properties would be available to use in the flow (screenshot added below).

Deleted

  • Site Address: It will list all the site collections in our tenant. We can choose anyone.
  • List Name: It will list down the lists based on the site selected above.
  • Properties are available to use in Flow when an item is deleted.
    Filename

Trigger - When a file is created or modified in a folder

Desc from MS: Triggers when a file is created, and also each time it is modified in a SharePoint folder.

This is similar to when a file is created - This trigger point will return the file, and it does not return file properties (library columns). We have to either select the folder or provide a relative path of the folder like below '/MyDocs/MyFolder'. Please note that we can also select just the document library in the Folder option. This way, it will be similar to the above trigger(when the file is created(properties only).

Folder

  • Site Address: It will list all the sites collected by our tenant. We can choose anyone.
  • Folder Id: Here, you can select any folder inside any document library, or you can select document library.
  • Infer Content Type: If set to yes, the content type will be retrieved by flow from the document.

It will return the below fields to use in Flow.

File content

That's it for now, as of now we have very limited options but they are very useful. One of the trigger points that I feel we should have is conditional triggering when one or more particular columns are updated. We can handle this in ms flow using conditional decision point as of now, but this will still add flow in run history).

Thanks for reading. Let me know in the comments if you feel any other trigger point on SharePoint should be available.