web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trouble Sending Email ...
Power Automate
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!  

 

 

Categories:
I have the same question (0)
  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    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.

  • Gaia Profile Picture
    25 on at

    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

  • Verified answer
    tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    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

    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,185 Most Valuable Professional on at

    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

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

     

    Thank you!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard