Hi,
I have problem with obtaining creation date of files on my OneDrive with OneDrive connector in Flow. GetFileMetadata returns BlobMetadata object which contains a lot of file properties (e.g. LastModified), but whenCreated attribute (or similar) is missing there. Please let me know if it is possible to get file creation date using OneDrive connector (or in other way).
https://docs.microsoft.com/pl-pl/connectors/onedriveconnector/#blobmetadata
Thanks 🙂
I haven't tried it, so I can't guarantee that it would work, but a couple of points to make.
1) OneDrive for Business is still a SharePoint site collection. Yes it has been customized, but tends to have the same endpoints behind the scenes. So I think using a REST call to get a list of versions will work.
2) There is a generic HTTP action in Power Automate also. Behind the scenes it does the same thing the SharePoint HTTP action does. The SharePoint one has been tailored for SharePoint and is standard instead of premium. But you can make HTTP calls in Power Automate without building a custom connector.
Having said that. I don't know that it will work, but it is one avenue of exploration. Here's the documentation on the actual REST call to get versions. https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/listitemversion_get?view=odsp-graph-online
But the biggest question is whether OneDrive actually retains the creation info or not. As I said, its built on SharePoint as a base, so I would assume its there. But it might not be retrievable. An interesting project to play with in my copious free-time while under lockdown.
Yeah, it was surprising also for me... and this limitation seems to apply also to OneDrive For Business, which is also weird. I mean if you store files in Sharepoint, Created date time related info is available
Glad to see Last Modified can be a valid workaround for your scenario
Hope this helps
Hi, thanks for help! I re-checked my case again and probably LastModified will do the job. But I'm still really surprised that such basic attribute of file is not available...
Can you elaborate a bit more the your suggestion to "use HTTP to do a REST call to get the first version of the file and use the modified attribute from that as the created data"? You mean deploying a custom connector to onedrive? AS far as I remember there is a "Send HTTP request to Sharepoint" but there is no "Send HTTP request to OneDrive" yet
Thanx!
I was surprised to find that if you go look at the files in OneDrive for Business itself, the Created and Created By fields are not included in the properties for the file. I think this is a deeper problem than the connector. I think OneDrive doesn't actually maintain the Creation attributes because the assumption is that the owner of the OneDrive created the file. The only way I can think of to get around this would be to use HTTP to do a REST call to get the first version of the file and use the modified attribute from that as the created data.
Hi!
I assume that the files in your OneDrive folder are modified after you created them within your OneDrive folder, right? If not, you can relay on 'last modified time'.
I mean, according to this post from april 2018the creation date time could not be accesed via Power Automate, only last modified date time..
https://powerusers.microsoft.com/t5/Using-Flows/Delete-files-from-folder-after-180-days/td-p/110555
If your files can be modified, I can only think of having a flow that triggers when file is created, adds a tag with the creation date, but I must confess it sounds weird as a workaround.
Let's hope somebody else can point us to a more reasonable workaround.
Hope this helps
WarrenBelz
146,653
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional