Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Trouble Sending Email After Document Approval

(0) ShareShare
ReportReport
Posted on by 25

Hello,

 

My flow is as follows:

1. For a Selected File

2. Start an Wait for an Approval - Approve/Reject (Everyone must approve)

3. Condition- Outcome contains Reject

3.1. If Yes:

3.1.1. Update file properties

3.1.2. Apply to each: Outlook Send Email (V2) - to the user created the approval request, notifying of rejection.

3.2. If No:

3.2.1. Update file properties

3.2.2. Outlook Send Email (V2) - to the user created the approval request, notifying of approval.

 

I get the following error:

Flow save failed with code "InvalidTemplate" and message "The template validation failed: 'The inputs of template action "Send_an_email_(V2)" at line '1 and column '4690' cannot reference action "Update_file_properties". Action "Update_file_properties" must either be in "runAfter" path or within a scope action on the "runAfter" path of action "Send_an_email_(V2)", or be a Trigger.'.'
 
It's worth mentioning that without step 3.2.2, the flow works fine.
 
Thanks for the help!  

 

 

  • Gaia Profile Picture
    25 on at
    Re: Trouble Sending Email After Document Approval

    OK @tom_riha, now I understand and managed to make it work.

     

    Thank you!

  • Verified answer
    tom_riha Profile Picture
    10,127 Most Valuable Professional on at
    Re: Trouble Sending Email After Document Approval

    You can use dynamic content, but it must be in the same flow path. When the flow triggers, it'll go through some path, only through some of the actions. You can use only the dynamic content that's available in that path.

    When it'll reach the condition, it'll decide if it'll go through the left path or the right path, and skip the other one.

    If it goes through the If yes path, you can use only dynamic contents from the left path (+ all actions that lead to the left path). If it goes through the If no path, you can use only dynamic contents from the right path (+ all actions that lead to the right path).

  • Gaia Profile Picture
    25 on at
    Re: Trouble Sending Email After Document Approval

    Thanks @tom_riha, I understand now.

    But that would meant there's no way of notifying the user via mail that their document has been approved/rejected? If I can't use dynamic content....

  • Verified answer
    tom_riha Profile Picture
    10,127 Most Valuable Professional on at
    Re: Trouble Sending Email After Document Approval

    Hello @Gaia ,

    you can use only outputs from actions that are in the same branch of the flow (red arrows), but you're using cross reference (orange arrows) in the 'Send an email (V2)' action. You can't do that, 'Send an email (V2)' can use only outputs from 'Update file properties 2'.

    image.png

     

  • Gaia Profile Picture
    25 on at
    Re: Trouble Sending Email After Document Approval

    Hi @tom_riha, I'm not sure I understand what you mean.

    I'm attaching a screenshot of the Yes/No flow. 

    As I mentioned the Yes side works perfectly if delete the Send an Email from the No branch.

    Screenshot 2021-07-13 111619.png

  • tom_riha Profile Picture
    10,127 Most Valuable Professional on at
    Re: Trouble Sending Email After Document Approval

    Hello @Gaia ,

    you're referencing wrong 'Update file properties' in the 'Send Email' action. Each 'Send email' can reference only the 'Update file properties' that's in its condition branch, you're probably referencing the other one in one of the notifications. Try to remove all dynamic contents in the emails and add them again.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1