To manage files and folders in Microsoft® OneDrive® or SharePoint® as part of a chain, add a step that includes a Microsoft OneDrive connection command.
To enable these commands, an IT admin first creates a Microsoft OneDrive connector.
Copy item
To copy a file or folder in the drive to a new location, use a Copy Item command.
Equivalent API call:: https://learn.microsoft.com/en-us/graph/api/driveitem-copy
Properties
| Property |
Detail |
| Path to item |
Enter the path of the file or folder to copy. |
| Parent path |
Enter the path of where to create the copy of the item. |
| New name |
Enter the name to use with the created item. To use the same name as the original item, leave blank. |
| Delete original |
To delete the original item, check this box. |
Outputs
| Output |
Output Type |
| New path |
String |
Exit codes
| Code |
Type |
Detail |
| 0 |
Success |
Success |
| 1 |
Error |
Error executing the command |
| 2 |
Error |
Error authenticating with OneDrive or SharePoint |
Create folder
To create a folder at the specified location, use a Create Folder command.
Equivalent API call: https://learn.microsoft.com/en-us/graph/api/driveitem-post-children
Properties
| Property |
Detail |
| Parent path |
Enter the path of where to create the folder. |
| Folder name |
Enter the name to use with the created folder.
Note: If Parent path input includes a nested path such as my/new/folder, the command creates each folder in the path as necessary.
|
| Conflict behavior |
Select how to resolve the conflict if another folder with the same name as the Folder Name input exists. |
Outputs
| Output |
Output Type |
| Folder |
File |
Exit codes
| Code |
Type |
Detail |
| 0 |
Success |
Success |
| 1 |
Error |
Error executing the command |
| 2 |
Error |
Error authenticating with OneDrive or SharePoint |
Delete item
To delete a file or folder from the drive, use a Delete Item command.
Equivalent API call: https://learn.microsoft.com/en-us/graph/api/driveitem-delete
Properties
| Property |
Detail |
| Path |
Enter the path of item to delete. |
Outputs
None
Exit codes
| Code |
Type |
Detail |
| 0 |
Success |
Success |
| 1 |
Error |
Error executing the command |
| 2 |
Error |
Error authenticating with OneDrive or SharePoint |
Download file
To download a file given its path, use a Download File command.
Equivalent API call: https://learn.microsoft.com/en-us/graph/api/driveitem-get-content
Properties
| Property |
Detail |
| Path |
Enter the path of file to download. |
Outputs
| Output |
Output Type |
| Downloaded file |
File |
Exit codes
| Code |
Type |
Detail |
| 0 |
Success |
Success |
| 1 |
Error |
Error executing the command |
| 2 |
Error |
Error authenticating with OneDrive or SharePoint |
List drives
To list all drives available to a user, site, or group, use a List Drives command.
Equivalent API call: https://learn.microsoft.com/en-us/graph/api/drive-list
Properties
| Property |
Detail |
| Entity type |
Select the type of entity to list drives for. |
| ID |
Enter the unique identifier of the entity to list drives for. For the current user, leave blank. |
Outputs
| Output |
Output Type |
| Drives |
File |
| Drive count |
Integer |
Exit codes
| Code |
Type |
Detail |
| 0 |
Success |
Success |
| 1 |
Error |
Error executing the command |
| 2 |
Error |
Error authenticating with OneDrive or SharePoint |
Search
To search the drive for files or folders, use a Search command.
Equivalent API call: https://learn.microsoft.com/en-us/graph/api/driveitem-search
Properties
| Property |
Detail |
| Path |
Enter the path of where to search. To search from the root directory, leave blank. |
| Query |
Enter the query criteria of the items to return. To return all files and folders at Path, leave blank. |
Outputs
| Output |
Output Type |
| First result |
File |
| Search results |
File |
| Search result count |
Integer |
Exit codes
| Code |
Type |
Detail |
| 0 |
Success |
Success |
| 1 |
Error |
Error executing the command |
| 2 |
Error |
Error authenticating with OneDrive or SharePoint |
Upload file
To upload a file to the specified path, use an Upload File command.
Equivalent API call: https://learn.microsoft.com/en-us/graph/api/driveitem-put-content
Properties
| Property |
Detail |
| File |
Enter the file to upload. |
| Upload path |
Enter the path to upload the file to, including the name of the file to create on the drive. |
| Properties |
Enter any additional properties for the upload. |
Outputs
None
Exit codes
| Code |
Type |
Detail |
| 0 |
Success |
Success |
| 1 |
Error |
Error executing the command |
| 2 |
Error |
Error authenticating with OneDrive or SharePoint |