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

Send an email based on sharepoint library metadata = todays date

Hi everyone,

 

I am tearing my hair out trying to get this flow to work.

 

I have a SharePoint Library and in that library is a calculated column called 'Alert Date'. That column contains a date and when that date equals todays date it needs to send an email to 'Alert To' (another column in the library) to notify them that the document in question is close to expiry. The flow should also run everyday at 6:00am automatically.

 

Thing is the codition keeps returning a false value which i know is incorrect becuase i have a test document in the library that has an 'Alert Date' value of todays exact date!

 

The snippet of the flow is below.

 

Compose value = formatDateTime(utcNow(),'dd-MM-yyyy')

 

Can anyone tell me where i have gone wrong?

 

Flow.JPG

5 REPLIES 5
Community Support Team
Community Support Team

Re: Send an email based on sharepoint library metadata = todays date

Hi @Kathryn_S,

 

I noticed that you set the time zone, it may be because the time zone set on the SharePoint library is inconsistent with the time zone you set in the Flow, so the time does not match, which is the first reason that Flow does not have the expected result.

In addition, Alert Date also needs to format it into the same format on the right side using formatDateTime(), because its format here is different from that on SharePoint.

You could make the following adjustments to Flow.

Formula reference:

formatDateTime(items('Apply_to_each')['Alert_x0020_Date'], 'dd-MM-yyyy')
is equal to utcNow('dd-MM-yyyy')

Image reference:

56.PNG57.PNG

Please take a try and let me know if issue still exist.

 

Best Regards,

Barry

 

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

Re: Send an email based on sharepoint library metadata = todays date

Hi @v-bacao-msft

 

Thanks for your reply, unfortunately your suggested have not fixed my issue (if i did them right).

I removed the timezone and start time in favour of the 'At These Hours' field.

Removed the 'Compose' action inbetween Recurrence and Get File (Properties Only)

Updated the conditions to the expression you gave.

The condition still returned a false value and as a result i didnt recieve an email.

KaFlow2-page-001.jpgFlowFlow2-page-002.jpgLibrary

Community Support Team
Community Support Team

Re: Send an email based on sharepoint library metadata = todays date

Hi @Kathryn_S,

 

Are you sure that your library has an Alert Date equal to today's file?

Can you provide a full screenshot of your Flow configuration?

Yyou could add two Compose, output the specific time of Alert Date and utcNow respectively, you can see if they are equal, if all are unequal, then it proves that there is no file’s Alert date in your library equal to today's date.

Like:

58.PNG59.PNG

 

Barry

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

Re: Send an email based on sharepoint library metadata = todays date

Hi @v-bacao-msft

 

I think you found it!

In the first picture the Alert Date returns a value of 19/12/2018 but in the actual library, second picture, the date displayed is the 20/12/18. Im not sure how to fix it?

 

The 'Alert Date' column is a calculated column based on another column 'Next Verification Due Date' - 42 days.

 

Capture.JPGFlow2-page-002.jpgLibraryAlert Date.JPGNext Ver.JPG

Community Support Team
Community Support Team

Re: Send an email based on sharepoint library metadata = todays date

Hi @Kathryn_S,

 

As I mentioned at the outset, this may be related to the time zone setting, because Recurrence and even Flow use UTC time.

If Recurrence does not set the time zone, then it defaults to (UTC) Coordinated Universal Time, so you could try setting the Time Zone in Recurrence (just like you originally set, set Time Zone to the UTC where you are).

Please take a try and let me know if issue still exist.

 

Best Regards,

Barry

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.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 225 members 4,705 guests
Please welcome our newest community members: