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 / Stop sending multiple ...
Power Automate
Suggested Answer

Stop sending multiple emails

(1) ShareShare
ReportReport
Posted on by 4
Hi, I'm having trouble trying to figure out why multiple emails are sent when I only want one and if i take the send email out of the for each I get an error saying I need to put the send to back into the for each.  Would appreciate any pointers. Thanks.
 
Categories:
I have the same question (0)
  • David_MA Profile Picture
    14,499 Super User 2026 Season 1 on at
    You’ll need to provide more context about what you're trying to achieve.

    Since you're using the Get files (properties only) action, which returns an array (multiple items), the subsequent actions are automatically placed inside an Apply to each loop. This loop processes each file individually.

    If your goal is to handle just one file and avoid the loop, you should use the Get file content or Get file metadata (singular) action instead. These return a single object, so the e-mail action (or any other follow-up action) won’t be wrapped in an Apply to each.
  • byte007 Profile Picture
    4 on at
    Hi David,
     
    Thank you for replying.
     
    My goal is to create a flow where when a new SharePoint page is created and email at the end of the week will show the title of the new page but don't repeat sending an email if no new pages has been created. Only send the weekly email for new pages and not repeat email if no new pages has been created.
     
     
    I hope this helps to understand the end goal.
     
    Thanks.
     
  • creativeopinion Profile Picture
    10,508 Moderator on at
    @byte007 The reason you have multiple emails being sent is the logic of your flow. You've nested the Send an Email (V2) action inside an Apply to Each action. This action will run each time you loop through an item. 

    It's hard to offer any recommendations without seeing the full logic behind your flow. Toggle off the New Designer and click each action to expand it. Upload a screenshot of your flow in edit mode.
     
    Also, it's always best practice to have the Get Items action outside the Apply to Each loop. You want to run this action once and then use a Filter Array action to filter out the item you are looking for. 
     
    You might be interested in these YT Tutorials to help you build out your flow:
     

    In this video tutorial I’ll show you 3 practical ways to use the Filter Array action and how to use it properly.
    1️⃣ Cross-Referencing Data
    2️⃣ Filtering by Key
    3️⃣ Substring Matching

    Did you know that the Condition action has a limit of 10 conditions? Although it might look like the Filter Array action can only accept one condition—this is not true. By using the advanced mode you can enter multiple conditions into a Filter Array action with an expression.

    IN THIS VIDEO:
    ✓ 3 Ways to Use the Filter Array Action
    ✓ How to use the Scope Action to Group Actions
    ✓ How to Check the Number of Items returned from a Filter Array Action
    ✓ How to Cross-Reference Data in Excel with a SharePoint List
    ✓ How the Filter Array Action Works
    ✓ How to Access the Dynamic Content from a Filter Array Action
    ✓ How to Filter Items by a Key
    ✓ How to Filter Items by Matching a Substring
    ✓ How to Use Multiple Conditions in a Filter Array Action

    ---

    In this tutorial—I’m going to show you a quicker way to get the dynamic content from your Filter Array action—and it doesn’t require writing an expression.

    IN THIS VIDEO:
    ✓ How to Loop Through Filter Array Results in Power Automate
    ✓ Using Apply to Each with Filtered Arrays
    ✓ The Easiest Way to Access Dynamic Content from Filter Array
    ✓ Fixing Nested Apply to Each Actions
    ✓ When to Use Value vs. Body Dynamic Content
    ✓ Simplifying Power Automate Flows with Filter Array
    ✓ Troubleshooting Filter Array and Apply to Each Issues

    ---

    In this video tutorial I’ll go over how to avoid these common mistakes when using the Apply to Each action in a Power Automate flow:
    1️⃣ Looping through a Single Item
    2️⃣ Creating Unnecessary Nested Loops
    3️⃣ Looping through an Unfiltered Array

    At the end of the video I share a few helpful insights when it comes to using the Apply to Each action in your flow.

    IN THIS VIDEO:
    ✓ How to avoid the Apply to Each action with a single item array
    ✓ How to use the item() function to access dynamic content in an array
    ✓ How to prevent unnecessary nested Apply to Each action loops
    ✓ How to use the Select action
    ✓ How to convert an array to a string with the Select action
    ✓ How to use the Filter Query field
    ✓ How to count the number of items in an array
    ✓ How to use a condition control
    ✓ How to use the concurrency control
    ✓ How to set a top count
    ✓ How to use Compose actions for troubleshooting
     
     
     
    Hope this helps!

    Consider giving me a ❤️ if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
     
  • Suggested answer
    David_MA Profile Picture
    14,499 Super User 2026 Season 1 on at
    You will want to set your flow up like this:
     
    I assume you already have the get files action pointing to the site pages library. Add a filter query to only get files created within the past seven days:
    This is the expression used: addDays(utcNow(),-7, 'yyyy-MM-dd')
     
    Then address the e-mail to whom it should go to. You will need to put it into HTML mode and insert the output of the Create HTML table action, and you will most likely want to add some CSS to format the table so it looks decent:
     
    Although, there is one additional thing you will want to do. You will want to add a condition after the get files action and use a length expression to see if any files were created in the past seven says. So you will want to evaluate where length is greater than 0. Then put all of the actions below the get files action inside the yes side of the condition. If no new files were created in the past seven days, the flow will just end.
     
    If you don't know how to use the length function, you can refer to this: Power Automate IF Length [With Examples]

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard