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
Flow Standard All Flow regions
PowerApps Standard All PowerApps regions

Throttling Limits

Name Calls Renewal Period
API calls per connection10060 seconds

Actions

Add file tag

This operation adds a tag to a file.

Convert file

This operation converts a file to another format.

Convert file using path

This operation converts a file to another format using the path.

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).

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.

List files in folder

This operation gets the list of files and subfolders in a folder.

List files in folder [DEPRECATED]

This operation gets the list of files and subfolders in a folder.

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

This operation converts a file to another format.

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

This operation converts a file to another format using the path.

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

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

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

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

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

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).

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

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

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

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

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

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.

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.

List files in folder [DEPRECATED]

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

List files in root folder

This operation gets the list of files and subfolders in the root folder.

Returns

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

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

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

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

Triggers

When a file is created

This operation triggers a flow when a new file is created in a folder.

When a file is created

This operation triggers a flow when a new file is created in a folder.

When a file is created (properties only)

This operation triggers a flow when a new file is created in a folder.

When a file is created (properties only)

This operation triggers a flow when a new file is created in a folder.

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.

When a file is modified

This operation triggers a flow when a file is modified in a folder.

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)

This operation triggers a flow when a file is modified in a folder.

When a file is created

This operation triggers a flow when a new file is created in a folder.

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 created

This operation triggers a flow when a new file is created 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

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.

Parameters

Name Key Required Type Description
Folder
folderId True string

The unique identifier of the folder.

Returns

Blob metadata

List of Files
BlobMetadata

When a file is created (properties only)

This operation triggers a flow when a new file is created 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

Returns

Blob metadata

List of Files
BlobMetadata

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.

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 modified

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

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.

Returns

Blob metadata

List of Files
BlobMetadata

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

Returns

Blob metadata

List of Files
BlobMetadata

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.

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.