ServiceNow Attachment Download

ServiceNow Attachment Download

In this article

Overview

You can use this Snap to download attachments. It takes a sys_id from the upstream snap as input, and returns the attachments in binary if they exist.

service-now-attachment-download-overview.png

Snap Type

The ServiceNow Attachment Download Snap is a Read-type Snap that reads

Prerequisites

  • A valid account with the required permissions.

Support for Ultra Pipelines  

Known Issues

None.

Snap Views

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input 

Document

 

  • Min: 1

  • Mapper

This Snap has exactly one document input view. It expects a document containing the sys_id of the attachment to download. This is produced by a ServiceNow Query Snap followed by a Mapper Snap that maps the relevant sys_id field to the value expected in the Attachment ID field.

Output

Binary

 

  • Min: 1

  • File Writer

  • Email Sender

This Snap has exactly one document output view when no attachment is found, and a binary output view when the attachment exists. If a matching attachment is found for the given sys_id, the Snap outputs the file content as a binary stream. The Snap includes the original upstream Snap data in the output.

Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab:

  • Stop Pipeline Execution: Stops the current pipeline execution if the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the remaining records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap Settings

  • Expression : JavaScript syntax to access SnapLogic Expressions to set field values dynamically (if enabled). If disabled, you can provide a static value. Learn more.

  • SnapGPT : Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.

  • Suggestion : Populates a list of values dynamically based on your Account configuration.

  • Upload : Uploads files. Learn more.

Learn more about the icons in the Snap Settings dialog.

Field Name

Field Type

Description

Field Name

Field Type

Description

Label*

 

Default Value: ServiceNow Attachment Download Example: ServiceNow Attachment Download

String

Specify the name for the Snap. You can modify this to be more specific, especially if you have multiple instances of the same Snap in your pipeline.

 

Sys ID*

Default Value: $sys_id

Example: $sys_id

String

Specify either the Sys ID from the record that contains attachments or the Sys ID of the attachment to download, depending on the ID type selected from the property

ID type

Default Value: Attachment Sys ID
Example: Record Sys ID

Dropdown

Choose the Sys ID from the following options:

  • Record Sys ID

  • Attachment Sys ID

Number of retries

Default Value: 5

Example: 3

Integer

Specify the maximum number of attempts the Snap makes to reconnect to the ServiceNow instance if the initial connection attempt fails, before it stops execution and displays an error.

Retry interval (seconds)

Default Value: 3

Example: 5

Integer

Specify the number of seconds the Snap waits between each retry attempt.

Snap Execution

Default Value:  Validate & Execute
Example: Validate & Execute

Dropdown list

Select one of the following three modes in which the Snap executes:

  • Validate & Execute: Performs limited execution of the Snap based on Preview Document Count value in User settings and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.

  • Execute only: Performs full execution of the Snap during pipeline execution without generating preview data.

  • Disabled: Disables the Snap and all Snaps that are downstream from it.

ServiceNow Snap Pack