Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

Issue with Emails Marked as Having Attachments but Missing Actual Files || Power Automate Cloud

(0) ShareShare
ReportReport
Posted on by 8

Hello,

I am experiencing a recurring issue with emails processed through my application using the action "when a new mail arrives(v3)"

Issue Description:

  • I receive two consecutive emails that are supposed to be identical.
  • The first email has hasAttachments: true, but when processed, the attachments array is empty.
  • The second email also has hasAttachments: true, but in this case, the attachments are correctly included and processed.

Problem this Causes:

This creates a significant issue for my application because I rely on these emails to generate specific documents. Due to this behavior:

  1. The application detects the first email and attempts to process it, but since there are no attachments, the necessary documents are not generated.
  2. The second email arrives with valid attachments, but since the first one was already processed, the system ends up duplicating the email entry while only one actually contains the required documents.
  3. This duplication disrupts workflows and requires manual intervention.

Questions:

  • What could be causing the first email to indicate hasAttachments: true but have an empty attachments array?
  • Is there a known delay in attachment processing when fetching emails via API?
  • Is there a recommended approach to ensure the application only processes emails once, while still handling missing attachments properly?

Any guidance on this issue would be greatly appreciated, as it is affecting critical application workflows.

Thank you in advance for your help.

  • IS-04021221-0 Profile Picture
    IS-04021221-0 8 on at
    Issue with Emails Marked as Having Attachments but Missing Actual Files || Power Automate Cloud
    It looks like my images didn't upload correctly. I'll try reattaching them here.
    2025-02-05 09_50_...
    2025-02-05 09_49_...

    Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

  • IS-04021221-0 Profile Picture
    IS-04021221-0 8 on at
    Issue with Emails Marked as Having Attachments but Missing Actual Files || Power Automate Cloud

    Thanks for your reply, Mark! To clarify the issue, I'm sharing some screenshots and additional details about the flow.

    1. No filters in the trigger configuration

      • All emails are received without restrictions, meaning no emails are filtered or discarded, whether they have attachments or not.
      • Attaching the first image showing the trigger configuration.
    2. Pattern of the issue

      • When an email with attachments is received, Power Automate seems to process it in two separate steps:
        • First, the email arrives with hasAttachments: true, but the attachments array is empty.
        • Then, the same email is received again, but this time with the attachments array correctly populated.
      • This behavior causes problems because the first email is detected and processed by the flow before the attachments are available.
    3. How I am currently handling this

      • I implemented a workaround to force failure when hasAttachments = true but the attachments array is empty. This prevents incorrect execution but does not solve the root issue of duplicate emails.
      • Attaching the image showing the failed and successful runs.
    4. My main question remains:

      • Why is Power Automate receiving the same email twice—first without attachments and then with them?
      • Is there a delay in Outlook’s API processing attachments that could be causing this?
      • What would be the best way to ensure the flow only processes the version of the email that has the attachments ready?

    I would really appreciate any insights into this behavior. Thanks in advance!

     

    I've attached three images for reference:

    1. Outlook trigger configuration (no filters applied).
    2. Workaround condition (attempted fix, but not 100% effective).
    3. Run history (same subject, different IDs, first instance with empty attachments array).



    Uploaded imageUploaded imageUploaded image

  • Mark Nanneman Profile Picture
    Mark Nanneman 976 on at
    Issue with Emails Marked as Having Attachments but Missing Actual Files || Power Automate Cloud
    Do you have a filter action that filters only certain attachments?  Can you post screenshots showing how your flow is handling the attachments?

    If you check the trigger output on one of the flow runs from an email that says it has attachments but doesn't process correctly, do you see an attachments array in the output?

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard