Copy Attachment action

  • Release version: Zurich
  • Updated July 31, 2025
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Copy Attachment action

    The Copy Attachment action in ServiceNow enables you to duplicate an attachment from the Attachments [sysattachment] table and associate it with a different target record. This action is available as a Workflow Studio core action and can be used within flows by users who have either theflowdesigneroradminrole.

    Show full answer Show less

    Inputs and Configuration

    • Source Attachment Record: Requires a record from the Attachment [sysattachment] table that represents the attachment to copy. You can select this record manually or retrieve it dynamically using the Look Up Attachment action, which returns Sys ID values based on file name and source record. When using Look Up Attachment, convert the Sys ID to a record pill with Look Up Record to use it in the Copy Attachment action.
    • Target Record: The record where the attachment copy will be added. This record can be found using the Look Up Record action.
    • Table: The name of the table containing the target record. This is automatically set when you provide the Target Record data pill.

    Outputs

    This action does not produce outputs.

    Practical Example

    A common use case is copying attachments from an incident record to a related problem record. The example flow works as follows:

    • Use Look Up Attachment to find the attachment on the triggering incident record, returning the attachment Sys ID.
    • Convert the attachment Sys ID to an attachment record pill using Look Up Record.
    • Look up the related problem record using another Look Up Record action.
    • Use the Copy Attachment action to copy the attachment record to the problem record.

    For copying multiple attachments, include a For Each loop in your flow.

    Why This Matters

    Copy Attachment automates the process of duplicating attachments between records, streamlining workflows such as incident-to-problem linkage without manual intervention. Understanding the use of Look Up Attachment and Look Up Record actions to properly handle Sys ID and record data pills is essential to implement this action successfully.

    Copies an attachment from the Attachments [sys_attachment] table to a target record.

    Roles and availability

    Available as a Workflow Studio ServiceNow core action. Users with the flow_designer or admin role can add an action to a flow and define configuration details.

    Inputs

    Provide a value for each input that your flow needs. To add dynamic values, you can also drag and drop pills from the Data panel or select them from the pill picker.

    Source Attachment Record [Attachment]
    Data type: Record

    Attachment record containing the attachment you want to copy. You can either manually select a record from the Attachment [sys_attachment] table or look up the attachment record. You can use the Look Up Attachment action to provide one or more Sys ID values of attachments with a given file name in a specific source record. If you use the Look Up Attachment action, you must also use a Look Up Record action to convert the Sys ID value returned by the Look Up Attachment action into a usable record data pill. See the example section for an illustration of converting the Sys ID output of the Look Up Attachment action into a record data pill.

    Target Record
    Data type: Record

    Record where you want to add a copy of the attachment. You can use the Look Up Record action to find an appropriate target record.

    Table
    Data type: Table Name

    Table containing the target record. This system sets this input value for you if you select a data pill for the target record.

    Outputs

    This action has no outputs.

    Copy attachments from incident records to a problem records

    Look Up Record action configured to return a record data pill from a Look Up Attachment action Sys ID output.

    This example copies attachments from the trigger incident record into an associated problem record. This example assumes that there is only one source attachment to copy. If you need to copy multiple attachments, add a For Each flow logic. The flow first uses the Look Up Attachment action to find the attachment within the trigger incident. The Sys ID value of produced by this action is used as an input in the Look Up Record action in step 3. The flow next looks up a problem record associated with the incident record.

    Configuration of the Copy Attachment action using the outputs of two Look Up Record actions.

    In this example, the Source Attachment Record input gets its value from the Look Up Record action for the Attachment [sys_attachment] table, because you can't use the string output of the Look Up Attachment action directly. The Target Record input gets its value from the Look Up Record action for the Problem [problem] table. The Table input inherits its value from the Target Record data pill.

    Execution details of flow step 3 Look Up Record for the Attachment table. The Record output links to the Attachment record.

    The execution details for flow step 3 show that the Look Up Record action has found a specific attachment record. This record is used as the input for flow step 4 Copy Attachment.

    Execution details for flow step 4 Copy Attachment. The step completed successfully.

    The execution details for flow step 4 show that both input values use the output data pills of Look Up Record actions. The Source Attachment Record input uses the data pill from flow step 3, and its runtime value is a specific Attachment record. The Target Record input uses the data pill from flow step 2, and its runtime value is a specific problem record.