This post was originally published here

Unfortunately, there are no out-of-the-box capabilities inside Logic Apps, Consumption or Standard, to zip (or compress) files. You may be wondering why we need this type of capability. Well, there are legacy systems or integrations that require these capabilities, especially when the communication channel is email.

And yes, still happens today! It is not uncommon that some partners require that messages (or files) be sent by email, and to minimize the impact (to avoid reaching the attachment size limit or filling the mailbox), to zip the attachment.

This is also very useful to migrate AS IS BizTalk Server solutions into Azure (in this case, AS-IS means without changing the solution requirements).

And what does this Azure Function do?

The ZipFile Azure Function is simply an Azure Function that zips an inbound file. This can later be sent in an attachment of an email, sent to a folder or storage account.

Where can I download it?

You can download the complete Azure Functions source code here:

Hope you find this helpful! So, if you liked the content or found it useful and want to help me write more, you can buy (or help me buy) my son a Star Wars Lego! 

Thanks to my team member Luís Rigueira for helping me realize and implement this idea.

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc.

He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.
View all posts by Sandro Pereira