How to Compress Excel Documents, Email the Archive in Power Automate

Cloudmersive
5 min readFeb 5, 2025

--

Excel files can get pretty bulky. If we’re emailing a number of Excel files at once, we can quickly find ourselves up against attachment size-limit constraints.

Compressing our files to ZIP archives solves that problem, but we’re still left with the inefficient multi-step process of 1) dragging Excel docs into an archive, 2) naming and saving that archive, and 3) creating the email to share the archive in.

Thankfully, in Power Automate, we can combine all those steps into one single workflow.

Using the Cloudmersive File Processing connector, we can compress multiple Excel files into a ZIP archive at once. Downstream of that, we can simply attach our ZIP archive to an email & send that email as part of our flow using one of the many email connectors available on the Power Automate platform (e.g., O365 outlook, Gmail, etc.).

Below, we’ll walk through a reusable instant cloud flow which accepts multiple file inputs, compresses those inputs to a ZIP archive, and emails the archive to a recipient.

Creating Manual triggers

In the Manually trigger a flow window of an Instant cloud flow, we can create several input fields for flow users. In this example, we’ll create a series of file input fields (in this case only 3, but we can create up to 10 for our ZIP compression action) along with 3 text input fields.

Our file input fields will allow flow users to select Excel files from their file system, and our text input fields will allow users to enter the subject of their email, message of their email, and name of the ZIP archive.

Compressing Excel Inputs to a ZIP Archive

In our next step, we’ll find the Cloudmersive File Processing connector in Power Automate.

We can do this by typing “Cloudmersive” into the search bar (the File Processing connector has a purple logo).

After clicking “See more” to view the full actions list, we’ll find the Compress files to create a new zip archive action fifth on our alphabetically organized actions list. We’ll select it once we find it.

Creating a Cloudmersive API connection

When we select this action, our first order of business is creating a Cloudmersive Document Conversion connection. We’ll need a free API key to do that, and we can get one by registering a free account on the Cloudmersive website (free API keys allow up to 800 API calls/month with zero commitment).

Configuring the ZIP archive compression step

We’ll now configure our request. To start, we’ll enter our first set of input file bytes & that file’s name into the first two parameters (both of these options are available as dynamic content from our manual trigger).

To compress the rest of our files, we’ll click “Show all” to view the advanced parameters, and we’ll enter our remaining input file byte/file name combinations into the first two sets of file input/file name parameters.

At this point, we’ve successfully assembled our ZIP archive full of compressed Excel documents; all that’s left now is our email.

Customizing an Outlook 365 email & adding the ZIP attachment

In this example, we’ll send our email using the Outlook O365 connector. Specifically, we’ll leverage the Send an email (V2) action.

For now, we’ll enter our own email address into the To field (later, after we’ve tested our flow successfully, we can ask users to input a recipient email along with the other manual triggers).

We’ll then pass our Email subject and body text inputs to the Subject and Body fields respectively.

Finally, to attach our ZIP file and name it, we’ll click “Show all” to view the advanced parameters, and we’ll click Add new item in the Attachments parameter.

We’ll pass our ZIP attachment name text input & OutputContent values in the Name and Content fields respectively.

Testing the flow

At this point, we’ll save our flow and set our inputs.

That means selecting 3 Excel files from our file system, providing Email subject & body text, and giving our ZIP archive a relevant name.

After we run our flow, we’ll find our new Excel archive attached to an email in our inbox.

And that’s all there is to it! In just a few quick steps, we assembled and emailed an Excel ZIP archive.

Conclusion

In this article, we learned how to leverage the Cloudmersive File Processing connector in Power Automate for assembling and a quick ZIP archive on the fly. We learned how easy it is to subsequently email that archive with direct input from the user at every level of the process.

If you’re interested in learning more Power Automate tips, remember to check back in on our daily blog!

--

--

Cloudmersive
Cloudmersive

Written by Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

No responses yet