Prefer not to wire triggers by hand? Describe the workflow to Cosmos Advisor instead and it wires the right trigger for you.
Trigger Types
Triggers come in three groups:- First-party integrations — GitHub, Linear, Slack, GitLab, PagerDuty. Connect the integration once from the Integrations settings page; Cosmos owns the upstream registration. PagerDuty triggers pick from the PagerDuty integrations (Events API routing keys) you’ve registered instead.
- Scheduled — a 5-field cron expression and a timezone. No payload, no filter. See Schedules.
- Webhook — any service that can POST JSON to an HTTPS URL you mint yourself. See Webhooks.
Adding a Trigger to an Expert
- Open Automations in the sidebar and click Create automation. A panel opens on the right.
- Pick the Expert you want to wire up from the Expert dropdown. (The Expert must already exist — create it from the Experts page first.)
- Under New triggers, click Add trigger and pick the type from the Choose trigger type picker, then fill in:
- Trigger name — a human-readable label (e.g.
on-pr-opened). - Event — for first-party triggers, the provider event name (see the reference below). Scheduled triggers show a Frequency builder instead — every N minutes, hourly, daily, weekly, monthly, or a custom cron expression — plus a Timezone.
- Filter — an optional JSONLogic expression evaluated against the raw event payload. The trigger fires only when this expression returns true.
- Auto-archive sessions created by this trigger — toggle off when you want to keep trigger-launched sessions accessible after they go idle (useful for revisitable agent-driven sessions like a PR-author).
- Maximum runs per minute — an optional rate limit on how often the trigger can fire.
- Trigger name — a human-readable label (e.g.
- Save. Click Add trigger again to attach more triggers to the same automation.
The trigger type is fixed once a trigger is created. To change it, delete the trigger and add a new one.
Event Type Reference
Each first-party trigger takes an Event type using the source’s native event names:| Source | Event types | Notes |
|---|---|---|
| GitHub | pull_request, pull_request_review, pull_request_review_comment, issues, issue_comment, push, check_suite, status, workflow_run, workflow_job, workflow_dispatch | GitHub webhook event names. No reaction event — GitHub doesn’t send webhooks for emoji reactions. |
| Linear | Issue, Comment, Project | Each delivers action ∈ create / update / remove in the payload — filter on it. |
| Slack | app_mention, message | An @-mention is delivered as both — always filter on event.type to avoid double-firing. |
| GitLab | gitlab.push, gitlab.tag_push, gitlab.merge_request, gitlab.issue, gitlab.note, gitlab.pipeline | A connected project registers these six by default; more are available on request. |
| PagerDuty | — | Routed by integration key, not event type. Filter on event.event_type (e.g. incident.triggered). |
Payload Filters
The Filter field on a trigger is a JSONLogic expression evaluated against the parsed JSON payload. Common examples:PagerDuty — P1 Incident Triggered
PagerDuty triggers route by integration key rather than event type. Create a PagerDuty Events API v2 integration on the relevant service, register its routing key as a PagerDuty integration in Cosmos, then pick it from the PagerDuty integration dropdown on the trigger. Use the Event dropdown (incident triggered / acknowledged / resolved) and the Filter field to match specific incidents:See Also
- Understanding Automation — how triggers, events, and Experts fit together.
- Webhooks — custom webhook URLs for everything else.
- Schedules — cron syntax, timezones, and concurrency rules.
- Managing Automations — the events log and run history.