OneDrive For Business Connector(Power Automate Cloud flows)
Available is Outlook on the Web (Microsoft365), not Outlook installed on your computer.
Basics
This is a set of functions to operate "OneDrive For Business" in the browser (cloud).
File specification: file ID and file path
There are two ways to specify the operation target: file ID and file path.
Each has the following characteristics.
File ID
OneDrive-specific file management ID.
- The name is "File" when specifying options, and "ID" or "File identifier" for dynamic content.
- If a file with the same path is deleted and recreated, it becomes a different ID.
- Included in metadata and available as is.
Retrieved by the following trigger.
- When a file is created
- When a file is created(properties only)
- When a file is modified
- When a file is modified(properties only)
Used to specify a file in the next action.
- Create file
- Update file
- Delete file
- Get file content
- Get file metadata
- Copy file
- Move or rename a file
- Get file thumbnail
- Extract archive to folder
- Convert file
- Create share link
File path
The location and file name of the file in OneDrive.
- The name when specifying options is "File path". Dynamic content is "File path" or "filePath".
- The same path points to the same file even if the file is deleted and re-created.
Retrieved by the following trigger.
- When a file is created(properties only)
- When a file is modified(properties only)
- For a selected file
Used to specify a file in the next action.
- Get file content using path
- Get file metadata using path
- Copy file using path
- Move or rename a file using path
- Convert file using path
- Create share link by path
Acquired information: file contents and metadata (properties)
The information about a file that an action retrieves is often "File content" or "Metadata".
File content is the content of the file.
It can be text data or binary data such as images.
Metadata is additional information such as the file name.
Id
File identifier.
Name
File name.
Path
Full path of the file.
Last modified time
Last update.
Last modified by
Last updated by user name.
Size
Bytes in file.
Media type
MINE type of file.
Is folder?
True if it is a folder; False if it is not a folder.
How to build flow.
The following exist in a connector.
- Actions or triggers that retrieves information.
- Actions that does something to the file.
Actions that manipulate files often require a File ID, so it must be specified as fixed, or the File ID must be obtained in the next trigger or action.
- When a file is created(properties only)
- When a file is modified(properties only)
- Get file metadata using path
The basic form is to specify the "ID" of that dynamic content in the "file" of the subsequent action.
Triggers
Trigger | Importance | |
---|---|---|
When a file is created | Middle | This trigger is launched when a new file is created in a designated folder on OneDrive. There are a small number of cases where file content is used in triggers. |
When a file is created(properties only) | High | This trigger is fired when a new file is created in a specified folder on OneDrive. This trigger acquires metadata (additional information) of the newly created file. Unlike "When a file is created", it does not retrieve file content, but it uses less file content in the trigger and can be supplemented with "Get file content" if necessary. The information available as dynamic content is also better here. Therefore, this action will be used more frequently. |
When a file is modified | Middle | This trigger is launched when a new file is modified in a designated folder on OneDrive. There are a small number of cases where file content is used in triggers. |
When a file is modified(properties only) | High | This trigger is fired when a new file is modified in a specified folder on OneDrive. This trigger acquires metadata (additional information) of the modified file. Unlike "When a file is modified", it does not retrieve file content, but it uses less file content in the trigger and can be supplemented with "Get file content" if necessary. The information available as dynamic content is also better here. Therefore, this action will be used more frequently. |
For a selected file | High | It is a trigger that specifies a file in OneDrive to launch. |
Actions
Action | Importance | Description |
---|---|---|
Create file | High | This action creates a file in any folder in OneDrive. |
Update file | High | This action updates the contents of a file on OneDrive. |
Delete file | High | This action deletes a file on OneDrive. |
Get file content | High | This action retrieves the contents of a file stored in OneDrive. |
Get file content using path | High | This action retrieves the contents of a file stored in OneDrive. |
Get file metadata | Low | This action retrieves additional information about a file on OneDrive, such as the file name and who updated it. It requires the ID of the file as a parameter, but is used infrequently because if the ID of the file is known, other metadata is often obtained as well. |
Get file metadata using path | High | This action retrieves additional information (file name, updater, ID, etc.) for files on OneDrive. The ID can be obtained by specifying the path, This action is also useful for using other actions that require ID. |
List files in folder | High | This action retrieves a list of stored files and folders. |
List files in root folder | Low | This action retrieves a list of files and folders stored in the top-level folder of OneDrive. |
Copy file | High | This action copies files on OneDrive. |
Copy file using path | High | This action copies a file on OneDrive by specifying the file path. |
Move or rename a file | High | This action moves or renames a file on OneDrive. |
Move or rename a file using path | High | This action moves or renames a file on OneDrive by specifying the file path. |
Get file thumbnail | Low | The action is to get the URL of the thumbnail of the specified file. |
Upload file from URL | Middle | This action saves the file specified by URL to OneDrive. |
Convert file | Low | This action to convert OneDrive files to another format. (Excel to PDF, etc.) |
Convert file using path | Low | This action converts a file on OneDrive specified by path to another format. (Excel to PDF, etc.) |
Create share link | Middle | This action creates a URL for sharing a file on OneDrive. |
Create share link by path | Middle | This action creates a URL for sharing a file on OneDrive specified by path. |
Find files in folder | High | This action searches for folders and files in the specified folder and retrieves a list of information. |
Find files in folder by path | High | This action searches for folders and files in the folder specified by path and obtains a list of matches. |
Extract archive to folder | Middle | This action unzips Zip files stored in OneDrive. |