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 / Blank email attachment...
Power Automate
Unanswered

Blank email attachments, correct name and file type, no content

(0) ShareShare
ReportReport
Posted on by 38

I'm having trouble with a flow that is designed to get all emails with attachments from 5 days ago with the subject "Action Required" from my sent folder and resend a follow up email with the same attachment to the same recipient. The flow works, but the attachment in the follow up email is coming up blank. I've put the dynamic content for "Attachment name" and "Attachment content" in the correct fields, but while the follow up email attachment has the correct name and type of file, the content is not visible.

Screenshot 2024-05-15 132835.png
Screenshot 2024-05-15 132920.png
Categories:
  • creativeopinion Profile Picture
    10,508 Moderator on at

    @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

    creativeopinion_0-1715825654890.png

     

    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.

     

    creativeopinion_1-1715825688242.png

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

     

    creativeopinion_2-1715825698523.png

     

    Run a test. Review the outputs.

    creativeopinion_3-1715825767606.png

     

     

    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.

    creativeopinion_4-1715825795858.png

     

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

    creativeopinion_5-1715826151843.png

     

     

    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
  • IF-06091959-0 Profile Picture
    38 on at

    That worked! Thank you

  • IF-06091959-0 Profile Picture
    38 on at

    It's now giving me this error, but isn't this the solution I just did?

    ilona12345_0-1716232890458.png

     

  • creativeopinion Profile Picture
    10,508 Moderator on at

    @ilona12345 Can you share a screenshot of your flow? From how the error reads it looks like the Body dynamic content is null or empty. 

  • IF-06091959-0 Profile Picture
    38 on at

    ilona12345_0-1716297450680.pngilona12345_1-1716297464963.pngilona12345_2-1716297485030.pngilona12345_3-1716297498732.pngilona12345_4-1716297513132.png

     

  • IF-06091959-0 Profile Picture
    38 on at

    ilona12345_5-1716297609176.png

     

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
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 349 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard