How to compress a CSV file in Flow Designer action and then convert to base64?

User205031
Tera Contributor

Hi All,

 

I have a requirement. While submitting a catalog item, I am uploading a CSV file. I need to compress the CSV file in Flow Designer and then convert to base64.

 

How to compress the CSV file in Flow Designer?

 

Thanks in advance!

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@User205031 

you can use Zip operation from flow, create the zip file and store it on RITM or some record

then you can get base64 encoded data of that file easily

Zip operation 

Base64 encoded Attachments 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

@User205031 

your code will get bas64encoded data of that zip and not for the file within it.

that's the expected behavior.

If you are planning to send this base64encoded data to 3rd party they can decode it, they will get zip file, when then unzip they will get the actual file.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar , 

 

Thanks it worked. After sending the base64encoded data to 3rd party they are able to decode it, after they unzip it.