---
title: "Triggers"
description: "Learn about setting up automated triggers for your Rowboat agents"
icon: "bolt"
---

## Overview

Triggers in Rowboat are automated mechanisms that activate your agents when specific events occur or conditions are met. They form the foundation of your automated workflow system, enabling your agents to respond to external events, scheduled times, and system conditions without manual intervention.



## Trigger Types

Rowboat supports three main categories of triggers, each designed for different automation scenarios:

| Trigger Type | Purpose | Execution | Use Cases |
|--------------|---------|-----------|-----------|
| **External Triggers** | Connect to external services and events | Real-time via webhooks | Slack messages, GitHub events, email processing |
| **One-Time Triggers** | Execute at specific predetermined times | Single execution at set time | Delayed responses, time-sensitive actions |
| **Recurring Triggers** | Execute on repeating schedules | Continuous via cron expressions | Daily reports, periodic maintenance, regular syncs |

---

## External Triggers (Composio Integration)

External triggers are powered by **Composio** and allow users to use triggers from across 30+ services including Slack, GitHub, Gmail, Notion, Google Calendar, and more.

<Frame>
  <img src="/docs/img/triggers-external-ui.png" className="w-full max-w-[800px] rounded-xl" alt="External Triggers UI showing available toolkits and services" />
</Frame>

### Creating External Triggers

1. **Click New External Trigger**: Start the trigger creation process
2. **Select a Toolkit**: Browse available toolkits or search for specific services
3. **Choose Trigger Type**: Select the specific trigger from available options, click configure
4. **Authenticate**: Complete OAuth2 flow or enter API keys for the selected service (your preferred method)
5. **Configure**: Set up event filters and data mapping if required
6. **Deploy**: Activate the trigger to start listening for events

### Local Setup

If you're running the open source version of Rowboat, you'll need to set up external triggers manually. In the managed version, this is all handled automatically for you.

<Steps>
  <Step title="Create a Composio project">
    Sign into [Composio](https://composio.dev/) and create a new project for your Rowboat instance.
  </Step>

  <Step title="Get your Composio API key">
    Go to your project settings and copy the project API key. Export it in your Rowboat environment:
    
    ```bash
    export COMPOSIO_API_KEY=your-composio-api-key
    ```
  </Step>

  <Step title="Expose your Rowboat port">
    Use ngrok to expose your local Rowboat instance:
    
    ```bash
    ngrok http 3000
    ```
    
    Copy the generated ngrok URL (e.g., `https://a5fe8c0d45b8.ngrok-free.app`).
  </Step>

  <Step title="Configure webhook URL">
    In Composio, go to Events & Triggers section and set the Trigger Webhook URL to:
    
    ```
    {ngrok_url}/api/composio/webhook
    ```
    
    Example: `https://a5fe8c0d45b8.ngrok-free.app/api/composio/webhook`
  </Step>

  <Step title="Set webhook secret">
    Copy the Webhook Secret from Composio and export it in Rowboat:
    
    ```bash
    export COMPOSIO_TRIGGERS_WEBHOOK_SECRET=your-webhook-secret
    ```
  </Step>

  <Step title="Restart Rowboat">
    Restart your Rowboat instance to load the new environment variables. You're now ready to use external triggers!
  </Step>
</Steps>

<Note>Make sure your Rowboat assistant is deployed before receiving trigger calls</Note>

---

## One-Time Triggers (Scheduled Jobs)

One-time triggers execute your agents at a specific, predetermined time. They're useful for delayed responses, batch processing, time-sensitive actions, or coordinating with external schedules.

<Frame>
  <img src="/docs/img/triggers-onetime-ui.png" className="w-full max-w-[800px] rounded-xl" alt="One-Time Triggers UI showing scheduled job configuration" />
</Frame>

### Creating One-Time Triggers
1. Set the exact execution time (date and time)
2. Configure the input messages for your agents
3. Deploy to schedule the execution

---

## Recurring Triggers (Cron-based Jobs)

Recurring triggers execute your agents on a repeating schedule using cron expressions. They're ideal for daily reports, periodic maintenance, regular data syncs, and continuous monitoring tasks.

<Frame>
  <img src="/docs/img/triggers-recurring-ui.png" className="w-full max-w-[800px] rounded-xl" alt="Recurring Triggers UI showing cron-based job configuration" />
</Frame>

### Creating Recurring Triggers
1. Define the cron expression (e.g., `0 9 * * *` for daily at 9 AM)
2. Configure the recurring message structure
3. Enable the trigger to start the recurring schedule

### Common Cron Patterns
```cron
0 9 * * *     # Daily at 9:00 AM
0 8 * * 1     # Every Monday at 8:00 AM
*/15 * * * *  # Every 15 minutes
0 0 1 * *     # First day of month at midnight
```

