File Change

trigger.onedrive_event
TriggerFiles & storageconnection requiredruns in-engine

Creates a Microsoft Graph subscription on a drive's root folder on publish, renews it before it expires, and starts one run per notification.

Start a run when anything changes in a OneDrive folder hierarchy.

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": "…"}
Resolved by
config.connection_id, else node.connection_id
Note
The delegated token needs Files.Read (personal OneDrive) or Files.Read.All (OneDrive for Business) — Graph refuses a subscription created with a write-only scope. Publishing also needs MANTLE_APP_PUBLIC_BASE_URL set to an https URL Graph can reach and validate: it POSTs a validationToken there before it will create the subscription.

Configuration

3 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
drive_id
The drive to watch, subscribing to /drives/{drive-id}/root. Leave blank for the connected user's own OneDrive (/me/drive/root). Read when the workflow is published, so it cannot be an expression.
stringNo———
user_id
Watch a named user's own OneDrive instead (/users/{user-id}/drive/root). Ignored when drive_id is set, and only usable by a credential that may read that user's drive.
stringNo———
change_types
Which changes to subscribe to. Graph accepts created, updated and deleted; OneDrive reports content changes anywhere under the folder as updated.
arrayNo["updated"]1–3 characters; array of string—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "change_types": [
    "updated"
  ]
}

Output

One shape.

onedrive change notification

What Graph sent: which subscription, which folder, and when the subscription expires. Not what changed — read the drive's delta feed for that.

FieldTypeExample
notification_id
Graph's own id for this notification, which its reference documents as optional — OneDrive's documented delivery carries none. Empty then, and that is what makes this trigger start a run per delivery instead of deduplicating.
string—
subscription_id
The subscription that raised the notification. One per published workflow, so this is constant for the life of the trigger.
stringA640DFF3-0429-44FC-AF7E-30523A476864
resource
The drive folder the subscription watches, e.g. /me/drive/root — the folder something under changed, not the thing that changed.
string/me/drive/root
change_type
created, updated or deleted, when Graph sends one. OneDrive's own documented notification does not, so treat an empty value as normal.
stringupdated
tenant_id
The Microsoft Entra tenant the change happened in, when Graph sends it.
string84bd8158-6d4d-4958-8b9f-9d6445542f95
subscription_expires_at
When the subscription itself expires, as Graph sent it. Mantle renews it automatically; this is here so a workflow can alert if it ever stops moving.
string2026-10-05T16:00:00Z
resource_id
The changed item's id, for the resources that send resourceData. OneDrive does not — expect this to be empty and read the drive's delta feed instead.
string—
resource_etag
The changed item's ETag, on the same terms as resource_id.
string—
payload
The notification exactly as Graph sent it, minus clientState — that value is the shared secret this delivery was verified with and never leaves the SecretBroker.
object—
{
  "change_type": "updated",
  "notification_id": "",
  "payload": {
    "expirationDateTime": "2026-10-05T16:00:00Z",
    "resource": "/me/drive/root",
    "subscriptionId": "A640DFF3-0429-44FC-AF7E-30523A476864"
  },
  "resource": "/me/drive/root",
  "resource_etag": "",
  "resource_id": "",
  "subscription_expires_at": "2026-10-05T16:00:00Z",
  "subscription_id": "A640DFF3-0429-44FC-AF7E-30523A476864",
  "tenant_id": "84bd8158-6d4d-4958-8b9f-9d6445542f95"
}

Notes

  • A notification says only that something under the folder changed. Follow this trigger with a delta or list step against the same drive to find out what — Microsoft's own guidance, and the reason the emitted shape carries no file.
  • On OneDrive for Business you can subscribe to the root folder only; on a personal OneDrive the root covers everything below it either way.
  • The subscription expires within 30 days and is renewed automatically by the scheduler's renewal sweep, in place, keeping its id and secret.
  • Graph does not sign a basic notification. Each delivery is checked against the clientState Graph replays in the body, compared in constant time; anyone holding that value could have written the body.
  • OneDrive coalesces: 'you can receive multiple notifications for the same user before you have processed the first'. Graph gives such a delivery no id, so Mantle starts a run for each rather than risk dropping a real change — make the workflow safe to run twice.

See File Change 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.