web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Reminder E-mail - utcn...
Power Automate
Unanswered

Reminder E-mail - utcnow or adddays not working

(0) ShareShare
ReportReport
Posted on by

Hi

 

I am trying to set up a flow to send a reminder e-mail whenever a specific date is coming up, I have set the flow to run on a recurrence, get list items from sharepoint and then send an email if a condition is filled. The condition, written in advanced mode, is: @equals(item()?['Next_x0020_Wipe_x0020_Due'], 'adddays(utcnow(yyyy-MM-dd),1)')

I have tried using "triggerBody" instead of "item" but that also doesn't work.

 

I have tried this today (the 28th) and the "Get Items" step comes back with:

 

Which is, what I thought, the right form to compare to the utcnow / addays

However the flow comes back saying:

 

And this is the same for all rows in that SP list.

 

Note: I have also tried not using the adddays function and setting up another column in the SP list that acts as a reminder date but this date comes through in the format MM/dd/yyyy 23:00:00, which I was having just as much trouble trying to fix.

 

If anyone has any suggestions they would be greatly appreciated.

 

Categories:
I have the same question (0)
  • Verified answer
    TravisB Profile Picture
    on at
    Re: Reminder E-mail - utcnow or adddays not working

    Hi @Anonymous

     

    Can you try changing

     

    'adddays(utcnow(yyyy-MM-dd),1)'

     

    to 

     

    adddays(utcnow('yyyy-MM-dd'),1)

     

    It looks like you might be comparing the text '2016-12-29' from the parameter with the literal text 'adddays(utcnow(yyyy-MM-dd)'.

     

    Hope that helps!

     

    -Travis

     

    EDIT:

     

    It looks like adddays' default ouput format is in the ISO 8601 format (yyyy-MM-ddThh:mm:ssZ), so even with the above change the flow will still fail.

    In order to fix the formatting, you will need to take advantage of addDays' optional third parameter which specifies the output formatting.

     

    So the total expression will be:

    adddays(utcnow('yyyy-MM-dd'),1, 'yyyy-MM-dd')

     

    which you can shorten to 

     

    adddays(utcnow(),1, 'yyyy-MM-dd')

  • Community Power Platform Member Profile Picture
    on at
    Re: Reminder E-mail - utcnow or adddays not working

    Thank you so much.

     

    Annoying that it was such a simple fix to something I've been working on for ages, but this worked perfectly.

     

    Thanks again

  • TravisB Profile Picture
    on at
    Re: Reminder E-mail - utcnow or adddays not working

    Glad I could help!

     

    I agree, debugging complex queries right now is pretty tough.

     

    We have a feature on the way that will make it easier to debug things like this by letting you output from your queries. So in this case, we could have output the left and right sides and seen visually why they weren't lining up. I'm looking forward to this feature too!

  • Bijan Profile Picture
    2 on at
    Re: Reminder E-mail - utcnow or adddays not working

    I too had a similar issue and looked in Logic Apps documentaion (link below) but this was exactly what I needed!

    Thanks for your post PIC and the solution offered by TravisB 

    https://docs.microsoft.com/en-us/rest/api/logic/actions-and-triggers#conditions

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard