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 / Help Needed: - "Unabl...
Power Automate
Answered

Help Needed: - "Unable to process template language expressions" while using the int() function

(0) ShareShare
ReportReport
Posted on by 4

Hello,

I am encountering an error in Power Automate that I'm unable to resolve. The error occurs when I try to convert a survey response value (NPS score) into an integer in a Condition action.

Below is the exact error message:

 

Action 'Condition_4' failed: Unable to process template language expressions for action 'Condition_4' 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.'.

Flow Details:

Trigger: When a new response is submitted in Microsoft Forms.

Action: The survey response includes a question for NPS (Net Promoter Score), and I’m trying to use the int() function to convert it into an integer to evaluate the response.

Problem: The error indicates that the int() function is failing because the value cannot be converted to the target type (integer).

 

Steps Taken:

I have already tried using int() in the following expression:

int(triggerOutputs()?['body/NPS Question Dynamic Field'])

However, I keep getting the error "The template language function 'int' was invoked with a parameter that is not valid."

Request:

  1. Can anyone explain what could be causing this issue with the int() function?

  2. How can I ensure that the NPS value is converted to an integer properly, or should I use another approach to compare this value

Thank you in advance!

Screenshot 2026-03-12 092256.png
Categories:
I have the same question (0)
  • Verified answer
    Chriddle Profile Picture
    8,708 Super User 2026 Season 1 on at
    The `int()` function can only be used with a string that can be converted to an integer value.
    This can be checked using `isInt()`.
  • Suggested answer
    Sajeda_Sultana Profile Picture
    189 on at
     

    I ran into this same issue while building an NPS flow for one of my own automations, and what finally fixed it was treating the score as an integer inside the Condition.

    In my case, I used int(<field from dynamic content>) on the NPS response and the comparison worked fine because that field was always populated with a numeric value. For your scenario, I’d start by testing the response field with isInt(<field from dynamic content>) so you can see whether the value is really a valid number every time.

    If isInt() sometimes comes back as false (for example when the NPS question is skipped or left blank), that’s likely what’s triggering the “Unable to process template language expressions” error when you call int(). In that case, I’d handle the non‑numeric path separately—either by setting a default, skipping the calculation, or adding a branch that only runs int() when isInt() is true.

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Sajeda_Sultana

    nps_value.png

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard