Skip to main content

Notifications

Community site session details

Community site session details

Session Id : t4OYYqjX7fL/wxnAZQgb+4
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 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard
Loading started