Forum Discussion

nateg_k's avatar
nateg_k
Copper Contributor
Feb 20, 2025

Flow save failed with code 'InvalidTemplate' and message 'The template validation failed:

What I want to do is the trigger should initiate

 

  • When an item is created, it should automatically send out an email to the approver with options to approve or decline.
  • Scenario A (App Approval): If the manager approves/declines from the app, the status will be updated in the SharePoint list. Power Automate should detect this update and send the respective confirmation email to the requester without waiting for action from the email.
  • Scenario B (Email Approval): If the manager approves/declines from the email options, Power Automate should update the SharePoint item’s status and send the respective confirmation email.

    Workflow Steps I followed:
  • Trigger: When an item is created in the SharePoint list, initiate the flow.
  • Send Email with Options: Send an approval email to the approver with "Approve" and "Decline" options.
  • Parallel Branch Execution:
  • Branch 1 (Email Approval):
  • Wait for a response from the email.
  • If approved/declined, update the SharePoint item’s status accordingly.
  • Send a confirmation email to the requester.
  • Branch 2 (App Approval):
  • Trigger: When an item is modified in SharePoint.
  • Detect if the status has changed (approved/declined) from the app.
  • Send a confirmation email to the requester.

 

 When I applied this I am getting this error [ Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The inputs of template action 'Send_an_email_(V2)_2' at line '1 and column '7007' cannot reference action 'Update_item'. Action 'Update_item' must either be in 'runAfter' path or within a scope action on the 'runAfter' path of action 'Send_an_email_(V2)_2', or be a Trigger.'.'.]

  • Rob_Elliott's avatar
    Rob_Elliott
    Bronze Contributor

    You can't have 2 triggers in a flow.

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User.
    Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

Resources