How to Fix Power Automate Get Changes InvalidTemplate Errors
Question details
The user needs to fix an InvalidTemplate error in Power Automate when using the Get changes action, often caused by the int function receiving a blank value.

- Product
- Power Automate
- Device & OS
- not provided
- Scenario
- Automating a SharePoint workflow using the 'Get changes for an item or a file' action to trigger conditional email notifications when a specific column is modified.
- Observed behavior
- The flow fails with an InvalidTemplate error stating the 'int' function received an invalid value, or the flow completes successfully but fails to send the expected email because the condition is misconfigured.
Verify that you have appropriate site permissions in SharePoint to access the target list, and confirm that the columns you want to track actually exist in the list.
Configure the SharePoint Trigger and Get Changes Action Correctly
Resolve the InvalidTemplate error by passing the dynamic ID directly without the int() function and accurately setting up the condition for column changes.
The InvalidTemplate error typically occurs when a flow attempts to use the int() expression on a null or blank ID value. Passing the dynamic ID directly resolves this issue and ensures the Get Changes action functions appropriately.
In your Power Automate flow, add the SharePoint trigger 'When an item or a file is modified'. Configure it by selecting the correct Site Address and List Name.
Insert the 'Get changes for an item or a file (properties only)' action. In the 'Id' field, select the dynamic content 'ID' from the trigger. Do not wrap this value in an int() function.
Populate the 'Since' and 'Until' fields using the dynamic tokens provided by the trigger, such as 'Trigger Window Start Token' and 'Trigger Window End Token'.
Add a 'Condition' control below the Get Changes action. In the condition rule, select the dynamic content 'Has Column Changed: [Your Column Name]' and set it to 'is equal to' true.
Inside the 'If yes' branch of your condition, add the 'Send an email (V2)' action so that the email is only dispatched when the specific column modification is verified.

Enhance Your Productivity with WPS Office
While troubleshooting automated workflows and SharePoint lists, you might also need a reliable office suite to manage exported data and reports. WPS Office provides a lightweight, highly compatible, and free alternative to Microsoft Office.

Frequently Asked Questions
Why does my Power Automate flow run successfully but not send an email?
This usually indicates that the logic condition evaluating the changes is not being met. Check your 'Condition' control to ensure you are specifically testing 'Has Column Changed' against a 'true' boolean value, and ensure the email action is correctly placed in the 'If yes' branch.
What does the InvalidTemplate error mean when using Get changes?
The InvalidTemplate error means that a function in your flow received an unsupported parameter type. For example, if you use the int() function on an ID that turns out to be blank or null, the flow cannot process the template and will fail.
How can I trigger an action only when a specific SharePoint column changes?
You need to use the 'When an item or a file is modified' trigger paired with the 'Get changes for an item or a file (properties only)' action. This unlocks dynamic boolean fields like 'Has Column Changed: [Column Name]', which you can check using a Condition control before executing further actions.




