Microsoft OneDrive Spoke
Automate file and folder management and collaboration in Microsoft OneDrive. Adds Microsoft OneDrive data to your ServiceNow instance.
Request apps on the Store
Visit the ServiceNow Store website to view all the available apps and for information about submitting requests to the store. For cumulative release notes information for all released apps, see the ServiceNow Store version history release notes.
Integration Hub subscription
This spoke requires an Integration Hub subscription. For more information, see Legal schedules - IntegrationHub overview.
Spoke version
Microsoft OneDrive spoke v2.9.0 is the latest version.
Spoke dependencies
If you’re having trouble installing the app, ensure that these dependent plugins are installed:
- ServiceNow IntegrationHub Action Step - REST (com.glide.hub.action_step.rest)
- ServiceNow IntegrationHub Runtime (com.glide.hub.integration.runtime)
Supported versions
API version v1.
Spoke flows
The Microsoft OneDrive spoke gives sample flows in the draft state to demonstrate automating Microsoft OneDrive tasks. To customize a sample flow, copy it to a new application scope. Available sample flows include:
| Flow | Description |
|---|---|
| Renew Subscriptions | Renews the expired subscriptions by updating the expiration date of the subscription. |
Spoke subflows
The Microsoft OneDrive spoke provides sample subflows in the draft state to demonstrate automating Microsoft OneDrive tasks. To customize a sample subflow, copy it to a new application scope. Available sample subflows include:
| Subflow | Description |
|---|---|
| Download New OneDrive File to Servicenow | Downloads the new files uploaded in a resource to a ServiceNow record |
| Subscribe to Webhook | Subscribes a listener application to receive notifications when data changes. |
| Sync Changes | Tracks changes to a drive and its children over time. |
| Get Document Latest URL | Gets the latest path of a file in OneDrive using the Sys ID of the document as an input. To use this subflow, a corresponding OneDrive connection and credential must be created, and a OneDrive authorization token should be available. |
| Reconnect Document from Microsoft OneDrive | Gets the latest web URL and webdav URL of a document from the Microsoft OneDrive by using the Document Sys ID, Provider Detail Sys ID, Target Table Name, Target Table Sys ID, and the Document Name. To use this subflow, a corresponding OneDrive connection and credential must be created, and a OneDrive authorization token must be available. |
Spoke actions
The Microsoft OneDrive spoke provides actions to automate Microsoft OneDrive tasks when events occur in ServiceNow. Available actions include:
| Category | Action | Description |
|---|---|---|
| Drive Management | Look up Drive Info | Gets the metadata of a specific Microsoft OneDrive drive |
| Folder Management | Move File Or Folder Item | Moves a file or folder in Microsoft OneDrive to the target location. |
| Create Folder | Creates a folder in Microsoft OneDrive. | |
| Update File Or Folder Name | Updates the name for a file or folder item by ID. | |
| Delete File Or Folder Item | Deletes a file or folder from Microsoft OneDrive. | |
| File Management | Check In File | Checks in a drive item and sends a sharing invitation. When you check in a file, other users can access the checked-in file. |
| Check Out File | Checks out a drive item from OneDrive. When you check out a drive item, other users cannot edit the document. Other users also cannot see the changes that you made in the document until you check in the document. | |
| Copy OneDrive File to Attachment | Copies a file in Microsoft OneDrive to an attachment in a record in a ServiceNow record. | |
| Copy Attachment to OneDrive | Copies an attachment record in ServiceNow to Microsoft OneDrive | |
| Copy File Or Folder Item | Asynchronously creates a copy of a Microsoft OneDrive item (including children), under a new parent item or with a new name. | |
| Look up Items | Retrieves a list of drive items from a path or the source and source ID of a drive item. | |
| Look up File Or Folder Item Info By ID | Gets file metadata information from the file or folder ID in Microsoft OneDrive. |
|
| Look up File Or Folder Item Info By Path | Gets file metadata information from the file path in Microsoft OneDrive. | |
| Copy Attachment To OneDrive Using Path | Copies an attachment record in ServiceNow to OneDrive. | |
| Copy OneDrive File To Attachment Using File Path | Copies a file using its path in OneDrive to an attachment in a record in ServiceNow. | |
| Copy OneDrive File Version To Attachment | Copies a file in OneDrive to an attachment in a record in ServiceNow. | |
| Delete Version of a File | Deletes the specified version of a file from OneDrive. | |
| Look up All Versions of a File | Retrieves all the versions a file in OneDrive. | |
| Restore File Version | Restores the specified file version and make this version the latest. | |
| Upload and Replace File | Uploads the updated version of an existing file or replaces the existing file
with a new file. Note: The maximum size of the file cannot exceed 4
MB. |
|
| Search Documents | Search Files or Folder Items | Searches the drive items (files or folders) based on metadata attributes such as the item name. |
| Document Sharing | Add Collaborator | Adds a collaborator and their permissions to a file or a folder. You can identify the collaborator by their Azure AD Alias or an Object ID. |
| Look up Collaborators | Lists all the collaborator details associated with a file or folder in Microsoft OneDrive. | |
| Remove Collaborator | Removes a collaborator from a file or folder in Microsoft OneDrive. | |
| Permission Management | Add Permission | Sends a sharing invitation for a drive item. A sharing invitation allows the recipients to access the drive item and optionally sends them an email with a sharing link. |
| Create Sharing Link | Creates a sharing link which allows you to share a drive item with other users. | |
| Delete Permission | Removes access to a drive item. | |
| Look up Permissions | Retrieves the sharing permissions of a drive item. | |
| Update Permission | Updates the expiration date of the subscription. | |
| Webhook Management | Subscribe Webhook | Creates a subscription that sends notifications when data changes. |
| Unsubscribe Webhook | Deletes the specified subscription ID. | |
| Get SyncToken for Subscription | Retrieves the latest sync token for the specified subscription ID. | |
| Look up Subscriptions | Retrieves the list of active subscriptions. | |
| Renew Subscription | Updates the expiration date of the subscription. | |
| Sync Changes | Tracks changes to a drive and drive's children over time. |
Available AI agents
Install Now Assist for Integration Hub and start using the available AI agents. For more information, see Now Assist for Integration Hub.
- In the ServiceNow agentic system, you can create an agentic workflow that comprises of a set of large language model (LLM) instructions along with one or more standalone AI agents to execute an
objective. See Create an agentic workflow for information about adding AI agents to create agentic workflows as per your requirement and provide the required trigger.
You can also search for other available AI agents and add them to your agentic workflow. See Find AI agents for more information.
- You can create a clone of the required spoke AI agent and customize it as per your requirement. See Duplicate an AI agent for more information about creating a clone.
- See Now Assist AI agents for information about AI agents.
| AI Agent | Description |
|---|---|
| Microsoft OneDrive sharing management AI agent | Adds or removes a collaborator and manages their permissions for a file or folder in Microsoft OneDrive. Also, lists all the collaborator details associated with a file or folder. |
| Microsoft OneDrive drive management AI agent | Retrieves the metadata of a specific drive in Microsoft OneDrive. |
| Microsoft OneDrive file management AI agent | Manages files, file versions, and attachments in Microsoft OneDrive. Also, retrieves details of the required file. |
| Microsoft OneDrive folder management AI agent | Manages folders in Microsoft OneDrive. |
| Microsoft OneDrive permission management AI agent | Creates sharing link for a drive item and manages permissions. |
- There might be AI agents installed with the Now Assist application that are not used in agentic workflows. To learn how to see all agents that are available on your instance, see Find AI agents.
- To find agents that might not be installed on your instance, visit the AI Agent Marketplace on the ServiceNow Store.
Spoke module
Bi-directional webhooks can be set up to get notifications about the required events. Routing policy defines conditions that must be met to notify the ServiceNow app. These conditions are based on the events in OneDrive that you want to be notified about. When the conditions are met, a routing policy triggers the associated subflow, which in turn automates the OneDrive tasks.
The bi-directional webhooks require separate setup and can be used independently without using the spoke actions. By default, the OneDrive Webhooks application is available in the OneDrive spoke and has the following modules:
| Module | Description |
|---|---|
| OneDrive SyncToken | Enables you to view SyncTokens of OneDrive. |
| OneDrive Webhook Registries | Enables you to create and view the OneDrive webhooks in ServiceNow. |
| OneDrive Webhook Routing Policy | Enables you to create and view the routing policies for the OneDrive webhooks in ServiceNow. You can also customize the conditions in the routing policies as per your requirement. |
OneDrive Online account requirements
The Microsoft OneDrive spoke requires a custom app that you create in Microsoft Azure.
Connection and credential alias requirements
Integration Hub uses aliases to manage connection and credential information, and OAuth credentials. Using an alias eliminates the need to configure multiple credentials and connection information profiles when using multiple environments. If the connection or credential information changes, you don't need to update any actions that use the connection.
- Single tenant
- The OneDrive spoke includes the OneDrive alias record to authorize actions on Microsoft OneDrive. Select this alias in the Tenant record to authorize changes in Microsoft OneDrive for a single tenant.
For information about setting up the spoke, see Set up Microsoft OneDrive spoke.
MID Server requirements
These actions use REST calls that can run either on an instance or, optionally, through a MID Server. Use the connection record associated with the Microsoft OneDrive alias to configure where actions run and, if needed, specify MID Server selection attributes. For more information, see MID server.
To set up the MID Server for this spoke, see Set up MID Server for a spoke.