Skip to main content

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​

InputTypeRequiredDefaultWhat it is
Instance address (URL)StringNoInstance URL, e.g. https://yourcompany.service-now.com.
TableStringNoTable name of the record.
Record sys_idStringNoRecord sys_id.
UserStringNoUser name.
PasswordCredentialNoPassword from the vault.
Access tokenCredentialNoOAuth token from the vault.
Attachment IDStringNoSys_id of one attachment, to find just that one (G6).
Encoded queryStringNoEncoded query over the attachment table (sys_attachment), e.g. by table_name, file_name or content_type (G6).
LimitNumberNo1000Most attachments an encoded query returns (G6).
Save the filesBooleanNofalseAlso save every attachment found, in this step (G6).
Download folderFileNoFolder to save the files in; the run's temporary folder when empty. A file of the same name is replaced (G6).
API versionStringNoVersion of the ServiceNow REST API to call: v1, v2, or latest (the instance's current one) when empty (G6).

Outputs​

OutputTypeWhat it is
tableTableColumns: sys_id, file_name, content_type, size_bytes, created_on.
countNumberNumber of attachments.
filesListPaths of the saved files, in the order of the table; empty when not saving (G6).