download_attachment
Download attachments from ServiceNow records to a local directory or retrieve remote links for access.
Instructions
Download attachments. Use saved_path locally; read the ResourceLink remotely when needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | No | ||
| record | No | Parent record: sys_id or display number (e.g. INC0010023). | |
| filename | No | Override saved name (single file only). Default: real file_name. | |
| output_dir | No | Save dir. Default: ./temp/<instance>/attachments/ | |
| max_size_mb | No | ||
| download_all | No | If the record has many attachments, fetch all (else list them). | |
| attachment_sys_id | No | sys_attachment sys_id. Omit to resolve via table+record. |