Skip to main content

Notifications

Community site session details

Community site session details

Session Id : dGfxlKea09s0ssDxYWj7so
Power Automate - Building Flows
Unanswered

Error with addDays expression

Like (0) ShareShare
ReportReport
Posted on 28 Mar 2024 01:36:59 by 13

Hi,

 

I am building a flow that sends a reminder email two weeks and one week in advance of a date entered in my share point list. I want it to send the email only if a choice column in the list is "No". I am receiving the following error with the addDays expressions to calculate the two/one week dates from the date entered in my share point list. 

 

"Unable to process template language expressions in action 'Compose_-_two weeks reminder' inputs at line '0' and column '0': 'The template language function 'add Days' expects its first parameter to be a string that contains the time. The provided value is of type 'Null'"

 

These are the expressions I am using for each compose action:

addDays(triggerBody()?['YourDateColumn'], -14)

addDays(triggerBody()?['YourDateColumn'], -7)

 

SOOMALJ_0-1711589782238.png

 

 

Any help/support to diagnose is truly appreciated!

 

  • SOOMALJ Profile Picture
    13 on 28 Mar 2024 at 12:55:18
    Re: Error with addDays expression

    Hi @v-bofeng-msft 

     

    Thanks for your reply. I do have a value in the date column in the share point list. The format is as shown below. The error message also says  'The template language function 'add Days' expects its first parameter to be a string that contains the time.' Could it have something to do with the way the date and time is formatted in my share point list?

     

    SOOMALJ_0-1711630454114.png

     

  • v-bofeng-msft Profile Picture
    on 28 Mar 2024 at 02:03:41
    Re: Error with addDays expression

    Hi @SOOMALJ ,

     

    Based on the error message, the error occurred because the value of triggerBody()?['YourDateColumn'] is null. Please check the output of triggerBody.

     

    Best Regards,

    Bof

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 125

#2
David_MA Profile Picture

David_MA 104 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 90 Super User 2025 Season 1

Overall leaderboard
Loading started