Want to download attachments in a zip file according to the RITM no associated to it. I don't want to go with ui action option.

Nikita9
Mega Expert

Hi All,

I want to download attachments in a zip file according to the RITM no associated to it. I don't want to go with ui action option.

 

I tried to use attachment API but couldn't find a way to download the attachments. All i was able to see was metadata.

I want the exact attachment that is attached to the RITM

Example; if i have 20 RITMs. If i hot an API, then 20 zip files should be created locally storing the respective attachments.

 

Pls help.

 

Regards,

Nikita

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Nikita,

So when should the attachment be added?

check below links

https://community.servicenow.com/community?id=community_question&sys_id=aad66f74db28cc182be0a851ca96...

https://www.servicenowguru.com/scripting/download-attachments-zip-file/

Regards
Ankur

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

Hi Ankur,

 

Thanks for your reply.

RITM should be of system date only.

Whatever links you have shared, the attachment download is possible because of UI action. I can't use ui action for bulk of records because of its unresponsive behaviour.

 

Pls suggest what i can do apart from this.

 

Regards,

Nikita

Hi Nikita,

Can you explain your requirement what has to be done?

1) To which record the zip should be attached

Regards
Ankur

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

Hi Ankur,

If i have 5 records and when i hit the api then 5 zip files should be created. one for each ritm storing attachments of that ritm.