Summary: ◀▼
You can connect OneDrive to action flows to automate file and folder management tasks like searching and creating items. Use a dedicated service account for connections and authorize necessary permissions. Available actions include searching files or folders and creating files or folders, with options to specify names, content, and locations. This integration helps streamline collaboration and workflow automation across platforms.
Connecting OneDrive to action builder
Before you can include external actions in your action flows, you must connect the action builder to the external system.
- All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it's a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
- All integrations request access to necessary scopes. However, it's important that you review and validate the scopes before authorizing the connection to the external system.
- When managing credentials for API key-based tools, such as OpenAI, it's best to store keys in a secure vault or credential manager.
- In Admin Center, click
Apps and integrations in the sidebar, then select Actions > Action
flows. - Create or edit an action flow.
- Open the step sidebar.
- Under External actions, click OneDrive.
- Click Connect.
- Follow OneDrive's prompts to authenticate and complete the connection.
The
https://graph.microsoft.com/Files.ReadWritescope must be authorized during the connection process.Note: All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it is a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
After you've connected to the system, you'll see an indicator that it's connected and details about the instance you're connected to, as well as the actions available for OneDrive.
Using OneDrive actions in action flows
OneDrive action steps can be used to create and search files and folders.
Searching files
Use the Search file action to search files.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: File nameOptional:
|
| Output | File metadata |
Searching folders
Use the Search folder action to search folders.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: File nameOptional:
|
| Output | Folder metadata |
Creating files
Use the Create file action to create files.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: File name, File
contentOptional: |
| Output | File metadata |
Creating folders
Use the Create folder action to create folders.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Folder nameOptional:
|
| Output | Folder metadata |