docs/en/enterprise/guides/onedrive-trigger.mdx
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.
<Tip> Connect OneDrive in **Tools & Integrations** and toggle the trigger on for your deployment. </Tip>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.
Test your OneDrive trigger integration locally using the CrewAI CLI:
# View all available triggers
crewai triggers list
# Simulate a OneDrive trigger with realistic payload
crewai triggers run microsoft_onedrive/file_changed
The crewai triggers run command will execute your crew with a complete OneDrive payload, allowing you to test your parsing logic before deployment.
crewai triggers run microsoft_onedrive/file_changed to see the exact payload structurepermissions, confirm the site-level sharing settings allow Graph to return this fieldcrewai triggers run (not crewai run) to simulate trigger execution