Migrate bulk documents from microsoft oneDrive to policies in servicenow

SuganyaD
Tera Contributor
We have a requirement where client documents are stored in Microsoft OneDrive, and we need to use these documents in policies within ServiceNow. Once these policies are approved, they should be converted into knowledge articles. However, we are unsure how to bring the documents from OneDrive into ServiceNow policies. While reviewing the documentation, we noticed that certain subflows are available as part of the Microsoft OneDrive Spoke, but we are not very technical and find it difficult to understand or modify these flows. Could someone please assist us with this?
1 REPLY 1

sagnicdas
Kilo Guru

Hi @SuganyaD ,

Please check the solution mentioned below.

Step 1: Set Up the OneDrive Connection
Before you can pull documents, ServiceNow must have permission to "talk" to your OneDrive.
  1. Request Access: Ensure your System Administrator has installed the Microsoft OneDrive Spoke from the ServiceNow Store.
  2. Azure Configuration: Work with your IT team to create an OAuth application in the Microsoft Azure portal. This provides a "Client ID" and "Client Secret".
  3. Establish Connection: In ServiceNow, navigate to IntegrationHub > Connections & Credential Aliases. Select the OneDrive alias and enter the Azure credentials. Click Get OAuth Token to verify. 
 
Step 2: Connect Existing OneDrive Documents to Policies
Instead of complex custom flows, use the Policy Authoring feature to link your bulk files.
  1. Open the Policy Form: Go to Policy and Compliance > Policies and create a new record (or open an existing one).
  2. Enable Redlining: On the policy form, look for the Policy Authoring section.
  3. Connect Document: Click the Connect to Cloud button. You will be prompted to browse your OneDrive folders.
  4. Bulk Link: Select the file corresponding to that policy. For bulk migration, an admin can use a standard Import Set to create policy "shell" records first, then users can manually link them via the UI to avoid complex scripting. 
 
Step 3: Automate Policy Approval to Knowledge Articles
Once a policy is approved, ServiceNow can automatically generate a Knowledge Article so employees can read it.
  1. Triggering the Workflow: In 2026, Policy and Compliance Management includes a native "Publish to Knowledge" trigger once a policy reaches the Published state.
  2. Set Up the Flow (Low-Code):
    • Open Flow Designer and create a new Flow.
    • Trigger: When a record in the sn_compliance_policy table is updated to State = Published.
    • Action: Use the Create Record action to create a new entry in the kb_knowledge table.
    • Mapping: Map the Policy Name to the Short Description of the article and the Policy Text (or the OneDrive link) to the Article Body.
  3. Automate Publishing: Set the workflow_state of the new Knowledge Article to Published so it is immediately visible. 

    If you find the solution helpful please mark it as helpful.

    Regards,

    Sagnic