Variable doesn't exist
Seen when a run fails · Updated 8 November 2026
The message
Unable to process template language expressions in action 'Set_variable' inputs: 'The template language expression 'variables('Total')' cannot be evaluated because the provided workflow variable 'Total' doesn't exist.'What it means
Every variable must be created by an Initialize variable step before it's used, at the top level of the flow (not inside a loop or condition), and the name must match exactly, including capitals.
How to fix it
- Add an Initialize variable step near the top of the flow, outside any loop or condition, with that exact name.
- Check the spelling and capitals in every
variables('…')expression. - If it is initialised inside a Scope, move it out: Initialize variable only works at the top level.
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
- Open the flow and look at 28-day run history.
- Select the failed run (red cross), then the step with the red cross.
- 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.