OneDrive
1. Connect
Connect like Microsoft Outlook: Apps → OneDrive → Sign in. Blokkio asks for
Files.ReadWrite (your own files), User.Read and offline_access. For Bring your own app registration, add the
delegated permission Files.ReadWrite.
Files and folders are identified by ID. root is the top of your OneDrive. Use Search files or List folder to
find IDs.
Actions
| Action | What it does |
|---|---|
| List folder | Files and folders in a folder (default the top). Reads every page of a large folder, up to the step's Max pages (10 pages of Per page items unless you change it); the output is items and pages. |
| Search files | By name and content, across your OneDrive and files shared with you. Reads every page of results, up to the step's Max pages (10 pages of Per page results unless you change it); the output is items and pages. |
| Get file details | Name, size, type, dates, link and folder. |
| Download file | The file's content as a file for other blocks, with its OneDrive name. Up to 250 MB. |
| Upload file | Uploads a file from another block into a folder, up to 250 MB, streamed. Name defaults to the file's name; choose whether to keep both, replace or fail when the name exists. |
| Create folder | Renamed automatically if the name exists. |
| Create sharing link | A view or edit link for anyone or for your organisation (whatever your organisation allows). |
| Share with people | Invites email addresses to view or edit, optionally with an email and message. |
| Delete file or folder | Moves it to the recycle bin. |
Files shared with you and SharePoint document libraries aren't covered by Files.ReadWrite.
Triggers
Use them with the App Trigger node. A trigger checks the app at its polling interval (the shortest allowed depends on your plan, see Plans and limits) and starts one run per new item, oldest first. The first check after you publish only records what already exists, so only items created after that start runs. Each run gets the item as $trigger (for example {{ $trigger.id }}).
| Trigger | Key | What starts a run | Inputs (required) | Output |
|---|---|---|---|---|
| New file in folder | new_file | Files added to a folder (subfolders are skipped), from the 200 most recently changed items. | Folder ID (root by default) | id, name, size, webUrl, createdDateTime, file.mimeType |