OneDrive

Connect to OneDrive to manage your files. You can perform various actions such as upload, update, get, and delete on files in OneDrive.
This connector is available in the following products and regions:
Service | Class | Regions |
---|---|---|
Logic Apps | Standard | All Logic Apps regions |
Power Automate | Standard | All Power Automate regions except the following: - US Government (GCC High) - China Cloud operated by 21Vianet |
Power Apps | Standard | All Power Apps regions except the following: - US Government (GCC High) - China Cloud operated by 21Vianet |
Contact | |
---|---|
Name | Microsoft |
URL | Microsoft LogicApps Support Microsoft Power Automate Support Microsoft Power Apps Support |
Connector Metadata | |
---|---|
Publisher | Microsoft |
Website | https://products.office.com/onedrive/online-cloud-storage |
Known Issues and Limitations
If you see an error while converting the file to PDF in the flow (e.g. “Bad gateway” or “The resource could not be found”) using OneDrive connector, the recommendation to workaround this issue would be to increase the delay between the file creation and converting to PDF.
For troubleshooting the issue with HTML to PDF conversion, please learn more here.
Connector in-depth
For more information about the connector, see the in-dept section.
Throttling Limits
Name | Calls | Renewal Period |
---|---|---|
API calls per connection | 100 | 60 seconds |
Actions
Add file tag |
This operation adds a tag to a file. |
Convert file (Preview) |
This operation converts a file to another format. The list of supported conversions can be found at https://aka.ms/onedriveconversions |
Convert file using path (Preview) |
This operation converts a file to another format using the path. The list of supported conversions can be found at https://aka.ms/onedriveconversions |
Copy file |
This operation copies a file within OneDrive. |
Copy file using path |
This operation copies a file within OneDrive by path. |
Create file |
This operation creates a file. |
Create share link |
This operation creates a share link for a file. |
Create share link by path |
This operation creates a share link for a file using the path. |
Delete file |
This operation deletes a file. |
Extract archive to folder |
This operation extracts an archive file into a folder (example: .zip). Maximum archive size is 50 MB and 100 files inside. |
Find files in folder |
This operation finds files within a folder using search or name pattern match. |
Find files in folder by path |
This operation finds files within a folder by path using search or name pattern match. |
Get file content |
This operation gets the content of a file. |
Get file content using path |
This operation gets the content of a file using the path. |
Get file metadata |
This operation gets the metadata for a file. |
Get file metadata using path |
This operation gets the metadata of a file using the path. |
Get file tags |
This operation gets the tags of a file. |
Get file thumbnail |
This operation gets the thumbnail of a file. The thumbnail will only be valid for 6 hours. |
List files in folder |
This operation gets the list of files and subfolders in a folder. |
List files in folder [DEPRECATED] |
This action has been deprecated. Please use List files in folder instead.
|
List files in root folder |
This operation gets the list of files and subfolders in the root folder. |
Move or rename a file |
This operation moves or renames a file. |
Move or rename a file using path |
This operation moves or renames a file using the path. |
Remove file tag |
This operation removes a tag from a file. |
Update file |
This operation updates a file. |
Upload file from URL |
This operation uploads a file from a URL to OneDrive. |
Add file tag
This operation adds a tag to a file.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File
|
id | True | string |
The unique identifier of the file. |
Tag
|
tag | True | string |
The name of the tag. |
Returns
Tags
- Body
- Tags
Convert file (Preview)
This operation converts a file to another format. The list of supported conversions can be found at https://aka.ms/onedriveconversions
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File
|
id | True | string |
The unique identifier of the file. |
Target type
|
type | string |
The target file type |
Returns
The content of the file.
- File content
- binary
Convert file using path (Preview)
This operation converts a file to another format using the path. The list of supported conversions can be found at https://aka.ms/onedriveconversions
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File Path
|
path | True | string |
The unique path of the file. |
Target type
|
type | string |
The target file type |
Returns
The content of the file.
- File content
- binary
Copy file
This operation copies a file within OneDrive.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File
|
id | True | string |
The unique identifier of the file. |
Destination File Path
|
destination | True | string |
The destination file path, including target filename. |
Overwrite
|
overwrite | boolean |
Overwrites the destination file if set to 'true'. |
Returns
Blob metadata
- Body
- BlobMetadata
Copy file using path
This operation copies a file within OneDrive by path.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File Path
|
source | True | string |
The unique path of the file. |
Destination File Path
|
destination | True | string |
The destination file path, including target filename. |
Overwrite
|
overwrite | boolean |
Overwrites the destination file if set to 'true'. |
Returns
Blob metadata
- Body
- BlobMetadata
Create file
This operation creates a file.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
Folder Path
|
folderPath | True | string |
The unique path of the folder. |
File Name
|
name | True | string |
The name of the file. Certain characters are disallowed by OneDrive and will be replaced by underscores. |
File Content
|
body | True | binary |
The content of the file. |
Returns
Blob metadata
- Body
- BlobMetadata
Create share link
This operation creates a share link for a file.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File
|
id | True | string |
The unique identifier of the file. |
Link type
|
type | True | string |
The type of link |
Returns
- Body
- SharingLink
Create share link by path
This operation creates a share link for a file using the path.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File Path
|
path | True | string |
The unique path of the file. |
Link type
|
type | True | string |
The type of link |
Returns
- Body
- SharingLink
Delete file
This operation deletes a file.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File
|
id | True | string |
The unique identifier of the file. |
Extract archive to folder
This operation extracts an archive file into a folder (example: .zip). Maximum archive size is 50 MB and 100 files inside.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
Source Archive File Path
|
source | True | string |
The path to the archive file. |
Destination Folder Path
|
destination | True | string |
The path to extract the archive contents. |
Overwrite
|
overwrite | boolean |
Overwrites the destination files if set to 'true'. |
Returns
- response
- array of BlobMetadata
Find files in folder
This operation finds files within a folder using search or name pattern match.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
Search Query
|
query | True | string |
The search query to use |
Folder
|
id | True | string |
The unique identifier of the folder. |
File Search Mode
|
findMode | True | string |
The search method to use. "Search" mode searches your OneDrive using the search query (similar a normal search engine). When "Regular Expression Pattern Match" mode is selected, the search query will be treated as a regex pattern, and it will return files with names that match the query |
Number of files
|
maxFileCount | integer |
Max file count (1-100) |
Returns
- response
- array of BlobMetadata
Find files in folder by path
This operation finds files within a folder by path using search or name pattern match.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
Search Query
|
query | True | string |
The search query to use |
Folder Path
|
path | True | string |
The unique path of the folder. |
File Search Mode
|
findMode | True | string |
The search method to use. "Search" mode searches your OneDrive using the search query (similar a normal search engine). When "Regular Expression Pattern Match" mode is selected, the search query will be treated as a regex pattern, and it will return files with names that match the query |
Number of files
|
maxFileCount | integer |
Max file count (1-100) |
Returns
- response
- array of BlobMetadata
Get file content
This operation gets the content of a file.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File
|
id | True | string |
The unique identifier of the file. |
Infer Content Type
|
inferContentType | boolean |
A boolean value (true, false) to infer content-type based on extension. |
Returns
The content of the file.
- File content
- binary
Get file content using path
This operation gets the content of a file using the path.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File Path
|
path | True | string |
The unique path of the file. |
Infer Content Type
|
inferContentType | boolean |
A boolean value (true, false) to infer content-type based on extension. |
Returns
The content of the file.
- File content
- binary
Get file metadata
This operation gets the metadata for a file.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File
|
id | True | string |
The unique identifier of the file. |
Returns
Blob metadata
- Body
- BlobMetadata
Get file metadata using path
This operation gets the metadata of a file using the path.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File Path
|
path | True | string |
The unique path of the file. |
Returns
Blob metadata
- Body
- BlobMetadata
Get file tags
This operation gets the tags of a file.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File
|
id | True | string |
The unique identifier of the file. |
Returns
Tags
- Body
- Tags
Get file thumbnail
This operation gets the thumbnail of a file. The thumbnail will only be valid for 6 hours.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File
|
id | True | string |
The unique identifier of the file. |
Thumbnail Size
|
size | True | string |
The size of the thumbnail to retrieve. |
Returns
Thumbnail response data
- Body
- Thumbnail
List files in folder
This operation gets the list of files and subfolders in a folder.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
Folder
|
id | True | string |
The unique identifier of the folder. |
Returns
Represents a page of blob metadata.
- Body
- BlobMetadataPage
List files in folder [DEPRECATED]
This action has been deprecated. Please use List files in folder instead.
This operation gets the list of files and subfolders in a folder.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
Folder
|
id | True | string |
The unique identifier of the folder. |
Include subfolders
|
includeSubfolders | boolean |
Include items in subfolders |
Returns
- response
- array of BlobMetadata
List files in root folder
This operation gets the list of files and subfolders in the root folder.
Returns
- response
- array of BlobMetadata
Move or rename a file
This operation moves or renames a file.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File
|
id | True | string |
The unique identifier of the file. |
Destination File Path
|
destination | True | string |
The destination file path, including target filename. |
Overwrite
|
overwrite | boolean |
Overwrites the destination file if set to 'true'. |
Returns
Blob metadata
- Body
- BlobMetadata
Move or rename a file using path
This operation moves or renames a file using the path.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File Path
|
source | True | string |
The unique path of the file. |
Destination File Path
|
destination | True | string |
The destination file path, including target filename. |
Overwrite
|
overwrite | boolean |
Overwrites the destination file if set to 'true'. |
Returns
Blob metadata
- Body
- BlobMetadata
Remove file tag
This operation removes a tag from a file.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File
|
id | True | string |
The unique identifier of the file. |
Tag
|
tag | True | string |
The name of the tag. |
Update file
This operation updates a file.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
File
|
id | True | string |
The unique identifier of the file. |
File Content
|
body | True | binary |
The content of the file. |
Returns
Blob metadata
- Body
- BlobMetadata
Upload file from URL
This operation uploads a file from a URL to OneDrive.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
Source URL
|
source | True | string |
The url to the source file. |
Destination File Path
|
destination | True | string |
The destination file path, including target filename. |
Overwrite
|
overwrite | boolean |
Overwrites the destination file if set to 'true'. |
Returns
Blob metadata
- Body
- BlobMetadata
Triggers
When a file is created |
This operation triggers a flow when a new file is created in a folder. Files larger than 50 MB will be skipped and not returned by this trigger. Files moved within OneDrive are not considered new files. |
When a file is created (properties only) |
This operation triggers a flow when a new file is created in a folder. Files moved within OneDrive are not considered new files. |
When a file is created (properties only) [DEPRECATED] |
This action has been deprecated. Please use When a file is created (properties only) instead.
|
When a file is created [DEPRECATED] |
This action has been deprecated. Please use When a file is created instead.
|
When a file is deleted (properties only) |
This operation triggers a flow when a file is deleted from a folder. |
When a file is modified |
This operation triggers a flow when a file is modified in a folder. Files larger than 50 MB will be skipped and not returned by this trigger. |
When a file is modified (properties only) |
This operation triggers a flow when a file is modified in a folder. |
When a file is modified (properties only) [DEPRECATED] |
This action has been deprecated. Please use When a file is modified (properties only) instead.
|
When a file is modified [DEPRECATED] |
This action has been deprecated. Please use When a file is modified instead.
|
When a file is created
This operation triggers a flow when a new file is created in a folder. Files larger than 50 MB will be skipped and not returned by this trigger. Files moved within OneDrive are not considered new files.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
Folder
|
folderId | True | string |
The unique identifier of the folder. |
Include subfolders
|
includeSubfolders | boolean |
Include items in subfolders |
|
Infer Content Type
|
inferContentType | boolean |
A boolean value (true, false) to infer content-type based on extension. |
Returns
The content of the file.
- File content
- binary
When a file is created (properties only)
This operation triggers a flow when a new file is created in a folder. Files moved within OneDrive are not considered new files.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
Folder
|
folderId | True | string |
The unique identifier of the folder. |
Include subfolders
|
includeSubfolders | boolean |
Include items in subfolders |
|
Number of files
|
maxFileCount | integer |
Max file count (1-100) |
Returns
Blob metadata
- List of Files
- BlobMetadata
When a file is created (properties only) [DEPRECATED]
This action has been deprecated. Please use When a file is created (properties only) instead.
This operation triggers a flow when a new file is created in a folder. Files moved within OneDrive are not considered new files.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
Folder
|
folderId | True | string |
The unique identifier of the folder. |
Number of files
|
maxFileCount | integer |
Max file count (1-100) |
Returns
Blob metadata
- List of Files
- BlobMetadata
When a file is created [DEPRECATED]
This action has been deprecated. Please use When a file is created instead.
This operation triggers a flow when a new file is created in a folder. Files larger than 50 MB will be skipped and not returned by this trigger. Files moved within OneDrive are not considered new files.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
Folder
|
folderId | True | string |
The unique identifier of the folder. |
Infer Content Type
|
inferContentType | boolean |
A boolean value (true, false) to infer content-type based on extension. |
Returns
The content of the file.
- File content
- binary
When a file is deleted (properties only)
This operation triggers a flow when a file is deleted from a folder.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
Folder
|
folderId | True | string |
The unique identifier of the folder. |
Include subfolders
|
includeSubfolders | boolean |
Include items in subfolders |
Returns
Blob metadata
- List of Files
- BlobMetadata
When a file is modified
This operation triggers a flow when a file is modified in a folder. Files larger than 50 MB will be skipped and not returned by this trigger.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
Folder
|
folderId | True | string |
The unique identifier of the folder. |
Include subfolders
|
includeSubfolders | boolean |
Include items in subfolders |
|
Infer Content Type
|
inferContentType | boolean |
A boolean value (true, false) to infer content-type based on extension. |
Returns
The content of the file.
- File content
- binary
When a file is modified (properties only)
This operation triggers a flow when a file is modified in a folder.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
Folder
|
folderId | True | string |
The unique identifier of the folder. |
Include subfolders
|
includeSubfolders | boolean |
Include items in subfolders |
|
Number of files
|
maxFileCount | integer |
Max file count (1-100) |
Returns
Blob metadata
- List of Files
- BlobMetadata
When a file is modified (properties only) [DEPRECATED]
This action has been deprecated. Please use When a file is modified (properties only) instead.
This operation triggers a flow when a file is modified in a folder.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
Folder
|
folderId | True | string |
The unique identifier of the folder. |
Number of files
|
maxFileCount | integer |
Max file count (1-100) |
Returns
Blob metadata
- List of Files
- BlobMetadata
When a file is modified [DEPRECATED]
This action has been deprecated. Please use When a file is modified instead.
This operation triggers a flow when a file is modified in a folder. Files larger than 50 MB will be skipped and not returned by this trigger.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
Folder
|
folderId | True | string |
The unique identifier of the folder. |
Infer Content Type
|
inferContentType | boolean |
A boolean value (true, false) to infer content-type based on extension. |
Returns
The content of the file.
- File content
- binary
Definitions
BlobMetadata
Blob metadata
Name | Path | Type | Description |
---|---|---|---|
Id
|
Id | string |
The unique identifier of the file or folder. |
Name
|
Name | string |
The name of the file or folder. |
Name without extension
|
NameNoExt | string |
The name of the file or folder, without the file extension. |
Display name
|
DisplayName | string |
The display name of the file or folder. |
Path
|
Path | string |
The path of the file or folder. |
Last modified time
|
LastModified | date-time |
The date and time the file or folder was last modified. |
Size
|
Size | integer |
The file or folder size in bytes. |
Media type
|
MediaType | string |
The media type of the file or folder. |
Is folder?
|
IsFolder | boolean |
A boolean value (true, false) to indicate whether or not the blob is a folder. |
ETag
|
ETag | string |
The etag of the file or folder. |
File locator
|
FileLocator | string |
The file locator of the file or folder. |
Last modified by
|
LastModifiedBy | string |
The user who last modified the file or folder. |
SharingLink
Name | Path | Type | Description |
---|---|---|---|
Web URL
|
WebUrl | string |
A URL that points to the file or folder. |
Tags
Tags
Name | Path | Type | Description |
---|---|---|---|
Tags
|
Tags | array of string |
A list of tags. |
Thumbnail
Thumbnail response data
Name | Path | Type | Description |
---|---|---|---|
Url
|
Url | string |
A URL that points to the thumbnail. |
Width
|
Width | integer |
The thumbnail width in pixels. |
Height
|
Height | integer |
The thumbnail height in pixels. |
BlobMetadataPage
Represents a page of blob metadata.
Name | Path | Type | Description |
---|---|---|---|
value
|
value | array of BlobMetadata |
Blob metadata collection. |
nextLink
|
nextLink | string |
A URL which can be used to retrieve the next page. |
binary
This is the basic data type 'binary'.