OneDrive
Browse, get by path, search, download to a directory, upload up to 250 MB, folders, rename/move/copy (agents, folder allowlist), sharing links, invites and deletes node only, download URLs never shown to agents
About
A Graphrt plugin for the signed-in user's OneDrive (personal or OneDrive for Business) through Microsoft Graph v1.0: browse folders, get items by id or path, search, download into a directory, upload up to 250 MB, create folders, rename, move and copy, read sharing, and (workflow nodes only) create sharing links, invite people and delete.
What it can do
- Browse: get_drive (quota), list_drives, list_root_children, list_children, get_item, get_item_by_path (e.g. Documents/q3.pdf), search (names, metadata and content)
- Content: download_item (into $ONEDRIVE_DOWNLOAD_DIR, up to 250 MB), upload_file (https URL or a local file inside $ONEDRIVE_UPLOAD_DIR, up to 250 MB, replace, rename or fail on a name conflict)
- Write: create_folder, update_item (rename, description, move), copy_item (asynchronous: Graph answers 202)
- Sharing: list_permissions, create_sharing_link and invite (node only)
- Remove: delete_item (node only, to the recycle bin)
- api_request: any other Graph endpoint (GET only for agents)
Actions
Each action is a step you can add to a workflow. Agents can also use most of them as tools.
- Get drive
onedrive.get_drive - List drives
onedrive.list_drives - List root
onedrive.list_root_children - List folder
onedrive.list_children - Get item
onedrive.get_item - Get item by path
onedrive.get_item_by_path - Search
onedrive.search - List sharing
onedrive.list_permissions - Upload file
onedrive.upload_file - Create folder
onedrive.create_folder
Show all 17 actions
- Rename or move
onedrive.update_item - Copy item
onedrive.copy_item - Create sharing link
onedrive.create_sharing_link - Share with people
onedrive.invite - Delete item
onedrive.delete_item - Download file
onedrive.download_item - Microsoft Graph request
onedrive.api_request
Settings
Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.
-
MICROSOFT_CLIENT_IDDelegated refresh-token grant -
MICROSOFT_TENANT_IDTenant id or domain for single-tenant apps, default common (consumers for personal-only apps) -
ONEDRIVE_DOWNLOAD_DIRAbsolute directory for download_item -
ONEDRIVE_UPLOAD_DIRDirectory upload_file may read local files from (https URLs work without it) -
ONEDRIVE_TOOL_FOLDER_ALLOWLISTComma-separated folder item ids agent tools may put items into besides root (* = any folder) -
MICROSOFT_CLIENT_SECRET -
MICROSOFT_REFRESH_TOKEN -
ONEDRIVE_TOOL_TOKEN_SOURCE
How to use it
In Graphrt Desktop
- Open Plugins and search for OneDrive.
- Click Install and approve it.
- Follow the setup steps on the plugin's page, then paste the settings it needs.
- Describe a job that needs it, and the builder adds the steps.
With the CLI
$ graphrt plugin install onedrive - id: report
type: onedrive.get_item_by_path
item_path: Documents/Reports/q3.pdf
- id: file
type: onedrive.download_item
item_id: "{{#report.data.id#}}"