Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@
"/core/agent-skills"
]
},
{
"group": "Triggers",
"icon": "bolt",
"pages": [
"/triggers/main",
"/triggers/schedule",
"/triggers/slack",
"/triggers/webhook"
]
},
{
"group": "Troubleshooting",
"icon": "question-circle",
Expand Down
Binary file added docs/images/triggers/execution_logs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/slack/12_enable_url.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/slack/13_paste_url.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/slack/15_invite_bot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/slack/16_send_chat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/slack/1_create_app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/slack/2_basic_info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/slack/3_oauth_scopes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/slack/4_install_app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/slack/6_get_bottoken.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/slack/7_select_slack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/slack/8_enter_creds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/slack/9_listen_events.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/task_queue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/webhook/1_select_webhook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/webhook/2_request_types.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/webhook/3_webhook_config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/triggers/webhook/7_task_running.png
59 changes: 59 additions & 0 deletions docs/triggers/main.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
title: Triggers Overview
description: Learn how to automate your workflows with different trigger types in Eigent.
icon: bolt
---

Triggers are events that automatically start your workflows. Instead of manually initiating tasks, you can configure triggers to run workflows based on schedules, external events, or incoming data.

## How Triggers Work

When a trigger fires, it creates a task that enters the task queue. Workers then pick up and execute these tasks according to their configured capabilities and availability.

![Task Queue showing a triggered task labeled "say hi" with "Splitting Tasks" option visible](/docs/images/triggers/task_queue.png)

### Key Concepts

- **Trigger**: An event source that initiates workflows
- **Task**: A unit of work created when a trigger fires
- **Execution**: The actual running of a task by a worker
- **Queue**: Tasks waiting to be processed

## Execution Monitoring

Once a trigger fires and creates a task, you can monitor its execution through the logs. Each execution is tracked with timestamps, status, and duration.

![Execution logs showing "my webhook" trigger with 1 total run, 100% success rate, and execution history with timestamps and durations](/docs/images/triggers/execution_logs.png)

The execution logs display:

- Total number of runs
- Success rate percentage
- Individual execution status (in progress, completed, cancelled)
- Execution timestamps
- Duration of each run

## Trigger Types

Eigent supports multiple trigger types to integrate with your existing tools and workflows:

<CardGroup cols={2}>
<Card title="Schedule" icon="clock" href="/triggers/schedule">
Run workflows at specific times or intervals. Supports one-time, daily, weekly, and monthly schedules with customizable time settings.
</Card>
<Card title="Slack" icon="slack" href="/triggers/slack">
Trigger workflows from Slack messages, app mentions, and direct messages. Perfect for team collaboration and support workflows.
</Card>
<Card title="Webhook" icon="webhook" href="/triggers/webhook">
Receive HTTP requests from external services via unique URLs. Integrate with any service that supports webhooks.
</Card>
</CardGroup>

## Best Practices

- **Schedule triggers**: Use for recurring tasks like daily reports, periodic data sync, or routine maintenance
- **Slack triggers**: Ideal for team collaboration, customer support, and human-in-the-loop workflows
- **Webhook triggers**: Perfect for integrating with external systems, CI/CD pipelines, and third-party services
- Monitor execution logs regularly to ensure triggers are firing correctly
- Set appropriate max failure counts to prevent runaway triggers
- Use filters and validation to ensure only relevant events trigger your workflows
97 changes: 97 additions & 0 deletions docs/triggers/schedule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
title: Schedule Trigger
description: Automate recurring workflows with flexible scheduling options including one-time, daily, weekly, and monthly schedules.
icon: clock
---

Schedule triggers allow you to run workflows automatically at specified times or intervals. This is ideal for recurring tasks like daily reports, periodic data synchronization, or routine maintenance.

## Setting Up a Schedule Trigger

### Step 1: Select Schedule Trigger Type

Create a new trigger and select "Schedule" from the trigger type options. You'll see two main tabs: "Schedule" and "App Trigger" - make sure Schedule is selected.

![Schedule trigger configuration modal showing Schedule tab selected with One Time, Daily, Weekly, and Monthly frequency options](/docs/images/triggers/schedule/Screenshot%202026-03-05%20054330.png)

### Step 2: Choose Schedule Frequency

Select your desired frequency from the available options:

- **One Time**: Run once at a specific date and time
- **Daily**: Run every day at the specified time
- **Weekly**: Run on specific days of the week
- **Monthly**: Run on a specific day of each month

### Step 3: Configure Date and Time

Set the specific date, hour, and minute for your trigger:

- **Date**: Select the start date (format: mm/dd/yyyy)
- **Hour**: Choose the hour (00-23)
- **Minute**: Choose the minute (00-59)

You can also set an optional **Expiration Date** if you want the trigger to stop running after a specific date.

### Step 4: Preview Scheduled Times

Before creating the trigger, expand the "Preview Scheduled Times" section to see exactly when your trigger will run in the upcoming days.

![Preview section showing upcoming execution times like "March 6, 2026 at 5:41 AM GMT+3" for the next 5 days](/docs/images/triggers/schedule/Screenshot%202026-03-05%20054354.png)

This helps verify your schedule is configured correctly.

### Step 5: Set Failure Threshold

Configure the **Max Failure Count** (default: 5) - this is the number of consecutive failures before the trigger is automatically disabled. This safety feature prevents problematic triggers from running indefinitely.

## Schedule Types

### One Time

Run the workflow once at a specific date and time. Perfect for scheduled maintenance or one-off tasks.

### Daily

Run the workflow every day at the same time. Configure:

- Date: When to start
- Hour and Minute: What time to run

### Weekly

Run the workflow on specific days of the week. Configure:

- Select multiple days (Sun, Mon, Tue, Wed, Thur, Fri, Sat)
- Set the time (Hour and Minute)

![Weekly schedule configuration showing day selector with Monday highlighted](/docs/images/triggers/schedule/Screenshot%202026-03-05%20054418.png)

### Monthly

Run the workflow on a specific day of each month. Configure:

- Day of Month: Select from 1st to 31st
- Set the time (Hour and Minute)

![Monthly schedule configuration showing "Day of Month" dropdown with 1st selected](/docs/images/triggers/schedule/Screenshot%202026-03-05%20054441.png)

<Note>
If the selected day doesn't exist in that month (e.g., the 31st), the task will be skipped for that month.
</Note>

## Use Cases

- **Daily Reports**: Generate and send daily analytics summaries at 9 AM
- **Data Sync**: Synchronize data between systems every hour
- **Weekly Maintenance**: Run cleanup tasks every Sunday at midnight
- **Monthly Billing**: Process invoices on the 1st of each month
- **Periodic Monitoring**: Check system health every 15 minutes

## Best Practices

- Always check the "Preview Scheduled Times" to verify your schedule
- Set an expiration date for temporary or test triggers
- Use appropriate max failure counts (5 is usually sufficient)
- Consider timezone differences when scheduling for global teams
- Monitor execution logs regularly to ensure triggers run as expected
150 changes: 150 additions & 0 deletions docs/triggers/slack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
---
title: Slack Trigger
description: Trigger workflows from Slack messages, app mentions, and direct messages.
icon: slack
---

Slack triggers enable your workflows to respond to events in Slack, such as messages in channels, mentions of your bot, or direct messages. This creates seamless integration between your team communication and automated processes.

## Prerequisites

Before setting up a Slack trigger, you need to create a Slack app and obtain the necessary credentials from the [Slack API](https://api.slack.com/apps).

### Step 1: Create a Slack App

Go to Slack API Apps and click "Create New App". Choose "From scratch" and provide:

- **App Name**: A name for your app (e.g., "Demo")
- **Workspace**: Select the workspace where you want to install the app

![Slack API modal showing "Name app & choose workspace" with App Name field and workspace dropdown](/docs/images/triggers/slack/1_create_app.png)

### Step 2: View App Credentials

After creating the app, navigate to **Basic Information** to view your app credentials including App ID, Client ID, Client Secret, and Signing Secret.

![Slack app Basic Information page showing App Credentials section with App ID, Client ID, Client Secret, and Signing Secret](/docs/images/triggers/slack/2_basic_info.png)

### Step 3: Configure OAuth Scopes

Navigate to **OAuth & Permissions** and add the necessary bot token scopes. Click "Add an OAuth Scope" and add:

- `app_mentions:read` - View messages that directly mention your app
- `im:history` - View messages in direct messages

![OAuth & Permissions page showing Bot Token Scopes with app_mentions:read and im:history added](/docs/images/triggers/slack/3_oauth_scopes.png)

### Step 4: Install App to Workspace

Scroll down to the **OAuth Tokens** section and click "Install to Workspace" to generate your Bot User OAuth Token.

![OAuth & Permissions page with "Install to MY FIRST WORKSPACE" button visible](/docs/images/triggers/slack/4_install_app.png)

Review the permissions and click "Allow" to authorize the app.

![Slack permission approval page showing "Allow the 'Demo' app to access Slack" with workspace selection](/docs/images/triggers/slack/5_install_app_process.png)

### Step 5: Copy Bot Token

After installation, copy the **Bot User OAuth Token** (starts with `xoxb-`) - you'll need this for Eigent.

![OAuth & Permissions page showing Bot User OAuth Token with Copy button](/docs/images/triggers/slack/6_get_bottoken.png)

## Configuring the Slack Trigger in Eigent

### Step 1: Select Slack as Trigger Type

In Eigent, create a new trigger and select "App Trigger" tab, then choose "Slack" from the available apps.

![Eigent trigger modal showing App Trigger tab selected with Slack, Webhook, Lark, and Telegram options](/docs/images/triggers/slack/7_select_slack.png)

### Step 2: Enter Slack Credentials

Enter your Slack Bot Token and optionally the Slack Signing Secret (from Basic Information page) to verify requests.

![Slack Configuration section showing fields for Slack Bot Token and Slack Signing Secret with "Credentials configured successfully" message](/docs/images/triggers/slack/8_enter_creds.png)

### Step 3: Configure Event Types

Select which Slack events should trigger your workflow:

- **message** - Any message in channels the bot is in
- **app_mention** - When the bot is @mentioned

You can also configure:

- **Message Filter (Regex)**: Filter messages using regex patterns
- **Ignore Users**: Exclude specific Slack user IDs from triggering workflows

![Event Types configuration showing 2 selected events (message, app_mention) with Message Filter and Ignore Users fields](/docs/images/triggers/slack/9_listen_events.png)

### Step 4: Activate the Trigger

Save the trigger and toggle it to enabled. The trigger will show a warning icon until properly configured with Slack.

![Triggers list showing "slack trigger" with warning icon, enabled toggle, and description "search for me the weather"](/docs/images/triggers/slack/10_activate_trigger.png)

### Step 5: Configure Event Subscriptions in Slack

For real-time events, you need to enable Event Subscriptions in your Slack app:

First, edit the trigger in Eigent and copy the webhook URL:

![Edit Trigger Agent modal showing webhook URL with Copy button and "Pending Verification" warning](/docs/images/triggers/slack/11_activate_trigger_click_copy.png)

In your Slack app settings, navigate to **Event Subscriptions** and enable events:

![Slack Event Subscriptions page showing "Enable Events" toggle in Off position](/docs/images/triggers/slack/12_enable_url.png)

Paste the webhook URL in the **Request URL** field. Slack will verify the URL automatically.

![Event Subscriptions with Enable Events toggle On and Request URL showing "Verified" status](/docs/images/triggers/slack/13_paste_url.png)

### Step 6: Subscribe to Bot Events

Expand "Subscribe to bot events" and add the events you want to receive:

- `app_mention` - Subscribe to messages that mention your app
- `message.im` - Subscribe to direct messages

![Subscribe to bot events section showing app_mention and message.im events added](/docs/images/triggers/slack/14_listen_events_slack.png)

Click "Save Changes" to apply your configuration.

### Step 7: Invite Bot to Channel

In Slack, invite your bot to the channels where you want it to listen by typing `/invite @YourBotName`.

![Slack channel showing "/invite @Demo" being typed in message input with bot status "Not in channel"](/docs/images/triggers/slack/15_invite_bot.png)

## Testing Your Integration

Send a message in the configured channel or mention the bot to trigger your workflow.

![Slack channel showing user message "Hi there @Demo, what can you do?" after bot joined the channel](/docs/images/triggers/slack/16_send_chat.png)

## Available Event Types

| Event | Description | Required Scope |
| ------------------ | ------------------------------ | ----------------- |
| `app_mention` | Bot is @mentioned in a channel | app_mentions:read |
| `message.im` | New direct message to the bot | im:history |
| `message.channels` | Message in public channel | channels:history |
| `message.groups` | Message in private channel | groups:history |

## Use Cases

- **Customer Support**: Auto-respond to support requests in #help channels
- **DevOps**: Trigger deployments from Slack commands
- **HR**: Process time-off requests via Slack messages
- **Sales**: Log leads from sales channel conversations
- **IT Helpdesk**: Create tickets from IT support requests

## Best Practices

- Use specific channels rather than monitoring all channels
- Set up regex filters to avoid triggering on irrelevant messages
- Add ignore users to prevent bot loops
- Include the bot's response format in your workforce instructions
- Test thoroughly before enabling in production channels
- Use app mentions for actions requiring human confirmation
Loading
Loading