> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://ref.scoutos.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://ref.scoutos.com/_mcp/server.

# List all triggers

GET https://api.scoutos.com/v2/triggers

All apis and effects are injected into every endpoint
via request.context. The request_context() utility can be used
to get Intellisense type-completion

Reference: https://ref.scoutos.com/api-sdk/endpoints/triggers/list

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `action_type` (enum, optional, nullable) — Filter by action type
  - Allowed values: `workflow.execute`, `source.sync`, `agent.execute`
- `workflow_id` (string, optional, nullable) — Filter by workflow ID

## Response

### 200

Successful Response

- `data` (list of Trigger, optional)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### Trigger

- `trigger_config` (TriggerTriggerConfig, required)
- `organization_id` (string, required)
- `trigger_id` (string, required)
- `last_updated_at` (datetime, required)
- `created_at` (datetime, required)
- `revision_id` (string, required)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### TriggerTriggerConfig

- SlackTriggerConfig: SlackTriggerConfig-Output
- TelegramTriggerConfig: TelegramTriggerConfig
- CronTriggerConfig: CronTriggerConfig

### ValidationErrorLocItems

- string
- integer

### SlackTriggerConfig-Output

- `action` (SlackTriggerConfigOutputAction, required)
- `trigger_display_name` ("When message is sent to Slack Channel", optional)
- `trigger_type` ("slack.message", optional)
- `status` (enum, optional)
  - Allowed values: `active`, `inactive`
- `run_conditions` (Rules-Output, optional)

### TelegramTriggerConfig

- `action` (TelegramTriggerConfigAction, required)
- `trigger_display_name` (string, optional, nullable)
- `trigger_type` ("telegram.message", optional)
- `status` (enum, optional)
  - Allowed values: `active`, `inactive`
- `connection_id` (string, optional, default: )

### CronTriggerConfig

- `action` (CronTriggerConfigAction, required)
- `cron_expression` (string, required)
- `trigger_display_name` (string, optional, nullable)
- `trigger_type` ("cron", optional)
- `status` (enum, optional)
  - Allowed values: `active`, `inactive`
- `timezone` (string, optional, default: UTC)
- `trigger_inputs` (map from string to any, optional)

### SlackTriggerConfigOutputAction

- WorkflowExecute: WorkflowExecute
- SourceSync: SourceSync
- AgentExecute: AgentExecute

### Rules-Output

- `rules` (list of Rule, optional)

### TelegramTriggerConfigAction

- WorkflowExecute: WorkflowExecute
- SourceSync: SourceSync
- AgentExecute: AgentExecute

### CronTriggerConfigAction

- WorkflowExecute: WorkflowExecute
- SourceSync: SourceSync
- AgentExecute: AgentExecute

### WorkflowExecute

- `workflow_id` (string, required)
- `action_type` ("workflow.execute", optional)

### SourceSync

- `sync_id` (string, required)
- `action_type` ("source.sync", optional)

### AgentExecute

- `agent_id` (string, required)
- `action_type` ("agent.execute", optional)
- `additional_instructions` (string, optional, nullable)
- `respond_if_prompt` (string, optional, nullable)
- `include_thread_context` (boolean, optional, default: true)

### Rule

- `conditions` (list of Condition, required)

### Condition

- `field` (enum, required)
  - Allowed values: `channel_id`, `team_id`, `user_id`, `thread_id`, `user_message`, `is_first_message_in_thread`, `channel_name`, `bot_is_mentioned`, `is_bot_message`
- `operator` (enum, required)
  - Allowed values: `Any Of`, `None Of`, `Is true`, `Is false`, `Is null`, `Is not null`, `Contains Any Of`, `Contains None Of`
- `value` (list of string, required)

## Examples

**Response**

```json
{
  "data": [
    {
      "trigger_config": {
        "trigger_display_name": "When message is sent to Slack Channel",
        "trigger_type": "slack.message",
        "action": {
          "action_type": "workflow.execute",
          "workflow_id": "a1b2c3d4-e5f6-7890-ab12-cd34ef56gh78"
        },
        "status": "active",
        "run_conditions": {
          "rules": [
            {
              "conditions": [
                {
                  "field": "channel_id",
                  "operator": "Any Of",
                  "value": [
                    "C1234567890"
                  ]
                }
              ]
            }
          ]
        }
      },
      "organization_id": "org_9876543210",
      "trigger_id": "trg_1234567890abcdef",
      "last_updated_at": "2024-01-15T09:30:00Z",
      "created_at": "2024-01-15T09:30:00Z",
      "revision_id": "rev_20240115_01"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.scoutos.com/v2/triggers"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```typescript
import { ScoutClient } from "scoutos";

const client = new ScoutClient({ apiKey: "YOUR_API_KEY" });
await client.triggers.list({
    action_type: "workflow.execute",
    workflow_id: "workflow_id"
});

```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.scoutos.com/v2/triggers"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.scoutos.com/v2/triggers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.scoutos.com/v2/triggers")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.scoutos.com/v2/triggers', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.scoutos.com/v2/triggers");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.scoutos.com/v2/triggers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```