Skip to main content

Overview

Start automations when files change inside OneDrive. You can generate audit summaries, notify security teams about external sharing, or update downstream line-of-business systems with new document metadata.
Connect OneDrive in Tools & Integrations and toggle the trigger on for your deployment.

Enabling the OneDrive Trigger

  1. Open your deployment in CrewAI AMP
  2. Go to the Triggers tab
  3. Locate OneDrive and switch the toggle to enable
Enable or disable triggers with toggle

Microsoft OneDrive trigger connection

Example: Audit file permissions

from onedrive_file_crew import OneDriveFileTrigger

crew = OneDriveFileTrigger().crew()
crew.kickoff({
    "crewai_trigger_payload": onedrive_payload,
})
The crew inspects file metadata, user activity, and permission changes to produce a compliance-friendly summary.

Sample payloads & crews

The OneDrive examples showcase how to:
  • Parse file metadata, size, and folder paths
  • Track who created and last modified the file
  • Highlight permission and external sharing changes
onedrive-file-crew.py bundles the analysis and summarization tasks so you can add remediation steps as needed.

Troubleshooting

  • Ensure the connected account has permission to read the file metadata included in the webhook
  • If the trigger fires but the payload is missing permissions, confirm the site-level sharing settings allow Graph to return this field
  • For large tenants, filter notifications upstream so the crew only runs on relevant directories