cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
misssp Helper I
Helper I

Flow to send email when 'Modified' date exceeded criteria

Hi, I searched the forum but my flow can't pass the date condition. Help is appreciated.

I need flow to:

1. move files that are older than 14 days based on Sharepoint default 'Modified' field from document library 1 to document library 2 . (copy file and delete file)

2. send links of the document in document library 2.

 

Problem:

1. copy/delete file - no issue. cannot get date condition to work.  flow copies all files.

2. can't find the links in document library 2.

 

Help is appreciated.

 

3 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support
Community Support

Re: Flow to send email when 'Modified' date exceeded criteria

Hi @misssp ,

 

You could refer to the following method to configure Flow.

 

formatDateTime(item()['Modified'],'yyyy-MM-dd')

is less than

addDays(utcNow(),-14,'yyyy-MM-dd')
  • Use Copy file action to move the file to the specified folder and use Get file properties action to get the link to the file in the target folder.
  • Finally configure the Send an email action.

 

Image reference:

40.PNG

41.PNG

If you want to send the links of all eligible files in an email, please refer to the following method:

  • Use variables to consolidate all the links together and send them in email. Note that we need to add a carriage return in the Value field of the Append to string variable action.

 

Image reference:

42.PNG43.PNG

 

Hope it helps.

 

Best Regards,

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

View solution in original post

Community Support
Community Support

Re: Flow to send email when 'Modified' date exceeded criteria

Hi @misssp ,

 

Your method is correct. The configuration inside Condition is similar to the previous post.

The Id configured in Update file properties can be output using ID of Get files action.

It is worth noting that you need to use true/false when judging the value of Reviewed field, which corresponds to Yes/No.

Please take a try.

 

Best Regards,

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

View solution in original post

misssp Helper I
Helper I

Re: Flow to send email when 'Modified' date exceeded criteria

Yes, it worked.  Thank you.  

View solution in original post

4 REPLIES 4
Community Support
Community Support

Re: Flow to send email when 'Modified' date exceeded criteria

Hi @misssp ,

 

You could refer to the following method to configure Flow.

 

formatDateTime(item()['Modified'],'yyyy-MM-dd')

is less than

addDays(utcNow(),-14,'yyyy-MM-dd')
  • Use Copy file action to move the file to the specified folder and use Get file properties action to get the link to the file in the target folder.
  • Finally configure the Send an email action.

 

Image reference:

40.PNG

41.PNG

If you want to send the links of all eligible files in an email, please refer to the following method:

  • Use variables to consolidate all the links together and send them in email. Note that we need to add a carriage return in the Value field of the Append to string variable action.

 

Image reference:

42.PNG43.PNG

 

Hope it helps.

 

Best Regards,

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

View solution in original post

misssp Helper I
Helper I

Re: Flow to send email when 'Modified' date exceeded criteria

Thanks.. it worked.

 

I need to filter out files that are 60 days old with Reviewed column type   - Yes (Yes/No check box) and reset these files from 'Reviewed - Yes' to 'Reviewed - No'.

I created a new flow -

Get files(properties only) - Filter Query using Reviewed eq 'Yes'

Apply to each - Condition -  Modified is less than - addDays(utcNow(), -60, 'yyy-MM-dd')

If yes, Update file properties Action - I use ID for Id (ID shows 'List item id under Get files(properties only)

 

This is filtering out files 'Reviewed - Yes' in the  Get files(properties only) Action...

Any ideas?  

Community Support
Community Support

Re: Flow to send email when 'Modified' date exceeded criteria

Hi @misssp ,

 

Your method is correct. The configuration inside Condition is similar to the previous post.

The Id configured in Update file properties can be output using ID of Get files action.

It is worth noting that you need to use true/false when judging the value of Reviewed field, which corresponds to Yes/No.

Please take a try.

 

Best Regards,

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

View solution in original post

misssp Helper I
Helper I

Re: Flow to send email when 'Modified' date exceeded criteria

Yes, it worked.  Thank you.  

View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (5,433)