Set up a bi-directional webhook for the Microsoft OneDrive spoke

  • Rversion finale: Australia
  • Mis à jour 12 mars 2026
  • 1 minute de lecture
  • Configure a webhook to subscribe to OneDrive with a ServiceNow callback URL.

    Avant de commencer

    • Request an Integration Hub subscription.
    • Activate the Microsoft OneDrive spoke.
    • Role required: admin.

    Register a OneDrive webhook in ServiceNow

    Register a OneDrive webhook in ServiceNow to notify the ServiceNow app when certain events occur in OneDrive.

    Avant de commencer

    Role required: admin.

    Procédure

    1. Navigate to All > Microsoft OneDrive Spoke > OneDrive Webhook Registries.
    2. Click New.
    3. On the form, fill in the fields.
      Tableau 1. Microsoft OneDrive Webhook Registries
      Field Description
      Name Unique name to identify the record. For example, OneDrive webhook.
      Description Description of the record.
      Path OneDrive path. By default, this path is set to api/sn_onedrive_spoke/onedrive/subscription
      Secret Key Secret key for accessing OneDrive webhook.
      Remarque :
      The Secret Key field value is auto-populated when the webhook registry record is saved.
    4. Right-click the form header and click Save.
    5. Click CallBack URL.
      The system displays the webhook callback URL.
    6. Copy and record the webhook callback URL.

    Customize OneDrive bi-directional webhook

    Create a webhook routing policy and subflow according to your requirement.

    Avant de commencer

    Role required: admin

    Pourquoi et quand exécuter cette tâche

    Routing policies in the OneDrive Webhook Routing Policy module triggers the subflows and notifies the ServiceNow instance when certain events occur in your OneDrive account. See OneDrive spoke for information about the fields that the routing policy and subflows support.

    Procédure

    1. Navigate to All > Flow Designer > Designer.
    2. Click Subflows.
    3. Create a copy of any of the default subflows, for example, Sync Changes.
    4. Customize the subflow according to your requirement and publish it.
      See Building subflows for more information about creating and using subflows, and OneDrive spoke v1.6 for information about the supported subflows.
    5. Navigate to Microsoft OneDrive Spoke > OneDrive Webhook Routing Policy.
    6. Click New.
    7. On the form, fill in the fields.
      Tableau 2. Decision form
      Field Description
      Label Unique label to identify the routing policy.
      Default answer Option to specify if this is the default answer. The default answer is applicable when the conditions are not met.
      1. Click the lookup icon (Lookup icon).
      2. Select the required subflow from the Document list.
        Remarque :
        Ensure that the Table name is Flow [sys_hub_flow].
      Condition Conditions to be met when the required events occur in OneDrive.
      Answer Subflow which is triggered when the specified conditions are met.
    8. Click Submit.

    Résultats

    The routing policy and subflow are created.