Skip to content

OneDrive

The OneDrive modules enable you to monitor, search, retrieve download, upload, create, copy, move, and delete files or folders in your OneDrive account.

Getting Started With OneDrive

Prerequisites

Caution

The module dialog fields that are displayed in bold (in the Ibexa Connect scenario, not in this documentation article) are mandatory!

Connecting OneDrive to Ibexa Connect

After you click the Continue button, Ibexa Connect will redirect you to the OneDrive website, where you will be prompted to grant Ibexa Connect access to your account.

61d6aad70d634.png

Confirm the dialog by clicking the Yes button.

File/Folder

Watch Files/Folders

Retrieves file or folder details when a file/folder is created or updated.

Watch Files/Folders

Select whether to watch new files/folders (By Created Time) or updated files (By Updated Time).

Choose your OneDrive location

Select the location you want to watch.

  • My Drive — to watch your drive or a drive available to you.

  • Shared With Me — to watch files/folders that have been shared with the owner of the drive.

  • Site's Drive — to watch the SharePoint Sites that have been followed by the signed-in user.

  • Group's Drive — to watch the drives of the selected group.

Query Search

Enter the search term to filter returned items by.

Choose an Item Type

Select whether to watch files, folders or both.

Limit

Set the maximum number of items Ibexa Connect will return during one execution cycle.

Search Files/Folders

Returns files, folders, or both based on search settings.

Choose your OneDrive location

Select the location you want to retrieve items from.

  • My Drive — to search your drive or a drive available to you.

  • Shared With Me — to list files/folders that have been shared with the owner of the drive.

  • Site's Drive — to list items of the SharePoint Site that have been followed by the signed-in user.

  • Group's Drive — to list items in the drive of the selected group.

Query Search

Enter the search term to filter returned items by.

Choose an Item Type

Select whether to return files, folders or both.

Limit

Set the maximum number of items Ibexa Connect will return during one execution cycle.

Get a File

Retrieve file details.

Enter

Select whether to specify the file by ID or by a path.

Enter a File ID / Enter a File Path

Select whether to specify the file by selecting from the drop-down menu or manually by mapping.

Choose your OneDrive location

Select the location where the file is located.

  • My Drive — to retrieve the file from your drive or a drive available to you.

  • Site's Drive — to retrieve the file from the SharePoint Site that has been followed by the signed-in user.

  • Group's Drive — to retrieve the file from the drive of the selected group.

Enable to Enter a Drive ID

Select the Yes option to choose the drive where the file is located.

Drive ID

Select or map the ID of the drive where the file is located. If left empty, the item will be moved within the same OneDrive.

File Path / File ID

Enter (map) the ID or select the file you want to retrieve details for.

Download a File

Downloads a specified file.

Enter

Select whether to specify the file by ID or by a path.

Enter a File ID / Enter a File Path

Select whether to specify the file by selecting from the drop-down menu or manually by mapping.

Choose your OneDrive location

Select the location where the file is located.

  • My Drive — to download the file from your drive or a drive available to you.

  • Site's Drive — to download the file from the SharePoint Site that has been followed by the signed-in user.

  • Group's Drive — to download the file from the drive of the selected group.

Enable to Enter a Drive ID

Select the Yes option to choose the drive where the file is located.

Drive ID

Select or map the ID of the drive where the file is located. If left empty, the item will be moved within the same OneDrive.

File Path / File ID

Enter (map) the ID or select the file you want to retrieve details for.

Convert to PDF

Converts the downloaded file from a supported file type to PDF. Supported file types: csv, doc, docx, odp, ods, odt, pot, potm, potx, pps, ppsx, ppsxm, ppt, pptm, pptx, rtf, xls, xlsx

Upload a File

Uploads a file to the specified location.

Enter

Select whether to specify the target folder by ID or by a path.

Choose your OneDrive location

Select the target folder location where you want to upload a file.

  • My Drive — to upload the file to your drive or a drive available to you.

  • Site's Drive — to upload the file to the SharePoint site that has been followed by the signed-in user.

  • Group's Drive — to upload the file to the drive of the selected group.

Enable to Enter a Drive ID

Select the Yes option to choose the drive where you want to upload the file.

Drive ID

Select or map the ID of the drive where you want to upload the file. If left empty, the item will be moved within the same OneDrive.

Folder

Select the target folder where you want to upload the file.

Source File

Map the file you want to upload from the previous module (e.g., HTTP > Get a File or Google Drive > Download a File), or enter the file name and file data manually.

If a File with the Same Name Exists

Select how to proceed if a file with the same name already exists.

Description

Add the description to the uploaded file.

Create a Folder

Creates a new folder in the specified location.

Choose your OneDrive location

Select the target folder location where you want to create a folder.

  • My Drive — to create the folder at your drive or a drive available to you.

  • Site's Drive — to create the folder at the SharePoint site that have been followed by the signed-in user.

  • Group's Drive — to create the folder at the drive of the selected group.

Enable to Enter a Drive ID

Select the Yes option to choose the drive where you want to upload the file.

Drive ID

Select or map the ID of the drive where you want to create the folder. If left empty, the item will be moved within the same OneDrive.

New Folder Name

Enter the name for the new folder.

If a Folder with the Same Name Exists

Select how to proceed if a folder with the same name already exists.

Returns a share link for the specified file.

Enter

Select whether to specify the file by ID or by a path.

Enter a File ID / Enter a File Path

Select whether to specify the file by selecting from the drop-down menu or manually by mapping.

Choose your OneDrive location

Select the location where the file is located.

  • My Drive — to get a share link to the file from your drive or a drive available to you.

  • Site's Drive — to get a share link to the file from the SharePoint Site that has been followed by the signed-in user.

  • Group's Drive — to get a share link to the file from the drive of the selected group.

