Microsoft OneDrive

The Microsoft OneDrive component allows Connect to work with the Microsoft OneDrive online cloud storage software.

The component provides the ability to connect to the Microsoft OneDrive storage service.

Requirements

Environment variables

Name Mandatory Description Values

OAUTH_CLIENT_ID

true

Microsoft Graph Application OAuth2 Client ID.

Can be found on your application page at https://portal.azure.com.

OAUTH_CLIENT_SECRET

true

Microsoft Graph Application OAuth2 Client Secret.

Can be found on your application page at https://portal.azure.com.

ATTACHMENT_MAX_SIZE

false

For attachments configuration. Maximal possible attachment size in bytes. By default, set to 1000000, and according to platform limitations, cannot be larger than that.

Up to 1000000 bytes

The component LOG_LEVEL environment variable has been deprecated. Now you can control the logging level per each step of the flow.

Credentials

To create new credentials, you need to authorize in the Microsoft system using the OAuth2 protocol.

Triggers

Get new and updated files polling

Triggers to get all new and updated files since the last polling. Polling is provided by the file’s lastModifiedDateTime property.

Get new and updated files polling

List of expected config fields

Drive identity

OneDrive instance with which to work.

Folder path

Dropdown with folders from which to poll files.

Emit behavior
Emit individually

Default. Emits each object in a separate message.

Fetch all

Emits all objects in one message.

Start time

Start date and time of polling. Default minimum date: -271821-04-20T00:00:00.000Z.

End time

End date and time of polling. Default maximum date: +275760-09-13T00:00:00.000Z.

Size of polling page

Indicates the size of pages to be fetched. Defaults to 1000.

Expand children

Checkbox, trigger retrieves files from subfolders of the chosen path, if enabled. It is disabled by default.

Enable file attachments

Checkbox for attaching files content to response. It is disabled by default.

Actions

Get file

This action is used to get an item from OneDrive using a path provided in the selected disc.

Get File

Input fields description

Drive identity

The OneDrive instance with which to work. Selected by the owner.

Enable file attachments

Checkbox for attaching files content to action response.

Metadata fields description

Path

Full path to the the item to create or replace.

Input example:

{
    "path": "base_folder/inner_folder/file.any"
}

Upsert file

This action upserts (create or replace) with the first file from an attachment at the provided path in Microsoft OneDrive.

Upsert File

Input fields description

Drive identity

The OneDrive instance with which to work. Selected by the owner.

Metadata fields description

Path

Full path to the item to create or replace.

Input example:

{
    "path": "base_folder/inner_folder/file.any"
}

Delete file

This action deletes items from OneDrive by using a provided path in the selected disc. It returns the filename if the file is deleted successfully and an empty message if the file is not found.

Delete File

Input fields description

Drive Identity

The OneDrive instance with which to work. Selected by owner.

Metadata fields description

Path

Full path to the item to delete.

Input example:

{
    "path": "base_folder/inner_folder/file.any"
}

Create folder

This action creates a new folder at the provided path. If the provided path does not exist, the component fails.

Create Folder

Input fields description

Drive identity

The OneDrive instance with which to work. Selected by owner.

Conflict behaviour

The behavior in case of conflicts where the folder already exists:

Fail

Default. Fails if a folder with the same name already exists at the provided path.

Rename

Renames folder if a folder with the same name already exists under the provided path. Examples: exists -> exists_1, exists_1 -> exists_1_1.

Replace

Replace the folder if another folder with the same name already exists at the provided path.

Files inside the folder are not replaced, but the last modified date of the folder is updated.

Metadata fields description

Path

The path to the folder where the new folder is created. Use an empty string or / for root.

Name

Name of the new folder.

Known limitations

The attachments mechanism does not work with local agent installations.