BillixDOCS
Background AgentsTriggers

Event Triggers

Run agents when something happens in connected services

1 min read
Documentation

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:

  1. Event occurs in a connected service (new email arrives)
  2. Billix detects the event via our integration
  3. Agent runs immediately with event details
  4. You're notified based on your settings

Available Events

Events depend on which integrations you have connected:

Gmail Events

EventTriggers When
New email receivedAny new email arrives
Email from contactEmail from specific sender
Email with labelEmail receives specific label

Google Calendar Events

EventTriggers When
Event createdNew calendar event added
Event starting soonEvent starts in X minutes
Event updatedCalendar event modified

Slack Events

EventTriggers When
Message in channelNew message posted
Direct messageDM received
MentionYou're @mentioned

GitHub Events

EventTriggers When
PushCode pushed to repository
Pull requestPR opened, closed, or updated
IssueIssue created or updated
CommentNew comment on PR or issue

Notion Events

EventTriggers When
Page createdNew page added
Page updatedExisting page modified
Database entryNew 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: URGENT

GitHub Filters

Service: GitHub
Event: Pull request
Filters:
  - Repository: my-org/main-repo
  - Action: opened
  - Base branch: main

Slack Filters

Service: Slack
Event: Message
Filters:
  - Channel: #support
  - Contains: help OR question

Accessing 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 received

GitHub 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/Issue

Slack Event Data

{{event.user}}       - Who sent the message
{{event.channel}}    - Channel name
{{event.text}}       - Message content
{{event.timestamp}}  - When sent

Example 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 attention

GitHub 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 engineer

Meeting 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 meeting

Support 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 Linear

Event 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:

  1. Go to agent detail page
  2. Click "History" tab
  3. See all runs with trigger source
  4. Filter by "Event triggers"

Each run shows:

  • Which event triggered it
  • Event payload/details
  • Processing time
  • Result/output

Common Questions

Next Steps

Was this page helpful? Let us know!

Report an issue

On this page