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 / Flow Sending Duplicate...
Power Automate
Answered

Flow Sending Duplicate Emails

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I have a flow that sends emails to the list item owners to ask them to review the item on a certain date.

Each owner is getting the same email 4 times.

 

How do I avoid this so the user gets one email per list item?

 

Nmaher_0-1657097100870.pngNmaher_1-1657097125173.png

 

Categories:
I have the same question (0)
  • mjburley Profile Picture
    370 on at

    What is the length of the Get files array returned - throw into a compose something like:

    length(Get_files_properties_only)
    I assume it's only one (or use first() to get back the first if there 'should' only be one.
     
    Only other possibility is the send email action has cc / bcc populated as well?
  • Community Power Platform Member Profile Picture
    on at

    Thanks,

     

    How can I get the length without running the flow again? One user got 500 emails so I dont want to run it and trigger all of those again.

     

    There is a CC in the email but its a different user to the "Document Owner" that is in the "To" field. (Document Owner Manager)

  • mjburley Profile Picture
    370 on at

    When you're building Flows use the Terminate action to break the flow before sending emails.

     

    So do a compose with length after the get rows, and then add a terminate action.

  • Community Power Platform Member Profile Picture
    on at

    Thanks,

     

    I ran a compose : 

    length(outputs('Get_files_(properties_only)')?['body/value'])

     

    And I got 187 results

     

    Nmaher_0-1657105776397.png

     

  • mjburley Profile Picture
    370 on at

    Ah.

     

    Best is to cut the send email action to the end of the flow (outside of the apply to each) and precede by a Terminate action to save it but not use it, whilst you debug.

     

    Then you can just run the flow and see how many times the apply to run runs. Or set up a integer variable and do an increment each time, but the flow run will let you see how many times it runs and what the content is.

  • Community Power Platform Member Profile Picture
    on at

    Thanks,

     

    I have tried to separate the email section and it reverts and auto applies the "Apply for each".

     

    Is there a way around this?

     

    Thanks,

    Niamh

  • v-yujincui-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    Maybe you could try to optimize your Flow structure.

    1. Try to use the Odata Filter.

    2. Get unique value of owner email address using array variable and union function.

     

    I have made a simple test for your reference.

    1. Here is my list.

    vyujincuimsft_0-1657263808600.png

    2. Here is my flow.

    internalcolumnname ne '@{null}'
    items('Apply_to_each')?['personcolumn/Email']
    union(variables('OwnerEmailAddresses'),variables('OwnerEmailAddresses'))
    item()?['field name']

    vyujincuimsft_1-1657265685113.png

    vyujincuimsft_2-1657265893668.png

    vyujincuimsft_3-1657266207062.png

    vyujincuimsft_4-1657266241212.png

    Result Screenshot:

    vyujincuimsft_5-1657266454288.png

    In addition, here is a link that might help you:

    https://www.enjoysharepoint.com/power-automate-sharepoint-get-items-filter-query/

     

     

    Best Regards,
    Charlie Choi

  • Verified answer
    v-yujincui-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    UPDATE:

    Sorry for my misunderstanding. Maybe you just need to remove the Apply to each 2 and replace the corresponding Dynamic content with expressions.

    vyujincuimsft_0-1657690266530.png

    items('Apply_to_each')?['Owner/Email']
    items('Apply_to_each')?['{Name}']
    items('Apply_to_each')?['FieldName']
    vyujincuimsft_2-1657691315846.png

     

     

    Best Regards,
    Charlie Choi

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard