mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-22 14:48:13 +00:00
Update triggers docs (#3678)
* docs: introduce triggers list & triggers run command * docs: add KO triggers docs
This commit is contained in:
@@ -51,16 +51,25 @@ class GmailProcessingCrew:
|
||||
)
|
||||
```
|
||||
|
||||
The Gmail payload will be available via the standard context mechanisms. See the payload samples repository for structure and fields.
|
||||
The Gmail payload will be available via the standard context mechanisms.
|
||||
|
||||
### Sample payloads & crews
|
||||
### Testing Locally
|
||||
|
||||
The [CrewAI AMP Trigger Examples repository](https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/gmail) includes:
|
||||
Test your Gmail trigger integration locally using the CrewAI CLI:
|
||||
|
||||
- `new-email-payload-1.json` / `new-email-payload-2.json` — production-style new message alerts with matching crews in `new-email-crew.py`
|
||||
- `thread-updated-sample-1.json` — follow-up messages on an existing thread, processed by `gmail-alert-crew.py`
|
||||
```bash
|
||||
# View all available triggers
|
||||
crewai triggers list
|
||||
|
||||
Use these samples to validate your parsing logic locally before wiring the trigger to your live Gmail accounts.
|
||||
# Simulate a Gmail trigger with realistic payload
|
||||
crewai triggers run gmail/new_email
|
||||
```
|
||||
|
||||
The `crewai triggers run` command will execute your crew with a complete Gmail payload, allowing you to test your parsing logic before deployment.
|
||||
|
||||
<Warning>
|
||||
Use `crewai triggers run gmail/new_email` (not `crewai run`) to simulate trigger execution during development. After deployment, your crew will automatically receive the trigger payload.
|
||||
</Warning>
|
||||
|
||||
## Monitoring Executions
|
||||
|
||||
@@ -70,16 +79,10 @@ Track history and performance of triggered runs:
|
||||
<img src="/images/enterprise/list-executions.png" alt="List of executions triggered by automation" />
|
||||
</Frame>
|
||||
|
||||
## Payload Reference
|
||||
|
||||
See the sample payloads and field descriptions:
|
||||
|
||||
<Card title="Gmail samples in Trigger Examples Repo" href="https://github.com/crewAIInc/crewai-enterprise-trigger-examples/tree/main/gmail" icon="envelopes-bulk">
|
||||
Gmail samples in Trigger Examples Repo
|
||||
</Card>
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- Ensure Gmail is connected in Tools & Integrations
|
||||
- Verify the Gmail Trigger is enabled on the Triggers tab
|
||||
- Test locally with `crewai triggers run gmail/new_email` to see the exact payload structure
|
||||
- Check the execution logs and confirm the payload is passed as `crewai_trigger_payload`
|
||||
- Remember: use `crewai triggers run` (not `crewai run`) to simulate trigger execution
|
||||
|
||||
Reference in New Issue
Block a user