SharePoint Online - Get a file

Use the SharePoint Online - Get a file action A tool for building the processes, logic, and direction within workflows. to retrieve a file from the specified document library.

You can use the Get a file action with SharePoint Online - Store a file action to get a file from a document library and store it in a destination you want.

Before you start 

Configure the SharePoint Online - Rename a file action

The steps required to configure the action are given below. The SharePoint Online - Get a file action fields and settings table describes all the required and optional configuration fields.

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. Select a Connection to connect to the SharePoint Online site.
  2. Note: 

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

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

  1. In the Specify source by field, select Item ID or URL, depending on how you want to retrieve the file from the source location.
  2. Note: The configuration fields that are displayed in the Source file section depend on the option you select.

  3. If you select Item ID, do the following:
    1. Type the SharePoint site URL that has the document library you want to get a file from and click Retrieve libraries.
    2. Example: https://domain.sharepoint.com/sites/hr

      All the document libraries in the specified site are displayed in the Document library field drop-down list.

    3. For Document library, select the required document library that has the file you want to retrieve.
    4. Specify the Item ID of the item you want to retrieve. For information about how to get the Item ID, see Item ID.
  4. If you select URL, do the following:
  5. In the File URL field that appears, type the URL path to the source location of the file that you want to retrieve.

  6. In the Result field, specify the variable where you want to store the output, if necessary.

SharePoint Online - Get a file 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 to access the SharePoint Online site to use for the action.

To refresh the available connections, click Refresh.

(n/a)
Source file Specify source by

Select one of the following options to specify how you want to retrieve the file from the source location:

  • Item ID: Retrieve the file using the Item ID.

  • URL: Retrieve the file using the file URL.

Note: The configuration fields that are displayed in the Source file section depend on the option you select.

(n/a)
Source file

SharePoint site URL

The URL of the SharePoint Online site containing the document library you want to use.

To retrieve the libraries for the SharePoint site URL, type the SharePoint site URL and click Retrieve libraries.

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

This field is displayed only if Item ID is selected in the Specify source by field.

Text, Decimal, Integer, Boolean, DateTime, Collection

 

Document library

The document library that has the file you want to retrieve.

The values in the drop-down list is limited to document libraries within the site specified inSharePoint Online site URL.

This field is displayed only if Item ID is selected in the Specify source by field.

Text, Decimal, Integer, Boolean, DateTime, Collection

  Item ID

The ID of the list item you want to retrieve.

This field is displayed only if Item ID is selected in the Specify source by field.

Integer
  File URL (including name and extension

The URL path to the source location of the file that you want to retrieve.

This field is displayed only if URL is selected in the Specify source by field.

Text, Decimal, Integer, Boolean, DateTime, Collection
Output Result

Variable to store the retrieved file.

File