cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
misssp
Level: Powered On

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 Team
Community Support Team

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 Team
Community Support Team

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
Level: Powered On

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 Team
Community Support Team

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
Level: Powered On

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 Team
Community Support Team

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
Level: Powered On

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

Yes, it worked.  Thank you.  

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 319 members 5,977 guests
Please welcome our newest community members: