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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / New Scheduled Flow error
Power Automate
Unanswered

New Scheduled Flow error

(0) ShareShare
ReportReport
Posted on by 509

Afternoon all

 

Thanks to @Rob Elliott and this thread.   I managed to get a scheduled flow working. I've tried to repeat this for a library and I'm getting an error. 

 

It's basically the requirement I'm trying to repeat. A document is added with an Expiry Date. If it's within 30 days and email gets shot off and the status gets changed to amber and 'Will Expire' after the 30 days an email gets fired off and the status gets changed to 'Expired'.

 

I thought it would be fairly simply, but....

 

I think it's down to the Compose Review Date Action: 

 ConditionError.png

 

The Compose Day expression is: 

formatDateTime(utcNow(),'yyyy-MM-dd')
 
Here's the Compose Expiry Date action: Compose ExpiryDate.png


If set the Condition to 'Compose' Day' is less than or equal to ' Compose Review Date'  I get hundreds of emails. If I set it to
equals I get the error below after about 7 minutes.

 

I checked the values that Compse Day and Compare Review Date were bringing back and I get:

 

Compose Day: 2020-02-10

Compre Review Date: 2020-11-06T00:00:00.0000000

 

So I guess that the problem is that I'm not getting the correct value in the Compre Review Date Value?

 

All help apprteciated


Is Equal To Error
Unable to process template language expressions in action 'Compose_ReviewDate' inputs at line '1' and column '2803': 'The template language function 'addDays' expects its first parameter to be a string that contains the time. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#adddays for usage details.'.

Categories:
  • ChristianAbata Profile Picture
    8,953 Most Valuable Professional on at

    hi @darrenfloyd666  cloud you give us the output from Compose Expiry Date?

  • Jcook Profile Picture
    7,783 Most Valuable Professional on at

    Hello @darrenfloyd666 

    I hope this POC helps you out.

     

    pic1.png

     

    pic2.png

     

    pic3.png

     

    Additionally you can have the Update Item, action to change the field to "Expired" or anything you want. Do this in the if yes shape.

     

    Regards.

     

    —Josh
    If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others

     

     

  • sutekh Profile Picture
    509 on at

    Thanks. I changed it around as your POC and I get the same results.

     

    With this condition I just get a ton of emails.

     

     FlowOutPut.png

     

    Here are some examples of the output which I get on the emails:

     

    Expiry Date:2020-11-15

    Compose Day: 2020-02-11
    Compre Review Date: 3000-12-01T00:00:00.0000000
    Compose Expiry Date: 3000-12-31

     

    Expiry Date:2020-07-15

    Compose Day: 2020-02-11
    Compre Review Date: 2020-10-15T00:00:00.0000000
    Compose Expiry Date: 2020-11-14

     

    Expiry Date:2020-11-29
    Compose Day: 2020-02-11
    Compre Review Date: 2020-04-12T00:00:00.0000000
    Compose Expiry Date: 2020-05-12

     

    Compose Expiry Date just has the Expiry Date field from the Library

     

    ExpiryDate.png

     

    Any ideas?

     

     

     




  • Jcook Profile Picture
    7,783 Most Valuable Professional on at
    Hello,
    Try changing the if condition to is equal to.

    Thanks

    —Josh
    If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others
  • sutekh Profile Picture
    509 on at

    Tried that and after four minutes I got the following error on the Compose ReviewDate:

     

    InvalidTemplate. Unable to process template language expressions in action 'Compose_ReviewDate' inputs at line '1' and column '2802': 'The template language function 'addDays' expects its first parameter to be a string that contains the time. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#adddays for usage details.'.

     

    Help!

     

    @RobElliottany ideas? 

  • Jcook Profile Picture
    7,783 Most Valuable Professional on at
    Please post the exact expression that you are using for Compose Review date.

    Thanks

    —Josh
    If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others
  • sutekh Profile Picture
    509 on at
    addDays(outputs('Compose_Expiry_Date'),-30)
  • Jcook Profile Picture
    7,783 Most Valuable Professional on at
    Please try and use the expression from the pictures I had uploaded. To get the date that is -30 days we use:

    Adddays(utcnow(),-30,’yyyy-MM-dd’)

    —Josh
    If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others
  • sutekh Profile Picture
    509 on at

    I made the change and when I set the condition to equal it runs but I don't get any alerts. Anything other condition just returns everything.

     

    This is how I've got it set up:

     FlowScheduled.png

     

    Compose Day: 

    formatDateTime(utcNow(),'yyyy-MM-dd')
     
    Compose Expiry Date:
    Expiry Date

    Compose Review Date:
    addDays(utcNow(),-30,'yyyy-MM-dd')
     
    Compose
    formatDateTime(outputs('Compose_ReviewDate'),'yyyy-MM-dd')
     
    Condition
    Compose is equal to Compose Expiry Date
     
    Where am I going wrong?
     
  • sutekh Profile Picture
    509 on at

     

     

    The Compose Expiry Date for every item is coming through as: 2020-12-06 ? 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 355

#2
11manish Profile Picture

11manish 336 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard