In this tutorial, I will show you how to fix the error”Unable to process template language expressions in action ‘Compose’ inputs at line ‘0’ and column ‘0’: ‘The template language function ‘addDays’ expects its second parameter to be an integer. The provided value is of type ‘Float’.
Unable to process template language expressions in action inputs at line ‘0’ and column ‘0’ in Power Automate
Recently, I was working on a requirement to update a SharePoint list date and time column in Power Automate. Here, I have a few columns:
- TravelStartDate – Datetime column
- TravelDurationDays – Number column
- TravelEndDate – Datetime column
We are required to add TravelDurationDays to the TravelStartDate and then update the TravelEndDate.
Example:
Suppose a user wants to add 5 days to the travel start date (02-11-2023); we need to calculate and update TravelEndDate as 07-11-2023.
So, I wrote the below formula in the compose action.
formatDateTime(addDays(triggerOutputs()?['body/StartDate'],triggerOutputs()?['body/DurationDays']),'dd-MM-yyyy')But when I ran the flow, it gave me an error like the screenshot below.

Solution: the template language function ‘addDays’ expects its second parameter to be an integer. The provided value is of type ‘Float’.
The error was coming because the TravelDurationDays parameter values were taken as a type of ‘Float’. The adddays() function expects ‘TravelDurationDays’ should have to be in the form of an integer.
formatDateTime(addDays(triggerOutputs()?['body/StartDate'],triggerOutputs()?['body/DurationDays']),'dd-MM-yyyy')
How to Fix:-
To fix the error, you need to convert the provided value from a type of ‘Float’ to an integer. For that, I have used the ‘int()’ function along with the adddays() function in formatting date and time values.
Now, values provided in ‘TravelDurationDays’ will be converted into integer values, and it will add days to the ‘TravelStartDate’.
formatDateTime(addDays(triggerOutputs()?['body/StartDate'],int(triggerOutputs()?['body/DurationDays'])),'dd-MM-yyyy')
After editing the expression, run the flow. Then, the flow will run successfully without any errors.

Now, the value will get updated in the SharePoint list, as shown below.


Conclusion
This is how to fix the error “unable to process template language expressions in action inputs at line ‘0’ and column ‘0’” or “The template language function ‘addDays’ expects its second parameter to be an integer. The provided value is of type ‘Float” that comes in Power Automate.
You may like the following tutorials:
- Power Automate send an email (v2)
- Update SharePoint Choice Column in Power Automate
- the ‘inputs parameters’ of workflow operation ‘Send_an_email_(V2)’ of type ‘openapiconnection’ is not valid

Preeti Sahu is an expert in Power Apps and has over six years of experience working with SharePoint Online and the Power Platform. She is the co-author of Microsoft Power Platform: A Deep Dive book. As a Power Platform developer, she has worked on developing various tools using Power Apps and Power Automate. She also makes Microsoft 365 videos and shares them on YouTube.