Event Triggers
Run agents when something happens in connected services
Event triggers let your agent respond to real-time events in your connected services—new emails, calendar updates, GitHub activity, and more.
How Event Triggers Work
Unlike schedule triggers (which run at specific times), event triggers run immediately when something happens:
- Event occurs in a connected service (new email arrives)
- Billix detects the event via our integration
- Agent runs immediately with event details
- You're notified based on your settings
Available Events
Events depend on which integrations you have connected:
Gmail Events
| Event | Triggers When |
|---|---|
| New email received | Any new email arrives |
| Email from contact | Email from specific sender |
| Email with label | Email receives specific label |
Google Calendar Events
| Event | Triggers When |
|---|---|
| Event created | New calendar event added |
| Event starting soon | Event starts in X minutes |
| Event updated | Calendar event modified |
Slack Events
| Event | Triggers When |
|---|---|
| Message in channel | New message posted |
| Direct message | DM received |
| Mention | You're @mentioned |
GitHub Events
| Event | Triggers When |
|---|---|
| Push | Code pushed to repository |
| Pull request | PR opened, closed, or updated |
| Issue | Issue created or updated |
| Comment | New comment on PR or issue |
Notion Events
| Event | Triggers When |
|---|---|
| Page created | New page added |
| Page updated | Existing page modified |
| Database entry | New item in database |
Setting Up Event Triggers
Connect the Integration
First, ensure the relevant service is connected in Settings → Integrations.
Open Agent Settings
Go to your agent and click "Edit" or create a new agent.
Select Event Trigger
Choose "Event" as the trigger type.
Choose Service and Event
Select the connected service and specific event:
- Service: Gmail
- Event: New email received
Add Filters (Optional)
Narrow down when the agent runs:
- Only from specific senders
- Only with certain subjects
- Only in specific channels
Save and Activate
The agent will now run whenever that event occurs.
Event Filters
Use filters to run your agent only for specific events:
Email Filters
Service: Gmail
Event: New email
Filters:
- From contains: @important-client.com
- Subject contains: URGENTGitHub Filters
Service: GitHub
Event: Pull request
Filters:
- Repository: my-org/main-repo
- Action: opened
- Base branch: mainSlack Filters
Service: Slack
Event: Message
Filters:
- Channel: #support
- Contains: help OR questionAccessing Event Data
Event details are available in your agent's instructions:
Email Event Data
{{event.from}} - Sender email
{{event.subject}} - Email subject
{{event.body}} - Email content
{{event.date}} - When receivedGitHub Event Data
{{event.action}} - What happened (opened, closed)
{{event.title}} - PR/Issue title
{{event.body}} - Description
{{event.author}} - Who created it
{{event.url}} - Link to PR/IssueSlack Event Data
{{event.user}} - Who sent the message
{{event.channel}} - Channel name
{{event.text}} - Message content
{{event.timestamp}} - When sentExample Event-Driven Agents
Email Auto-Responder
Trigger: Gmail - New email received
Filter: From VIP clients list
Instructions:
1. Read the incoming email from {{event.from}}
2. Analyze the content: {{event.body}}
3. If it's a simple question, draft a response
4. Save draft for my review
5. Notify me on Slack that a VIP email needs attentionGitHub PR Reviewer
Trigger: GitHub - Pull request opened
Filter: Repository: company/main-app
Instructions:
1. Read the PR: {{event.title}}
2. Analyze the changes described in {{event.body}}
3. Check if it follows our PR template
4. Post a comment with initial review notes
5. If it's a large PR (>500 lines), tag lead engineerMeeting Prep Assistant
Trigger: Google Calendar - Event starting in 30 minutes
Filter: Events with "Client" in title
Instructions:
1. Get meeting details: {{event.title}} with {{event.attendees}}
2. Search Gmail for recent emails with attendees
3. Check Notion for client notes
4. Compile a brief for me
5. Send to my email 20 minutes before the meetingSupport Ticket Responder
Trigger: Slack - Message in #support channel
Filter: Contains "help" or "issue"
Instructions:
1. Read the support request: {{event.text}}
2. Search our knowledge base for relevant solutions
3. Post a helpful response in the thread
4. If unresolved, create a ticket in LinearEvent Processing
Deduplication
Billix prevents duplicate processing:
- Same event won't trigger multiple times
- Events are tracked by unique ID
- Retry logic handles temporary failures
Rate Limiting
For high-volume events:
- Events queue if they arrive faster than processing
- Maximum queue depth varies by plan
- Oldest events processed first
Latency
Event processing times vary:
- Gmail events: 30 seconds - 2 minutes
- Slack events: Near real-time
- GitHub webhooks: Near real-time
- Calendar events: 1-5 minutes
Combining with Other Triggers
An agent can have both event and schedule triggers:
Agent: Important Email Handler
Trigger 1: Event - Gmail new email (real-time processing)
Trigger 2: Schedule - Daily at 6 PM (end-of-day summary)
Instructions handle both scenarios based on trigger type.Monitoring Event Triggers
View event activity:
- Go to agent detail page
- Click "History" tab
- See all runs with trigger source
- Filter by "Event triggers"
Each run shows:
- Which event triggered it
- Event payload/details
- Processing time
- Result/output
Common Questions
Next Steps
- Review schedule triggers
- Set up webhook triggers
- Learn monitoring agents
Was this page helpful? Let us know!
Report an issue