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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Email user identified ...
Power Automate
Answered

Email user identified in file properties

(0) ShareShare
ReportReport
Posted on by 44

I am building a flow which runs weekly, getting sharepoint files and emailing policy 'owners' when the file is due review. The owner is identified as a column field for each file.

 

It worked fine when my personal email address was manually entered into the to field, correctly filtering those overdue and inserting other properties into the email body. (image 1)

 

When I add the 'owner email' into the to field however it alters my flow (image 2) and breaks it, triggering emails for every item to every owner in turn.

Any suggestions would be appreciated!

 

 

image 1.png
image 2.png
Categories:
  • Verified answer
    ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @AdamPorter 

    You shouldn't have any loops under the condition.

    If selected the Owner name under Dynamic properties while in the apply to each loop, the shouldn't be any additional loops (unless the Policy owner column allows for multiple entries).

    Can you remove the loops after the condition including the send an email action.  

    Add the send an email action back

    Select the Policy owner from Dynamic properties.

    If it adds the loops again, post a screen shots of:

    the send an email action code view

    code view for each of the loops that were created.

     

     

     

    Sel

     

     

     

     

     

  • AdamPorter Profile Picture
    44 on at

    Thanks Scott,

    The loops are added automatically when I add the owner related fields (display name or email). As you suggest, I have tried to remove the loops but get an error (Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The repetition action(s) 'For_each' referenced by 'inputs' in action 'Send_an_email_(V2)' are not defined in the template.'.'.).

    I have added the codes too as you suggest.

    2023-12-18 16_37_36-Microsoft Power Automate and 1 more page - Work - Microsoft​ Edge.png
    2023-12-18 16_38_00-Microsoft Power Automate and 1 more page - Work - Microsoft​ Edge.png
    2023-12-18 16_37_30-Microsoft Power Automate and 1 more page - Work - Microsoft​ Edge.png
  • AdamPorter Profile Picture
    44 on at

    Sorry, I just read your reply, more carefully and noted the “unless it’s set to allow multiple entries.” It was. I’ve turned this off and will have another go.

  • AdamPorter Profile Picture
    44 on at

    That worked; 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 271

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard