AutomateAlong

Error messages › Variables

Variable given the wrong kind of value

Seen when a run fails · Updated 8 November 2026

The message

The variable 'Total' of type 'Integer' cannot be initialized or updated with value of type 'String'.

What it means

The variable was created as one type (Integer, Float, Boolean, Array) and a Set or Append step is giving it another (usually text from a form or a column).

How to fix it

  1. Convert the value in the Set variable step: int(…) or float(…) for numbers, bool(…) for true/false.
  2. For Append to array, append one item, not a list; for a list, use union(variables('X'), …) in a Set variable.
  3. If the value really is text, change the variable's type to String in Initialize variable.

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 Variables errors

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