Hi there, I'm looking for help in a flow which is checking a spreadsheet for a date, if it finds a date it should then send an email.
I have 3 compose actions as follows but I keep erroring out in compose 2.
Compose 2 - addDays('1899-12-30',int(outputs('Compose')),'dd-MM-yyyy')
Grateful for any help
Solved! Go to Solution.
Hi @beanybone
Your compose 2 expression looks good to me.
Please have a look at my video.
Check your run history and check the first compose output what it's returned.
Is your Excel column is formatted to Date type?
Power Automate - Dealing Excel Date in Power Automate - YouTube
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHello @beanybone ,
it would be helpful if you shared the error message you get.
I don't understand what you're trying to achieve in the 'Compose 2' action, addDay() expression expects parameters (date, number of days to add, format). It seems you're giving it parameters (date, date converted to int?, format), I'm not sure if conversion from date to int will work.
Hi @tom_riha thanks for reaching out!
So this is the error. Unable to process template language expressions in action 'Compose_2' inputs at line '1' and column '15338': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.
Essentially what I'm trying to achieve is a flow that looks at a date in an excel file, if its today then send an email
Previously community support set me up with the compose wording this way
Hi @beanybone
Your compose 2 expression looks good to me.
Please have a look at my video.
Check your run history and check the first compose output what it's returned.
Is your Excel column is formatted to Date type?
Power Automate - Dealing Excel Date in Power Automate - YouTube
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogThat's the problem I mentioned, you can't convert date into an integer.
You don't need the addDays() expression at all, you just need to convert the date from the Excel file into the same format ('dd-MM-yyyy') for the comparison. You'll do that in a similar way you're using in the 3rd Compose action.
formatDateTime(<Date of Visitor>,'dd-MM-yyyy')
hi @tom_riha cant get this to work but solved the issue with my original wording, just noticed the date wasn't pulling in in the first compose so rebuilt and now working thanks for your help!
I just tried it and it didn't work for me either 🙂 The addDays() expression is the right way to process dates from Excel.
User | Count |
---|---|
89 | |
41 | |
22 | |
20 | |
16 |
User | Count |
---|---|
138 | |
56 | |
47 | |
36 | |
26 |