Microsoft OneDrive Component

Interact with files and drives inside your Microsoft OneDrive tenant
Component key: ms-onedrive#
DescriptionMicrosoft One Drive is a file hosting service that allows you to collaborate and share files with your team members.
#
Microsoft OneDrive Connections#
OAuth 2.0Input | Default | Notes |
---|---|---|
Input Authorize URL string / Required | Default https://login.microsoftonline.com/common/oauth2/v2.0/authorize | Notes The OAuth 2.0 Authorization URL for Microsoft One Drive |
Input Client ID string / Required | Default | Notes Generate this value when you create your Active Directory App |
Input Client Secret password / Required | Default | Notes Generate this value when you create your Active Directory App |
Input Scopes string Hidden Field | Default https://graph.microsoft.com/Files.Read https://graph.microsoft.com/Files.ReadWrite https://graph.microsoft.com/Sites.ReadWrite.All offline_access | Notes Microsoft One Drive permission scopes are set on the OAuth application |
Input Token URL string / Required | Default https://login.microsoftonline.com/common/oauth2/v2.0/token | Notes The OAuth 2.0 Token URL for Microsoft One Drive |
#
Data Sources#
Files in DirectoryA picklist of files in a given directory | key: listFilesInDirectory | type: picklist
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Directory string / Required | Notes Provide the directory of the file. If you want to access the root, just supply a forward slash. | Example /myFolder/examples |
#
Actions#
Delete FileDelete the information and metadata of a file by path | key: deleteFile
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Drive string / Required | Notes Provide an identifier for the drive. This value can either be an id or label. | Example 084903745 |
Input Item Id string / Required | Notes Provide an Id for for the item. | Example 084903745 |
#
Download FileDownload a file from the current user's drive | key: downloadFile
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input File Location string / Required | Notes Provide a leading slash followed by the location of your file within the current user's drive. | Example /folder1/myExampleFile.csv |
Input Timeout string | Notes The amount of time the client will await a response. | Example 3000 |
#
Get DriveGet the information and metadata of a drive | key: getDrive
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Drive string / Required | Notes Provide an identifier for the drive. This value can either be an id or label. | Example 084903745 |
#
Get ItemReturns the information and metadata of an existing item | key: getItemById
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Drive string / Required | Notes Provide an identifier for the drive. This value can either be an id or label. | Example 084903745 |
Input Item Id string / Required | Notes Provide an Id for for the item. | Example 084903745 |
#
Get Item by PathGet the information and metadata of an item with your path in Sharepoint | key: getItem
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input File Location string / Required | Notes Provide a leading slash, followed by the location and name of your file. | Example /folder1/myFile.txt |
#
Get SiteGet the information and metadata of a given Site | key: getSite
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Site string / Required | Notes Provide an Id for the site. | Example 084903745 |
#
List ChildrenReturns all child elements on a given drive item | key: listChildren
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Drive string / Required | Notes Provide an identifier for the drive. This value can either be an id or label. | Example 084903745 |
Input Item Id string / Required | Notes Provide an Id for for the item. | Example 084903745 |
Input Page Limit string | Notes Enter a number amount for the page size. | Example 100 |
Input Page Token string | Notes Enter the token for the desired page. | Example X%2744537079ghv |
#
List Drives By GroupReturns a list of all drives available to the given group | key: listDrivesByGroup
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Group string / Required | Notes Provide an Id for the group. | Example 084903745 |
Input Page Limit string | Notes Enter a number amount for the page size. | Example 100 |
Input Page Token string | Notes Enter the token for the desired page. | Example X%2744537079ghv |
#
List Drives By SiteReturns a list of all drives available to the given site | key: listDrivesBySite
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Page Limit string | Notes Enter a number amount for the page size. | Example 100 |
Input Page Token string | Notes Enter the token for the desired page. | Example X%2744537079ghv |
Input Site string / Required | Notes Provide an Id for the site. | Example 084903745 |
#
List Drives By UserReturns a list of all drives available to the given user | key: listDrivesByUser
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Page Limit string | Notes Enter a number amount for the page size. | Example 100 |
Input Page Token string | Notes Enter the token for the desired page. | Example X%2744537079ghv |
Input User string / Required | Notes Provide a value for the desired user. This value can be an email, id, or label. | Example someone@example.com |
#
List Files Shared With MeReturns all files shared with your account | key: listSharedFiles
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Page Limit string | Notes Enter a number amount for the page size. | Example 100 |
Input Page Token string | Notes Enter the token for the desired page. | Example X%2744537079ghv |
#
Output Example Payload{ "data": { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(driveItem)", "value": [ { "@odata.type": "#microsoft.graph.driveItem", "createdDateTime": "2021-03-06T19:25:37.131Z", "id": "EXAMPLE", "lastModifiedDateTime": "2021-03-06T19:25:37.131Z", "name": "My Document.docx", "webUrl": "https://my-endpoint.sharepoint.com/personal/my_friend_email_com/_layouts/Doc.aspx?sourcedoc=%7B7847AF9A-D834-4899-BCFF-B53E6CB3EB8A%7D&file=Document%20-%20Copy.docx&action=default&mobileredirect=true", "size": 10484, "createdBy": { "user": { "email": "my_friend@email.com", "displayName": "My Friend" } }, "lastModifiedBy": { "user": { "email": "my_friend@email.com", "displayName": "My Friend" } }, "file": { "mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document" }, "fileSystemInfo": { "createdDateTime": "2021-03-06T19:25:37.131Z", "lastModifiedDateTime": "2021-03-06T19:25:37.131Z" }, "remoteItem": { "createdDateTime": "2021-03-06T19:25:37.131Z", "id": "EXAMPLE", "lastModifiedDateTime": "2021-03-06T19:25:37.131Z", "name": "My Document.docx", "size": 10484, "webDavUrl": "https://my-endpoint.sharepoint.com/personal/my_friend_email_com/Documents/My%20Document.docx", "webUrl": "https://my-endpoint.sharepoint.com/personal/my_friend_email_com/_layouts/Doc.aspx?sourcedoc=%7B7847AF9A-D834-4899-BCFF-B53E6CB3EB8A%7D&file=Document%20-%20Copy.docx&action=default&mobileredirect=true", "createdBy": { "user": { "email": "my_friend@email.com", "displayName": "My Friend" } }, "file": { "mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document" }, "fileSystemInfo": { "createdDateTime": "2021-03-06T19:25:37.131Z", "lastModifiedDateTime": "2021-03-06T19:25:37.131Z" }, "lastModifiedBy": { "user": { "email": "my_friend@email.com", "displayName": "My Friend" } }, "parentReference": { "driveId": "EXAMPLE", "driveType": "business", "id": "EXAMPLE" }, "shared": { "scope": "users", "sharedDateTime": "2021-03-06T19:25:37.131Z", "sharedBy": { "user": { "email": "my_friend@email.com", "displayName": "My Friend" } } }, "sharepointIds": { "listId": "00000000-00000000-00000000-00000000", "listItemId": "3", "listItemUniqueId": "00000000-00000000-00000000-00000000", "siteId": "00000000-00000000-00000000-00000000", "siteUrl": "https://my-endpoint.sharepoint.com/personal/my_friend_email_com", "tenantId": "00000000-00000000-00000000-00000000", "webId": "00000000-00000000-00000000-00000000" } } } ] }}
#
List GroupsReturns a list of all groups the user has access to | key: listGroups
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Page Limit string | Notes Enter a number amount for the page size. | Example 100 |
Input Page Token string | Notes Enter the token for the desired page. | Example X%2744537079ghv |
#
List Items In DirectoryReturns a list of all items in the given directory | key: listDriveItems
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Directory string / Required | Notes Provide the directory of the file. If you want to access the root, just supply a forward slash. | Example /myFolder/examples |
Input Page Limit string | Notes Enter a number amount for the page size. | Example 100 |
Input Page Token string | Notes Enter the token for the desired page. | Example X%2744537079ghv |
#
List My DrivesReturns a list of all drives available to the current user | key: listDrives
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Page Limit string | Notes Enter a number amount for the page size. | Example 100 |
Input Page Token string | Notes Enter the token for the desired page. | Example X%2744537079ghv |
#
List SitesReturns a list of all sites available to the current user | key: listSites
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Page Limit string | Notes Enter a number amount for the page size. | Example 100 |
Input Page Token string | Notes Enter the token for the desired page. | Example X%2744537079ghv |
#
Move FileMove the given file to a new location | key: moveFile
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Current Location string / Required | Notes Provide a leading slash, followed by the location and name of the file | Example /myFile.txt |
Input New File Name string / Required | Notes Provide a new name for the given file. | Example myNewFile.txt |
Input New Location string / Required | Notes Provide a leading slash, followed by the new location of the file. | Example /myfiles/myfile.txt |
#
Raw RequestIssue a raw HTTP request with the configured connection | key: rawRequest
Input | Default | Notes | Example |
---|---|---|---|
Input Connection connection / Required | Default | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Data string | Default | Notes The HTTP body payload to send to the URL. Must be a string or a reference to output from a previous step. | Example {"exampleKey": "Example Data"} |
Input Debug Request boolean | Default false | Notes Enabling this flag will log out the current request. | Example |
Input File Data string Key Value List | Default | Notes File Data to be sent as a multipart form upload. | Example [{key: "example.txt", value: "My File Contents"}] |
Input Form Data string Key Value List | Default | Notes The Form Data to be sent as a multipart form upload. | Example [{"key": "Example Key", "value": new Buffer("Hello World")}] |
Input Header string Key Value List | Default | Notes A list of headers to send with the request. | Example User-Agent: curl/7.64.1 |
Input Max Retry Count string | Default 0 | Notes The maximum number of retries to attempt. | Example |
Input Method string | Default | Notes | Example |
Input Query Parameter string Key Value List | Default | Notes A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2. | Example |
Input Response Type string | Default json | Notes The type of data you expect in the response. You can request json, text, or binary data. | Example binary |
Input Retry Delay (ms) string | Default 0 | Notes The delay in milliseconds between retries. | Example |
Input Retry On All Errors boolean | Default false | Notes If true, retries on all erroneous responses regardless of type. | Example |
Input Timeout string | Default | Notes The maximum time that a client will await a response to its request | Example 2000 |
Input URL string / Required | Default | Notes This is the URL to call. | Example /sobjects/Account |
Input Use Exponential Backoff boolean | Default false | Notes Specifies whether to use a pre-defined exponential backoff strategy for retries. | Example |
#
Search DriveSearch the current drive for a string of text | key: searchDrive
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input Search string / Required | Notes Provide a text to search the current drive with. | Example myFile |
#
Search UsersFind the information and metadata of an existing user | key: searchUser
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input User string / Required | Notes Provide a value for the desired user. This value can be an email, id, or label. | Example someone@example.com |
#
Update FileUpdate the information and metadata of a given file | key: updateFile
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input File Location string / Required | Notes Provide a leading slash, followed by the location and name of the file. | Example /folder1/myFile.txt |
Input New File Name string | Notes Provide a new name for the given file. | Example exampleFile |
Input New File Path string | Notes Enter a path to the desired sharepoint resource. You do not need to include the root directory. | Example /myfiles/myfile.txt |
Input Optional Values string Key Value List | Notes Provide optional key-value pairs to be used in the request body. | Example |
#
Upload FileUpload a file to the user's connected drive | key: uploadFile
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes Supply the desired connection for Microsoft One Drive | Example |
Input File Data data / Required | Notes Provide a value for the file. | Example |
Input File Location string / Required | Notes Provide a leading slash, followed by the location and name of the new file. | Example /folder1/myNewFile.csv |
Input Timeout string | Notes The amount of time the client will await a response. | Example 3000 |