SharePoint Online - Rename a file
Use the SharePoint Online - Rename a file action A tool for building the processes, logic, and direction within workflows. to rename a file in a SharePoint Online document library.
For more information about the SharePoint Online connector, go to SharePoint Online.
Configure the SharePoint Online - Rename a file 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.
-
Add the action to the workflow and open the action configuration panel. For more information, see Add an action to the workflow.
-
Select a SharePoint Online Connection. If you do not have a connection, see Add a connection.
Only the connections created with the List and libraries authentication method will be available in the Connection drop-down.
For more information about authentication methods for SharePoint Online connections, see Authentication methods for SharePoint Online connections.
- Select an option in Specify source by to define how you want to select the source file that you want to rename. The configuration fields that display in the Source file section depend on the option selected.
- Type the SharePoint site URL that has the document library with the file you want to rename and click Retrieve libraries.
Example: https://domain.sharepoint.com/sites/hr
All the document libraries in the specified site displays in a drop-down list in the Document library field to select from.
Note: Retrieve libraries is not displayed if the Specify source by option you select is URL.
- Depending on the option selected in Step 3 do the following to choose the source file you want to rename:
Note: The fields displayed depend on the Specify source by option selected.
- Select the Document library that has the file you want to rename.
- Specify the File path of the file you want to rename.
- Select the Document library that has the file you want to rename.
- Specify the Item ID of the file you want to rename. For more information about how to find the Item ID, see Item ID.
- In File path specify the path of the file you want to rename. Include the name of the document library that the file is in. For example, if the report.pdf file is inside a document library named library, use the file path: /library/report.pdf
- In the New file name section, enter the new name for the file in File name.
SharePoint Online - Rename 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 use for the SharePoint Online site. To refresh the available connections, click . |
(n/a) | |
Source file | Specify source by |
Select one of the following options to determine how you want to specify the source file that you want to rename: Note: The configuration fields that are displayed in the Source file section depend on the option selected for Specify source by.
|
(n/a) |
SharePoint site URL |
The URL of the SharePoint Online site that has the list or document library you want to use. To retrieve the lists for the SharePoint site URL, type the SharePoint site URL and click Retrieve lists. Example: https://domain.sharepoint.com/sites/hr |
Boolean, Collection, DateTime, Decimal, Integer, Text | |
Document library |
(Available only if Choose file or Item ID is selected in the Specify source by field). The name of the document library that has the file you want to rename. When you specify the SharePoint Online site URL, the document libraries in the selected site will be available to select from in the Document library drop-down list. |
Boolean, Collection, DateTime, Decimal, Integer, Text |
|
File path |
(Available only if Choose file or URL is selected in the Specify source by field). The path, including file name and extension, for the file you want to rename. If the file is inside a folder, include the folder name followed by the file name in the file path. Example: /report/report.pdf If the Specify source by option selected is URL, include the document library name in the file path. For example, if the file is contained in the report folder inside a document library named library, include the document library name and the folder name in the file path: /library/report/report.pdf Note:
|
Boolean, Collection, DateTime, Decimal, Integer, Text |
|
Item ID |
(Available only if Item ID is selected in the Specify source by field). The ID of the list item you want to rename. How do I get the list item ID from theSharePoint Online list?
|
Integer | |
New file name | File name |
The new name for the file. |
Boolean, Collection, DateTime, Decimal, Integer, Text |
Output |
Result |
Stores the result of the action in an object with the following variables:
|
Object |