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
Dual Super User
Dual 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.

View solution in original post

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.

View solution in original post

7 REPLIES 7
Dual Super User
Dual 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.

View solution in original post

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.


 

Dual Super User
Dual 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). 

 

 

Dual Super User
Dual 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.

View solution in original post

StevenRod
Level: Powered On

Re: Automaticallyunzip files from Outlook and saving on SharePoint

Thanks for your help!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,939)