Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Extract/download attachments from multiple records in a table, at once

Supratik3
Tera Expert

Hi all,

 

There is a requirement wherein all the attachments need to be downloaded/extracted from all case records created within the last 30 days,from the Case table, and at once.

 

Appreciate any pointers on how to proceed with the solution, thanks in advance!

 

1 REPLY 1

Paul Kunze
Tera Guru

Hi, here is an idea:

You could create a Flow Action with a Zip step. So you combine all your desired attachments from the case records into one Zip file and then this can be downloaded all at once.

 

PaulKunze_0-1762432523467.png

 

In the first "Look Up Records" step you can set the table to "sys_attachment" and the conditions to "table_name IS sn_customerservice_case AND sn_customerservice_case.sys_created_on IS Last 30 days".

The result of this you can use in step 2 and create a Zip out of all the attachment records found.

 

You just need to think about a good way where and how to trigger this Flow Action. It could be from a UI Action so that the Zip is added to your current record. Or maybe you create a Scheduled Job which sends the Zip file directly to your email address.