cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
markmcclure
Regular Visitor

SharePoint flow for folders created/modified for the last week

I'm trying to build a flow to send a email once a week that will show all updates that have taken place in a certain file. However when I put in a filter array, it doesn't filter out any results. Please see my formula below, and the screenshot of my flow.

 

@greaterOrEquals(formatDateTime(item()?['Modified'], 'MM/dd/yyyy'), formatDateTime(addDays(utcNow(), -7), 'MM/dd/yyyy'))

 

5 REPLIES 5
markmcclure
Regular Visitor

Capture.PNG

Brad_Groux
Community Champion
Community Champion

You likely have a formatting or syntax issue, your array logic looks fine - I have one with the following that works perfectly:

@greaterOrEquals(formatDateTime(item()?['EndDate'], 'yyyy-MM-dd'), formatDateTime(utcNow(), 'yyyy-MM-dd'))

If you could provide an expanded screenshot of your Flow and steps, and of any detailed error messages you're receiving we could likely better assist you.

You may want to also review @Pieter_Veenstra's blog posts, Microsoft Flow – Filter data in an array and Shed some light on arrays or collections in Microsoft Flow

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Thanks @Brad_Groux , see reply above yours for the screen shot. 


Hi @markmcclure ,

It seems you want to monitor a speific file when it was updated.

For example, when the file was updated three times last week, you want get all the three version of the file.

I am afraid you can't get all the update via one flow.

In one flow, you can only get the newest version of the file, there is no way to record each version of the file.

As the pic shown, you use the trigger 'when a file is created or modified', the data source is not an array, so you can't use the 'Filter arrray' here.

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-zhos-msft Thanks. I'm not looking for 3 different versions of the file, but rather just a log of files modified or added for the week. The only data I need is File Name, Created/Modified Date and User Name. Any idea how to accomplish this with a flow? Would it be possible to create two flows, one that logs each change as it comes in to a list, and then a flow to email out that list once a week?

 

Currently we have SharePoint alerts set up on the file, which work, however the formatting of the alert email is hard to read. Trying to make it now in more of a CSV/HTML table format so it's easier to decipher, thus why I'm trying to create a flow. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,832)