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
- A OneDrive account — you can create one at onedrive.live.com.
Connecting OneDrive to Integromat
After you click the Continue button, Integromat will redirect you to the OneDrive website, where you will be prompted to grant Integromat access to your account.
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.
Connection | Establish a connection to your OneDrive account. |
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.
|
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 Integromat will return during one execution cycle. |
Search Files/Folders
Returns files, folders, or both based on search settings.
Connection | Establish a connection to your OneDrive account. |
Choose your OneDrive location | Select the location you want to retrieve items from.
|
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 Integromat will return during one execution cycle. |
Get a File
Retrieve file details.
Connection | Establish a connection to your OneDrive account. |
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.
|
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.
Connection | Establish a connection to your OneDrive account. |
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.
|
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.
Connection | Establish a connection to your OneDrive account. |
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.
|
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.
Connection | Establish a connection to your OneDrive account. |
Choose your OneDrive location | Select the target folder location where you want to create a folder.
|
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. |
Get a Share Link
Returns a share link for the specified file.
Connection | Establish a connection to your OneDrive account. |
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.
|
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:
|
Scope | Select the scope of the link to create. |
Move a File/Folder
Moves a file or folder to another location.
Connection | Establish a connection to your OneDrive account. |
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.
|
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.
|
Drive ID | Select the drive you want to move the file to. The item cannot be moved between OneDrives, except in the following cases:
|
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.
Connection | Establish a connection to your OneDrive account. |
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.
|
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:
|
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.
Connection | Establish a connection to your OneDrive account. |
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.
|
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.
Connection | Establish a connection to your OneDrive account. |
URL | Enter a path relative to 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 POST PUT PATCH DELETE |
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
The result can be found in the module's Output under Bundle > Body > value.
In our example, 3 items (files and folders) were returned:
Change Log Between OneDrive [v2] and OneDrive [1]
- 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.