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.
For more information about the SharePoint Online connector, go to SharePoint Online.
Configure the SharePoint Online - Get a file
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.
-
Add the action to the workflow and open the action configuration panel. For more information, see Add an action to the workflow.
- Select a Connection. If you do not have a connection, see Add a connection.
Only the connections created with the List and libraries authentication method are available in the drop-down list. For more information, see Connectors.
- In the Specify source by field, select Item ID or URL, depending on how you want to retrieve the file from the source location.
- If you select Item ID, do the following:
- Type the SharePoint site URL that has the document library you want to get a file from and click Retrieve libraries.
- For Document library, select the required document library that has the file you want to retrieve.
- Specify the Item ID of the item you want to retrieve. For information about how to get the Item ID, see Item ID.
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.
- If you select URL, do the following:
- In the Result field, specify the variable where you want to store the output, if necessary.
Note: The configuration fields that are displayed in the Source file section depend on the option you select.
In the File URL field that appears, type the URL path to the source location of the file that you want to retrieve.
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) |
SharePoint Online connection to access the SharePoint Online site to use for the action. To refresh the available connections, click . |
(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:
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. How do I get the list item ID from the SharePoint Online list?
|
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 |