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 / Not able to get compos...
Power Automate
Unanswered

Not able to get compose condition

(0) ShareShare
ReportReport
Posted on by 4

Trying to create flow for automated birthday wishes email from Excel to power automate but condition of compose is not getting true for date format.

Condition gave as :-

Compose 1:-DOB (attach path from excel)

Compose 2:-addDays('1899-12-30',int(outputs('Compose')),'dd-MM-yyyy')

Compose 3:-formatDateTime(utcNow(),'dd-MM')

Apply Condition:- Output of compose 2 is equal to Output of compose 3.

Error at compose 2:-InvalidTemplate. Unable to process template language expressions in action 'Compose_2' inputs at line '0' and column '0': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

Error at compose 3:- ActionConditionFailed. The execution of template action 'Compose_3' is skipped: the 'runAfter' condition for action 'Compose_2' is not satisfied. Expected status values 'Succeeded' and actual value 'Failed'.

Error at Condition:- ActionConditionFailed. The execution of template action 'Condition' is skipped: the 'runAfter' condition for action 'Compose_3' is not satisfied. Expected status values 'Succeeded' and actual value 'Skipped'.

Error Details:-

Unable to process template language expressions in action 'Compose_2' inputs at line '0' and column '0': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

 Please help me out.

Categories:
I have the same question (0)
  • David_MA Profile Picture
    14,347 Super User 2026 Season 1 on at

    Your Compose 2 is invalid. You are returning a date and not an integer. Your second compose is expecting something like this:

    addDays('1899-12-30',100)

    The above returns 1900-04-09T00:00:00.0000000. Whatever compose you are using in your second compose, it needs to generate an integer.

  • RA7 Profile Picture
    4 on at

    Sorry I didn't get you point of integer could you help me with condition 

    In 2nd condition, what I have used in expression is taking integer value from compose i.e., DOB from Excel 

    which means its comparing left-hand side and right-hand side condition so can you help me with condition expression 

  • David_MA Profile Picture
    14,347 Super User 2026 Season 1 on at

    I don't understand what you are trying to accomplish, so hopefully someone else will have an idea for you. However, an integer is a whole number. If you are using the result from your Compose 1 in Compose 2, the result of Compose 1 is a date. A date is not a whole number. If DOB is not date of birth, what does DOB represent? Also, what do you mean by attaching a path from Excel in reference to Compose 1? If you are referring to a file path, that is not an integer either.

     

    If you look closely at the error message you posted, "'The template language function 'int' was invoked with a parameter that is not valid.", it is telling you what you are doing is not returning an integer ('int') when that is what it is expecting.

     

    Whatever you are trying to do in Compose 1, it needs to return an integer (1, 2, 3, 4, 5, 6, etc.) as shown in my original response where I used the number 100. I created a quick button flow with a start variable of a number to represent int(outputs('Compose') in your Compose 2 and modified my expression, so it formats it as a date as you have it in your Compose 2. Is there a purpose to using December 30, 1899, in your Compose 2?

    addDays('1899-12-30',triggerBody()['number'],'yyyy-MM-dd')

    Present the manual trigger is your Compose 1:

    David_MA_0-1673723573356.png

     

  • RA7 Profile Picture
    4 on at

    I used your suggestion in my condition, but my condition is not working well.

    Compose: - Date of Birth (DOB) from Excel sheet values we are fetching values.   

    Compose2: - addDays('1899-12-30',100,'dd-MM')

    Here 100 value I used instead of int. 

    [ addDays('1899-12-30',int(outputs('Compose')),'dd-MM-yyyy') This condition used before where I was getting error as mentioned above]

    Compose3: -  formatDateTime(utcNow(),'dd-MM'

    Condition: - Output('Compose2') is equal to Output('Compose3')

    Here its showing flow ran successfully but expected output is not getting generated.

    RA7_0-1673946803867.pngRA7_1-1673946855331.png

    Can you please help me for this...!? 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 641

#2
Vish WR Profile Picture

Vish WR 640

#3
Haque Profile Picture

Haque 495

Last 30 days Overall leaderboard