SharePoint Online - Add attachment to an item

The SharePoint Online - Add attachment to an item action A tool for building the processes, logic, and direction within workflows. adds a selected file to the specified list item.

For more information about the SharePoint Online connector, go to SharePoint Online.

Configure the SharePoint Online - Add attachment to an item action

Important: Before inserting variables in the action configuration, you must manually type or select the values and populate other dependent fields in order to retrieve the output data. Once configured, you can insert variables to the required fields.

  1. Add the action to the workflow and open the action configuration panel. For more information, see Add an action to the workflow.

  2. Select a Connection. If you do not have a connection, see Add a connection.
    Note: 

    Only the connections created with the List and libraries authentication method are available in the drop-down list.

    For more information about authentication methods for SharePoint Online connections, see Authentication methods for SharePoint Online connections.

  1. Type a SharePoint site URL.
  2. Example:https://domain.sharepoint.com/sites/hr

  1. Click Retrieve lists. Existing lists in the site will be retrieved for your selection.
  2. Select the List name that you want.
  3. For Item ID, specify the ID of the list item to which you want to add the attachment. You can insert a variable or type the value.

For more information on the fields and buttons, see SharePoint Online - Add attachment to an item action fields and settings.

SharePoint Online - Add attachment to an item action fields and settings

Important: Before inserting variables in the action configuration, you must manually type or select the values and populate other dependent fields in order to retrieve the output data. Once configured, you can insert variables to the required fields.

Section Field Description Variable types
(unlabeled)

Connection Credentials and other settings required to pass data between the workflow and the indicated service, which could be a cloud service, business application, or content store.

SharePoint Online connection for the list containing the item to which you want to add the attachment.

To refresh the available connections, click .

(n/a)
Source attachment

Attachment

The file variable containing the file to be added to the list item.

File

Destination item

SharePoint site URL

The URL of the SharePoint Online site containing the list that you want to use.

To retrieve the SharePoint site data, type the SharePoint site URL and click Retrieve lists.

Example: https://domain.sharepoint.com/sites/hr

Boolean, Collection, DateTime, Decimal, Integer, Text

 

List name

The name of the list containing the list item that you want to add the attachment to.

The drop-down list is limited to lists within the site specified in SharePoint site URL.

Boolean, Collection, DateTime, Decimal, Integer, Text

 

Item ID

The ID of the list item that you want to add the attachment to. Accepts either typed text or an inserted variable.

Integer

 

Overwrite attachments

When set to Yes, overwrites any existing attachment of the same name. Accepts either a selection from the drop-down list or an inserted variable.

Boolean

Output

Result

Stores the result of the action as an object with the following variable:

  • Attachment name: Text variable to store the name of the attachment added to the list item.

Object