web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / use power automate to ...
Power Automate
Unanswered

use power automate to find last modified date of various files on sharepoint.

(0) ShareShare
ReportReport
Posted on by 171
-
 
On a sharepoint site, i have two columns called location_link and last_updated. In the location_link column, there are urls to documents stored in various locations in the sharepoint. I am using power automate to go through each link and find the last modified date. I want the flow to then update the last_updated field with the modified date. I'm using a scheduled flow. Then I use an apply to each activity. In the activity, I have a Compose activity with the following expression: 
split(replace(triggerOutputs()?['body/Location_Link']?['Url'], 'https://de.sharepoint.com', ''), '?')[0]
 
Then I use a Get Properties activity, Get file metadata, and Update Item activities however, the flow doesn't make it that far and fails right after the Compose activity because it's sending Null values to Get Properties. 
 
Am I going about this all wrong? Is there another method that would serve better?
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,963 Moderator on at
     
    Please share your flow. Share your errors, show your configuration.
    Specifically show the flow run, so we can see what failed and why.
     
    not enough information to guess why you have null errors.
     
    You also explain it as if you want to update the first table you talk about with the Modified Date of the Last update.
     
    But if each row in Table A, has 1-Many files to look at, which specific one are you wanting to us the modified date from to update the Last Udated column in the list?
     
    Its a bit confusing what you are try to do and how, based on what you explained.
     
    Please share some pictures and do a walk through of steps would help.
     
  • narayan225 Profile Picture
    2,547 Moderator on at
     
    Instead of storing the file link, you should store the site address and the path.
     
    Using those together with get file metadata using path action, you can get the modified date.
     
    Hope this helps.
    Cheers!
  • Sofiyan Profile Picture
    171 on at
    Hey @narayan225
    The trouble with using the file path is my userbase. They are not techsavy enough to find the location path. It's easier for them to copy and paste the link.
     
    However, for testing purposes, I tried your method. See the screenshot below. The error suggests that no files exist. I can confirm the file does exist. 

     
    In my original post, I shared the expression I used in Compose to extract out the path from the URL. My preference would be to use this method for the concern with the userbase described above. However, using that method hasn't worked either. What could you suggest?

    Thank you.
  • Sofiyan Profile Picture
    171 on at
    hey @Michael E. Gernaey, here are the workflow and comments:
     
     
     
     
    Error:
     
     
     
    About your comments "You also explain it as if you want to update the first table you talk about with the Modified Date of the Last update.
     
    But if each row in Table A, has 1-Many files to look at, which specific one are you wanting to us the modified date from to update the Last Udated column in the list"
     
    My response: You are misunderstanding. The sharepoint list has two columns. One with the Link and the other a date field called Last_Updated. I want the power automate to run each row in the list, find the file location using the provided link and retrieve the Modified Date. Then, I want the flow to update the Last_Updated field with the modified date. 
  • narayan225 Profile Picture
    2,547 Moderator on at
     
    You are getting the error when using the file path because you have not replaced the %2b and %252f with / and space.
     
    Use this formula in there and get file metadata using path should work fine.
    replace(replace(outputfromCompose,'%252f','/'),'%2b',' ')
    Hope this helps.
    Cheers!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 816

#2
Valantis Profile Picture

Valantis 603

#3
Haque Profile Picture

Haque 566

Last 30 days Overall leaderboard