cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StevenRod
Level: Powered On

Automaticallyunzip files from Outlook and saving on SharePoint

Hello Everbody

Please i need an advice, i´m working  developing a flow, so I can download an attachment(.zip folder) from Outlook and save it on sharepoint library with a custom name(filtering the Subject), but I don't know how to Automatically  unzip each folder as a task on my flow. 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Automaticallyunzip files from Outlook and saving on SharePoint

You can use the Extract Folder action in Flow to unzip a .ZIP file.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
v-lin-msft
Level 10

Re: Automaticallyunzip files from Outlook and saving on SharePoint

Hi @StevenRod,

 

Based on your requirement, I have created a flow workaround you can refer to:

Annotation 2019-06-28 172305.png

-If Yes, Perform the following steps:

  • Extract folder;
  • Get file content of the unzipped files;
  • Create file and rename the file based on your email subject.

substring(item()?['Name'],lastIndexOf(item()?['Name'], '.'),5)

Since my test file is excel file, so I need to set the third parameter of substring() as 5, counting from '.' .

Annotation 2019-06-28 172547.png

 

Please have a try, hopes it can help you.

 

Best Regards,

Community Support Team _ Lin Tu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

7 REPLIES 7
Super User
Super User

Re: Automaticallyunzip files from Outlook and saving on SharePoint

You can use the Extract Folder action in Flow to unzip a .ZIP file.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
StevenRod
Level: Powered On

Re: Automaticallyunzip files from Outlook and saving on SharePoint

But if I use extract folder action... 

Can I keep the custom name given to the file?


@Pstork1 wrote:

You can use the Extract Folder action in Flow to unzip a .ZIP file.


 

Super User
Super User

Re: Automaticallyunzip files from Outlook and saving on SharePoint

What custom name do you mean?  The custom name of the Zip?  The files inside the archive already have names.  You are unzipping the files to some location.  I'm not following your question.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
StevenRod
Level: Powered On

Re: Automaticallyunzip files from Outlook and saving on SharePoint

 

 

First Thanks for your feedback.

I know that the files inside the .zip already have names, but I use the Subject of the email to give them a custom name on my sharepoint folder. For ex.- Subject : Important file code office:#103 code day: 002 Sunday.

So I extract those codes and use it as a name(doesn't matter the name inside the .zip). 

 

 

Super User
Super User

Re: Automaticallyunzip files from Outlook and saving on SharePoint

I don't believe you have the option to rename the files during the unzip process.  You don't really get that option when unzipping to a desktop folder either.  You have to rename the files after.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
v-lin-msft
Level 10

Re: Automaticallyunzip files from Outlook and saving on SharePoint

Hi @StevenRod,

 

Based on your requirement, I have created a flow workaround you can refer to:

Annotation 2019-06-28 172305.png

-If Yes, Perform the following steps:

  • Extract folder;
  • Get file content of the unzipped files;
  • Create file and rename the file based on your email subject.

substring(item()?['Name'],lastIndexOf(item()?['Name'], '.'),5)

Since my test file is excel file, so I need to set the third parameter of substring() as 5, counting from '.' .

Annotation 2019-06-28 172547.png

 

Please have a try, hopes it can help you.

 

Best Regards,

Community Support Team _ Lin Tu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

StevenRod
Level: Powered On

Re: Automaticallyunzip files from Outlook and saving on SharePoint

Thanks for your help!

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 382 members 4,832 guests
Please welcome our newest community members: