Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Onedrive connector - file creation date

(0) ShareShare
ReportReport
Posted on by 4

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 🙂

  • Pstork1 Profile Picture
    65,999 Most Valuable Professional on at
    Re: Onedrive connector - file creation date

    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.

  • efialttes Profile Picture
    14,756 on at
    Re: Onedrive connector - file creation date

    @PawelN 

    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

     

  • PawelN Profile Picture
    4 on at
    Re: Onedrive connector - file creation date

    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...

  • efialttes Profile Picture
    14,756 on at
    Re: Onedrive connector - file creation date

    @Pstork1 

    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!

  • Pstork1 Profile Picture
    65,999 Most Valuable Professional on at
    Re: Onedrive connector - file creation date

    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.

  • efialttes Profile Picture
    14,756 on at
    Re: Onedrive connector - file creation date

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,653 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow