download_attachment
Download ServiceNow attachment files to disk by attachment sys_id or table and record sys_id. Specify output directory and optional filename override.
Instructions
Download ServiceNow attachment file(s) to disk by attachment_sys_id, or table+record. Read from saved_path.
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. |