ServiceNow get attachment action

Use the Get Attachment action to download an attachment from the specified record in ServiceNow.

Prerequisites

Ensure that you are authenticated before initiating any ServiceNow action. For more details, see ServiceNow authentication action.

Procedure

  1. From the Actions pane, select ServiceNow > Attachments > Get Attachment and place it in the canvas.
  2. Specify details in the following fields:
    1. Filter attachment by.
      • sys_id: Specify the attachment ID or select a variable where the attachment ID is stored.
        Note: To locate an attachment's unique identifier (sys_id), right-click on the attachment's name and select Copy link address. Paste the copied link into a text editor, and look for the parameter named sys_id within the URL. The value following sys_id= is the attachment's unique identifier. For example, in the link https://your_instance.service-now.com/sys_attachment.do?sys_id=0000000000000001, the attachment sys_id is 0000000000000001.
      • Associated record: Specify details of the associated record, to download the associated attachment. You must enter the table name and the table ID.
      • Query: Specify a query parameter to download the attachments. For example, you can map the sys_id to a variable and add it as a query.
    2. Enter a Destination folder path, or select a variable if the path is stored in a variable.
    3. The session name displays as Default.
    4. You can assign the attachment ID to a string variable. For example, the attachment ID is saved to list_GetAttachmentResults.

      Get record action for service now
  3. Click Run to save and run your bot.
  4. The attachment is downloaded to the specified folder path.