@ilona12345 The issue with your flow is the logic here. You should only have two Apply To Each actions.
- One to loop through each email returned
- One to loop through each attachment

You currently have three for each (aka Apply to Each loops). I'm going to assume it's because Power Automate has automatically added one of those loops for you.
Return Email Count
I would recommend adding a Compose action to output the number of Emails returned. This way you can stop your flow from continuing to run if no email are returned from the Get Emails (V3) Action.
Insert a Compose action. Add an Expression. Use the length() function.

Select the Dynamic content tab and insert the value dynamic content from the Get Emails (V3) action into the length() function.

Run a test. Review the outputs.

Condition Check
Add a Condition action to your flow. If emails have returned (aka there is number stored in the Compose action—that is not equal to 0), add the rest of your actions to the Yes branch. If not, do nothing.

Since you are resending a follow up email... have you considered using the Reply to email (V3) action instead?

To better understand the Apply to Each action — check out this YT Tutorial:
3 Mistakes YOU 🫵 are Making with the Apply to Each Action in your Microsoft Power Automate Flow
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!
If I helped you solve your problem—please mark my post as a solution
✅.
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