Create Sharing Link
onedrive.create_link
ActionFiles & storageconnection required
Calls the OneDrive API with the connection's credentials.
Create (or return the existing) sharing link for an item and emit the shareable URL.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- OAuth 2.0
- Providers
- OneDrive
- Secret shape
- {"client_id": "…", "client_secret": "…", "refresh_token": "…"} with the Files.ReadWrite delegated scope
- Config it needs
- tenant, drive_id
- Resolved by
- config.connection_id, else node.connection_id
Configuration
6 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
drive_id The drive to act on. Leave blank for the connected user's own OneDrive (/me/drive). A SharePoint document library's drive id also works here. | string | No | — | — | — |
item_id The driveItem id, addressing it as /drives/{drive-id}/items/{item-id}. Takes precedence over item_path when both are set. | string | No | — | — | — |
item_path The item's path inside the drive, e.g. 'Reports/Q3.xlsx', addressing it as /drives/{drive-id}/root:/Reports/Q3.xlsx. Used when item_id is blank. | string | No | — | — | — |
link_type The kind of link to create: read-only, read-write, or an embeddable link (OneDrive personal only). | string | No | view | one of "view", "edit", "embed" | — |
scope Who the link works for. Leave blank to use the organisation's default link type. | string | No | — | one of "anonymous", "organization", "users" | — |
expiration_date_time When the link stops working, as an ISO-8601 UTC timestamp, e.g. '2026-12-31T23:59:59Z'. Leave blank for no expiry. | string | No | — | iso8601 format | — |
- At least one of item_id, item_path must be set.
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"link_type": "view"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
id The permission id Graph created. | string | — |
web_url The shareable URL. | string | — |
link_type The link type Graph created. | string | — |
scope The scope the link was created with. | string | — |
roles Roles the link grants. | array | — |
{
"id": "",
"link_type": "",
"roles": [],
"scope": "",
"web_url": ""
}See Create Sharing Link run in a workflow.
In a technical demo we add the OneDrive connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.