Enable to Enter a Drive ID

Select the Yes option to choose the drive where the file is located.

Drive ID

Select or map the ID of the drive where the file is located. If left empty, the item will be moved within the same OneDrive.

File Path / File ID

Enter (map) the ID, or select the file you want to get the share link for.

Permission Type

Select the permission for the share link:

  • Only Read — Creates a read-only link to the file.

  • Read and Write — Creates a read-write link to the file.

Scope

Select the scope of the link to create.

Move a File/Folder

Moves a file or folder to another location.

From:

Enter

Select whether to specify the file or folder by ID or by a path.

Enter a File ID / Enter a File Path

Select whether to specify the file by selecting from the drop-down menu or manually by mapping.

Choose your OneDrive location

Select the location where is the file located.

  • My Drive — to move the file from your drive or a drive available to you.

  • Site's Drive — to move the file from the SharePoint Site that has been followed by the signed-in user.

  • Group's Drive — to move the file from the drive of the selected group.

Enable to Enter a Drive ID

Select the Yes option to choose the drive where the file is located.

Drive ID

Select or map the ID of the drive where the file is located. If left empty, the item will be moved within the same OneDrive.

Select File/Folder

Select whether you want to move the folder or path.

File path/Folder path File ID/Folder ID

Select or enter (map) the ID or path of the file or folder you want to move.

To:

Enter a New Folder Location

Select whether to specify the file or folder by ID or by a path.

New OneDrive Location

Select the location where you want to move a file or folder to.

  • My Drive — to move to your drive or a drive available to you.

  • Site's Drive — to move to the SharePoint Site that has been followed by the signed-in user.

  • Group's Drive — to move to the drive of the selected group.

Drive ID

Select the drive you want to move the file to.

The item cannot be moved between OneDrives, except in the following cases:

  • My Drive -> My Drive,Site's Drive,Group's Drive

  • Site's Drive -> Same drive in the same site

  • Group's Drive -> Same drive in the same group

Folder ID

Enter (map) or select the target folder you want to move the file or folder to.

Copy a File

Copies a file to another location.

From:

Enter

Select whether to specify the file by ID or by a path.

Enter a File ID / Enter a File Path

Select whether to specify the file by selecting from the drop-down menu or manually by mapping.

Choose your OneDrive location

Select the location where is the file located.

  • My Drive — to copy the file from your drive or a drive available to you.

  • Site's Drive — to copy the file from the SharePoint Site that has been followed by the signed-in user.

  • Group's Drive — to copy the file from the drive of the selected group.

Enable to Enter a Drive ID

Select the Yes option to choose the drive where the file is located.

Drive ID

Select or map the ID of the drive where the file is located. If left empty, the item will be moved within the same OneDrive.

File File ID

Select or map the ID of the file you want to copy.

To:

Enter a New Folder Location

Select whether to specify the file or folder by ID or by a path.

Drive ID

Select the drive where to copy the file.

The item cannot be moved between OneDrives, except in the following cases:

  • My Drive -> My Drive,Site's Drive,Group's Drive

  • Site's Drive -> Same drive in the same site

  • Group's Drive -> Same drive in the same group

Folder ID

Folder

Enter (map) or select the target folder you want to copy the file or folder to.

New Copied File Name

Enter the new file name, including extension if you want to change the name of the copied file.

Delete a File/Folder

Deletes a file or folder.

Enter

Select whether to specify the file or folder by ID or by the path.

Enter a File ID/Folder Path

Enter a File ID/Folder ID

Select whether to specify the file or folder by selecting from the drop-down menu or manually by mapping.

Choose your OneDrive location

Select the location where is the file located.

  • My Drive — to delete the file from your drive or a drive available to you.

  • Site's Drive — to delete the file from the SharePoint Site that has been followed by the signed-in user.

  • Group's Drive — to delete the file from the drive of the selected group.

Enable to Enter a Drive ID

Select the Yes option to choose also the drive where the file is located.

Drive ID

Select or map the ID of the drive where the file is located. If left empty, the item will be moved within the same OneDrive.

Select File/Folder

Select whether you want to delete the folder or path.

Folder

File

Select or enter (map) the ID or path of the file or folder you want to delete.

Make an API Call

Allows you to perform a custom API call.

URL

Enter a path relative to https://graph.microsoft.com

For example: /v1.0/me/drive/root/children

For the list of available endpoints, refer to the Microsoft Graph REST API v1.0 reference.

Method

Select the HTTP method you want to use:

  • GET - to retrieve information for an entry.

  • POST - to create a new entry.

  • PUT - to update/replace an existing entry.

  • PATCH - to make a partial entry update.

  • DELETE - to delete an entry.

Headers

Enter the desired request headers. You don't have to add authorization headers; we've already added those for you.

Query String

Enter the request query string.

Body

Enter the body content for your API call.

Example of Use - List Files and Folders

The following API call returns all files and folder in the root of your OneDrive:

URL:

/v1.0/me/drive/root/children/

Method:

GET

61d6aad842147.png

The result can be found in the module's Output under Bundle> Body > value.

In our example, 3 items (files and folders) were returned:

61d6aad95f553.png

Change Log Between OneDrive [v2] and OneDrive [1]

New Modules:

  • Search files

  • Download a file

  • Move a file

  • Copy a file

  • Make an API call

Possible Problems

Unable to Upload or Update a File

There are several situations when uploading or updating a file may fail:

  • The uploaded file is too big and exceeds the maximum file size limit for your OneDrive plan, or you have used all of your OneDrive account's storage quota. To get more storage space, delete existing files from OneDrive, or upgrade your OneDrive account.

  • The previously selected folder, to which the file is being uploaded, no longer exists. The scenario is stopped, and you will need to select the target folder again.