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

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

6 REPLIES 6
v-bacao-msft
Community Support
Community Support

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.

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.

KaFlowFlowLibraryLibrary

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.

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.JPGLibraryLibraryAlert Date.JPGNext Ver.JPG

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.

Hello @v-bacao-msft 

 

I have tried to replicate your workflow as this is something I am trying to do where I have a calculated column modified+365 to give me a Review Date 

in my library is the Review Date column and then trigger a flow if that date is equal to today, but I've received this error message Date Flow.JPG

 

This is how I have configured my flow

 

Retention WF.JPG

 

Are you able to advise where I am going wrong.

 

Thank you

 

Claire Allen 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,228)