AutomateAlong

Error messages › Expressions

Text can't be turned into a number

Seen when a run fails · Updated 8 November 2026

The message

The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.

What it means

int() only accepts a whole number written as digits. A blank, a decimal (12.5), a currency symbol (£12) or a thousands separator (1,200) all fail.

How to fix it

  1. Look at the run's inputs to see the actual text that arrived.
  2. Clean it first: int(trim(replace(replace(<value>, '£', ''), ',', ''))).
  3. For decimals use float() instead of int().
  4. Guard against blanks: if(empty(<value>), 0, int(<value>)).

Not quite your message? Paste the whole thing into the Flow Doctor. It reads the step, property and expression out of your exact wording and, for the stubborn ones, the AI reads the flow it happened in.

How to find the full error in Power Automate

  1. Open the flow and look at 28-day run history.
  2. Select the failed run (red cross), then the step with the red cross.
  3. The error is in that step's box; some are under Show raw outputs. Copy the whole thing, including the code at the start.

Other Expressions errors

AutomateAlong is independent and isn't affiliated with Microsoft. Microsoft and Power Automate are trademarks of the Microsoft group of companies.