Download Attachment

Download the contents of a file from ServiceNow using a System ID.

Input

Field Definition Type Required

Attachment

System ID

The sys_id value of the attachment. The URL of the incident usually contains this value.

For example, for the URL https://instance.service-now.com/api/now/attachment/615ea769c0a80166001cf5f2367302f5, the sys_id value is 615ea769c0a80166001cf5f2367302f5.

Text

TRUE

Output

Field Definition Type

File

File Content

Contents of the attached file.

File

Size

Size of the attachment in bytes.

Number

Name

The filename of the attachment.

Text

Type

Type of object that was downloaded. For example, file.

Text

Content Type

Content type of the file, included in the message body for multipart uploads.

Text

Table Name

Name of the table from which you want to download a file.

Text

Table System ID

The sys_id value of the record on the specified table from which you want to download a file.

Text

State

State of the incident from which an attachment is downloaded.

Text

Hash

The 128-bit (16-byte) hash value for the attachment, in the form of a 32-digit hexadecimal number.

Text

Created Date Time

Date and time when the attachment was created.

For example, 2019-05-21 04:12:21.

Date & Time

Updated Date Time

Date and time when the attachment was last updated.

For example, 2019-06-15 09:05:43.

Date & Time

Typical use case

To use the Download Attachment card successfully in a flow, in the System ID input field, enter a System ID value. When a flow runs that includes this card, the specified file is downloaded to the Workflows file system. Use the Content Type output field to access the file later.

ServiceNow settings

In your ServiceNow instance, the following settings may limit the performance of the Download Attachment card:

  • REST Attachment API request timeout: Search for transaction quota to find this setting. If the timeout value is set too low, then the API returns a timeout error.

  • Maximum file attachment size in megabytes: Search for attachment limits. The default limit is usually 1024 MB. While you can change this setting, the file size can't be larger than 2 GB. See Workflows system limits.

Related topics

ServiceNow connector

Workflow elements

Guidance for ServiceNow connector

ServiceNow API reference