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 / Microsoft Flow - Extra...
Power Automate
Answered

Microsoft Flow - Extract zipped email attachment on incoming email to folder on OneDrive

(1) ShareShare
ReportReport
Posted on by

Hi All,

 

I'm finding Microsoft Flow to be extremely frustrating and wondering if here is help available here!

 

I'm trying to setup a flow based on the subject line of an email so that the attachment gets unzipped to a folder on OneDrive (please see image below) as it comes in to my mail box.

 

I get an error which I do not understand.

 

My understanding is that 'On new email' task I have set it to take emails with the specified subject line, then pass that attachment to 'Extract archive folder' under 'Apply to each Attachment on email'. So now that task should extract the zipped attachment to the folder specified below.

 

2020-03-13 11_00_12-Window.jpg

 

When I test the Flow and get the error:

 

2020-03-13 11_18_12-Run History _ Power Automate.jpg

 

Thanks

 

 

 
 
Categories:
I have the same question (0)
  • fchopo Profile Picture
    8,003 Moderator on at

    Hello @Anonymous 

    Have you checked if the attachment is a zip file? Have a look at this example:

    Extract.png

    The steps are the following:

    1) We check if the email Has Attachments (Has Attachments is equal to true).

    2) For each attachment, create a file in OneDrive.

    3) If the file is a zip compressed file (Media Type is equal to application/zip)

    4) Extract the archive to the folder.

     

    Hope it helps!

    Ferran

  • Community Power Platform Member Profile Picture
    on at

    Hi @fchopo,

     

    Thanks for your help on this. I followed your instructions and it moves the file to my desired folder but does not unzip.

     

    The file type is: WinRAR ZIP archive (.zip) and it is password protected (which I forgot to mention previously).

     

    Do you know how I an supply the password to flow assuming that is the issue?

     

    Thanks

     

    -PS - I should add that Condition 2 came out as False even though I set it to: application/zip

  • Verified answer
    fchopo Profile Picture
    8,003 Moderator on at

    Hello @Anonymous 

    I have tested the flow and you are right. After a little of investigation, I discovered that the media type value is application/x-zip-compressed.

    On the other hand, it's not possible to extract an password protected zip file, as stated in this thread: https://powerusers.microsoft.com/t5/General-Power-Automate/Password-protected-zip-files/td-p/29184 

    Hope it helps!

    Ferran

  • Community Power Platform Member Profile Picture
    on at

    Thanks @fchopo 

     

    Your solution is still useful knowledge. Shame about the password issue.

     

    Cheers!

  • Community Power Platform Member Profile Picture
    on at

    Is it possible to unzip password protected .zip files using flow?

  • fchopo Profile Picture
    8,003 Moderator on at

    Hi @Anonymous 

    No, it's not possible.

    Regards,

    Ferran

  • Daimao666 Profile Picture
    2 on at

    Does this save both the zip and extracted file to the folder ? If it does, can you autodelete it afterwards ?

  • Kesia Profile Picture
    2 on at

    hello @fchopo ,

     

     where can I find the media type to precise the value is application/x-zip-compressed?
    I only whant to get the Zip file inside the email and not the others attachements like the images etc

     

    thanks

  • fchopo Profile Picture
    8,003 Moderator on at

    Hi @Kesia 

    You can read the content-type value from the get attachment action:

    attachment.png

     

    Hope it helps!

    Ferran

  • domuniz47 Profile Picture
    10 on at

    Thank you sooo muuuuch!!

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard