List attachments
List the files attached to a record, one attachment by its id, or the attachments an encoded query finds; optionally save them all in the same step.
Command in the ServiceNow toolkit · id ooa.servicenow/list_attachments · 12 inputs, 3 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Instance address (URL) | String | No | Instance URL, e.g. https://yourcompany.service-now.com. | |
| Table | String | No | Table name of the record. | |
| Record sys_id | String | No | Record sys_id. | |
| User | String | No | User name. | |
| Password | Credential | No | Password from the vault. | |
| Access token | Credential | No | OAuth token from the vault. | |
| Attachment ID | String | No | Sys_id of one attachment, to find just that one (G6). | |
| Encoded query | String | No | Encoded query over the attachment table (sys_attachment), e.g. by table_name, file_name or content_type (G6). | |
| Limit | Number | No | 1000 | Most attachments an encoded query returns (G6). |
| Save the files | Boolean | No | false | Also save every attachment found, in this step (G6). |
| Download folder | File | No | Folder to save the files in; the run's temporary folder when empty. A file of the same name is replaced (G6). | |
| API version | String | No | Version of the ServiceNow REST API to call: v1, v2, or latest (the instance's current one) when empty (G6). |
Outputs
| Output | Type | What it is |
|---|---|---|
| table | Table | Columns: sys_id, file_name, content_type, size_bytes, created_on. |
| count | Number | Number of attachments. |
| files | List | Paths of the saved files, in the order of the table; empty when not saving (G6). |