Uploading documents using OneDrvie
Today I had a chat with Paul Culmsee about Microsoft Flow missing triggers when uploading documents using OneDrive Sync. In this post I will try to describe our findings.
I created a document library and setup Sync.
Uploading documents using SharePoint
I then uploaded a document to this library using SharePoint and I copied some documents locally on my PC so that the Sync client would pick up these files and put them into SharePoint.
All of these files are now in my SharePoint library. Note that the Date modified date for the documents is different? Files uploaded to SharePoint have a modification date of today (19/09/2018) and the document that I copied locally and Synced to SharePoint kept their original date. This is very important!
Flows (not) triggered by my documents
Now I’m going to look at Microsoft Flow. I created the flow shown below before I uploaded the documents.
When looking at the run history in Flow I’m only finding back run history for the documents that I uploaded to SharePoint.
At first I was thinking that Flow is ignoring document and that Flow is broken here. Having had a bit more of a detailed look into this however I’m not so sure. A lot of the Flow technology depending on web hooks and one of the things webhooks does is us a last change token. This is to ensure that you only pickup changes since a certain date. More information on this can be found in SharePoint webhooks sample reference implementation.
I currently don’t really have a solution for this other than make sure that you upload document to SharePoint rather than synchronising document to SharePoint. When I do have any better solution then I will update this post.