Create Zip file in Mule 4


Let’s see how we can create zip file in Mule 4

Create a project and add the listener which will accept the payload in text.

Create Zip file in Mule 4


Add a compression module in mule pallet – please see on how we can add the module

Create Zip file in Mule 4


Add the archive activity in flow

Create Zip file in Mule 4


Please note entries will represent the structure of the target zip

mulesy.txt will be the name of the file in the zip and payload will be it’s content

More info –


Now we will write a zip file on local drive.

Add the file write activity and update the configuration


File configuration


Add the response message


Run the application


We can see the zip file


Extract the zip file


Sample MuleSoft Application – compression-services

Sample SOAP UI project – compression-services-soapui-project


Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.

Share this:
Notify of
Inline Feedbacks
View all comments