OneDrive Trigger
Overview
Seção intitulada “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.
Enabling the OneDrive Trigger
Seção intitulada “Enabling the OneDrive Trigger”- Open your deployment in CrewAI AMP
- Go to the Triggers tab
- Locate OneDrive and switch the toggle to enable
Example: Audit file permissions
Seção intitulada “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.
Testando Localmente
Seção intitulada “Testando Localmente”Teste sua integração de trigger do OneDrive localmente usando a CLI da CrewAI:
# Visualize todos os triggers disponíveiscrewai triggers list
# Simule um trigger do OneDrive com payload realistacrewai triggers run microsoft_onedrive/file_changedO comando crewai triggers run executará sua crew com um payload completo do OneDrive, permitindo que você teste sua lógica de parsing antes do deployment.
Troubleshooting
Seção intitulada “Troubleshooting”- Ensure the connected account has permission to read the file metadata included in the webhook
- Teste localmente com
crewai triggers run microsoft_onedrive/file_changedpara ver a estrutura exata do payload - 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
- Lembre-se: use
crewai triggers run(nãocrewai run) para simular execução de trigger