SharePoint Based Triggers In Microsoft Flow - Part One
In this article, we will learn about all the SharePoint-based triggers available in MS Flow as of the published date of this article. Based on the user voice, new triggers are being added by Microsoft. This article will be mostly theoretical.
Given below is the list of all SharePoint based trigger points available in MS Flow. We will also go into detail about each trigger point and what options are available to configure.
Trigger - For a selected item
From MS: This trigger allows you to start a flow for a selected item in a SharePoint list or library. You can use the columns of the list or library as output parameters. For a file, you can use the "identifier" column to get file content.
This is basically one which will trigger a flow when an item is selected and you want the user to trigger workflow manually. We will get item context in flow to use and perform different operations. We can also take manual user input of different field types as displayed in the below screenshot.
Site Address - It will list down all the site collections in our tenant, we can choose anyone.
List Name - It will list down list and libraries based on site selected above.
Limit columns by the view - This field is to select view so that we can limit the number of columns which are returned.
Trigger - When a site has requested to join a hub site
From MS: Triggers a flow upon hub site join approval.
This workflow will be triggered when a site has made a request to join the hub site.
Site Address - URL of site which has requested to join the hub site.
Hub Site Id - Id of hub site.
Optionally, we can take user input when the workflow will be triggered.
Trigger - When a file is created (properties only)
From MS: Triggers when an item is created in a library. Returns only the properties stored in the library columns.
You can add a "Get file content" step and use the "File identifier" property returned by this action to get to the contents of the file.
When using this with the On-Premises Data Gateway, the name of the library to connect to may need to be entered manually.
This would be a very commonly-used trigger point, it would trigger when an item is created in the library. As mentioned, it will only return properties (columns) and their values. To get file content we need to use another step. We can also select a particular folder within the library and workflow will only trigger if the item is added to that particular folder.
Site Address - It will list down all the site collections in our tenant, we can choose any one.
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 created at any level.
Limit columns by the view - This field is to select view so that we can limit the number of columns which are returned.
Trigger - When a file is created in a folder
From MS: Triggers when a file is created in a SharePoint folder.
This trigger point will return file (unlink above) and it does not return file properties (library columns). We have to either select folder or provide a relative path of the folder like below '/MyDocs/MyFolder'. Please note that we can also select just document library in Folder option.
This way it will be similar to the above trigger when a file is created (properties only).
Site Address - It will list down all the site collections in our tenant, we can choose any one.
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 only return the below fields to use.
Trigger - When a file is created or modified (properties only)
From MS: Triggers when an item is created, or modified in a library. Returns only the properties stored in the library columns.
You can add a "Get file content" step and use the "File identifier" property returned by this action to get to the contents of the file.
When using this with the On-Premises Data Gateway, the name of the library to connect to may need to be entered manually.
This would be a very commonly used trigger point, it would trigger when an item is created or modified in the library. As mentioned it will only return properties (columns) and their values. To get file content we need to use another step. We can also select a particular folder within the library and workflow will only trigger if the item is added to that particular folder.
So, this concludes part 1 of this article. We will see the next 5 trigger points in this next article. Stay tuned!
Hope you enjoyed the reading, feel free to comment if you have any feedback.
P.S - This article was originally posted at this link
*This post is locked for comments