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 / Create files from atta...
Power Automate
Unanswered

Create files from attached emails

(0) ShareShare
ReportReport
Posted on by 30

Hi guys,

 

I have a very simple flow that consists of the followind steps:

1. When a new email arrives in a shared mailbox (V2)

2. Apply to each (Attachments)

3. Create file - it creates files from all the attachments

But the above works fine with all files and zipped files. 

However, if there is an attached email in .eml format I cannot save it. 

Would you be so kind to give a hint how to achieve that and save the attached emails?

Thanks a lot!

 

Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    @MihailZlatilov ,

    In Power Automate, attachments are classified into two types: file attachments (e.g., .txt, .zip, .png, .pdf, etc.) and item attachments. While file attachments can be retrieved by the trigger, item attachments cannot be retrieved due to a known limitation.

    You can utilize the GRAPH API for your use case

    Get attachment - Microsoft Graph v1.0 | Microsoft Learn

     

  • MihailZlatilov Profile Picture
    30 on at

    Dear Sudeep,

     

    Thank you so much for your help. I have tried already the "Get attachment" action, many times over, bu it does not recognize the attached emails as attachments, you can find an attached .png of my attempt, I have tested with 4 attachments - 2 .pdfs, 1 .zip file and 1 attached email - .eml. It recognized only 3 attachments. If I am right and this does not work, can you tell me how exactly should I use the said GRAPH API, do I get it in the Premium License PA I have?

    Thanks,

    Mihail

  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    Either try the Encodian action or use the GRAPH API.

    Not all GRAPH actions require premium license.

    SudeepGhatakNZ_4-1712184304034.png

     

     

    SudeepGhatakNZ_0-1712184152865.png

     

     

    SudeepGhatakNZ_1-1712184152681.png

     

    SudeepGhatakNZ_2-1712184152890.png

     

     

    SudeepGhatakNZ_3-1712184152880.png

     

     

  • MihailZlatilov Profile Picture
    30 on at

    Dear Sudeep,

     

    This is exactly what I want to do - use the Send an HTTP request V2 from Office 365 Groups Connectors and follow the rest of the steps, but unfortunately I am too lame to do it on my own. Could you please elaborate how you set up the URI for the action and what are the next steps to get to the final one - Create file? I will gladly accept this as a solution and give you a thumbs up afterwards! 🙂 Thanks a lot!

  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    Hi @MihailZlatilov ,

    I have attached a sample flow (see attachments section). I'll blog about it later.

    There is an HTTP connection for Outlook as well.

    SudeepGhatakNZ_0-1712306814270.png

     

  • MihailZlatilov Profile Picture
    30 on at

    Dear Sudeep,

     

    Thanks, I this is going to work, but I have tried to do it for a When a new email arrives in a shared mailbox (V2) and some how it does not work, can you alter for me the flow so that it works with shared mailbox? Thank in advance!

  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    Hi @MihailZlatilov ,

    The end point I provided is for the user's own mailbox. For shared mailbox, endpoint is different, but the logic remains the same

    https://graph.microsoft.com/v1.0/users/{sharedmailboxmailaddress}/messages.

     

     

  • MihailZlatilov Profile Picture
    30 on at

    Dear Sudeep,

     

    Yes, but the action When a new email arrives in a shared mailbox (V2) does not have an output as When a new email arrives (V3) - the body/value of the email, which is giving me an error, how do I overcome it?

    MihailZlatilov_0-1712592877457.png

    I think it should work afterwards.

     

    Bests,

    Mihail

     

  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    Are you able to add a compose action under trigger and display the value of the body/value field?

    I want to see how is it structured. Sorry, I dont have access to mailbox that I can test with

     

     

  • MihailZlatilov Profile Picture
    30 on at

    Hi Sudeep,

     

    Sure, it returns this error:

    "The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@triggerOutputs()?['body/value']' is of type 'Null'. The result must be a valid array."

    MihailZlatilov_0-1712630825984.png

    Bests,

    Mihail

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard