> ## Documentation Index
> Fetch the complete documentation index at: https://docs.struct.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Auto-Investigations

> Automatically investigate alerts and issues from Slack, Linear, and Asana without manual triggers

Auto-investigations let Struct monitor your connected sources and automatically investigate new alerts, issues, or tasks—without anyone needing to @mention or assign Struct.

| Source            | Trigger                            | Scope                  |
| ----------------- | ---------------------------------- | ---------------------- |
| [Slack](#slack)   | New messages in monitored channels | Investigation channels |
| [Linear](#linear) | New issues created                 | Default team           |
| [Asana](#asana)   | New tasks created                  | Active projects        |

<Tip>
  Auto-investigations work best when combined with **keyword filtering** to focus on the alerts that matter most. See [Keyword Filtering](#keyword-filtering) below.
</Tip>

***

## Slack

Slack auto-investigation monitors messages in your configured investigation channels and uses AI classification to determine which messages warrant an investigation.

<Steps>
  <Step title="Go to Connections">
    Navigate to **Connections** and find your Slack integration
  </Step>

  <Step title="Open Manage">
    Click **Manage** on the Slack connection card
  </Step>

  <Step title="Configure investigation channels">
    Select the channels Struct should monitor for alerts (e.g., `#prod-alerts`, `#sentry-errors`)
  </Step>

  <Step title="(Optional) Add keyword filters">
    Configure include/exclude keywords to control which messages trigger investigations. See [Keyword Filtering](#keyword-filtering).
  </Step>
</Steps>

### How It Works

1. A new message arrives in a monitored investigation channel
2. If keyword filters are configured, Struct checks the message against your rules
3. If no keyword filters are set, Struct uses AI classification to determine if the message is an actionable alert
4. Qualifying messages trigger an automatic investigation

<Note>
  Struct ignores bot messages from itself and messages in threads to avoid duplicate investigations.
</Note>

***

## Linear

Linear auto-investigation monitors new issues created in your configured default team.

<Steps>
  <Step title="Go to Connections">
    Navigate to **Connections** and find your Linear integration
  </Step>

  <Step title="Open Manage">
    Click **Manage** on the Linear connection card
  </Step>

  <Step title="Select a default team">
    Choose the team whose issues Struct should monitor
  </Step>

  <Step title="Enable auto-investigation">
    Toggle **Auto-investigate new issues** on
  </Step>

  <Step title="(Optional) Add keyword filters">
    Configure include/exclude keywords to focus on specific issue types. See [Keyword Filtering](#keyword-filtering).
  </Step>
</Steps>

### How It Works

1. A new issue is created in your configured default team
2. Struct checks the issue title and description against your keyword filters (if configured)
3. If keywords match (or no keywords are set), Struct creates an investigation
4. Results are posted as a comment on the Linear issue

<Warning>
  Auto-investigation only monitors the **default team** configured in your Linear settings. Issues in other teams are not monitored.
</Warning>

***

## Asana

Asana auto-investigation monitors new tasks created in your active projects.

<Steps>
  <Step title="Go to Connections">
    Navigate to **Connections** and find your Asana integration
  </Step>

  <Step title="Open Manage">
    Click **Manage** on the Asana connection card
  </Step>

  <Step title="Select active projects">
    Choose which projects Struct should monitor
  </Step>

  <Step title="Enable auto-investigation">
    Toggle **Auto-investigate new tasks** on
  </Step>

  <Step title="(Optional) Add keyword filters">
    Configure include/exclude keywords to focus on specific task types. See [Keyword Filtering](#keyword-filtering).
  </Step>
</Steps>

### How It Works

1. A new task is created in one of your active Asana projects
2. Struct checks the task name and description against your keyword filters (if configured)
3. If keywords match (or no keywords are set), Struct creates an investigation
4. Results are posted as a comment on the Asana task

***

## Keyword Filtering

Keyword filtering gives you precise control over which messages, issues, or tasks trigger auto-investigations. When keywords are configured, they **bypass AI classification entirely**—matching is deterministic and instant.

### Include Keywords

Messages containing **any** include keyword will trigger an investigation.

```
error
OOMKilled
pod*crash
deployment failed
```

### Exclude Keywords

Messages matching **any** exclude keyword are skipped, even if they match an include keyword. Use these to filter out noise.

```
staging
test-alert
resolved
bot-message
```

### Matching Rules

| Rule               | Example Keyword | Matches                                   |
| ------------------ | --------------- | ----------------------------------------- |
| Case-insensitive   | `error`         | "Error", "ERROR", "Runtime error"         |
| Substring matching | `crash`         | "pod crash detected", "crashloop"         |
| Wildcard (`*`)     | `pod*crash`     | "pod crash", "pod-crash", "pods crashing" |
| Multiple wildcards | `*OOM*`         | "OOMKilled", "Go OOM error"               |

### How Keywords Interact

| Include Keywords | Exclude Keywords | Behavior                                                            |
| ---------------- | ---------------- | ------------------------------------------------------------------- |
| Configured       | Configured       | Must match an include keyword **and** not match any exclude keyword |
| Configured       | Not configured   | Must match at least one include keyword                             |
| Not configured   | Configured       | Investigated unless an exclude keyword matches                      |
| Not configured   | Not configured   | AI classification (Slack) or all items investigated (Linear, Asana) |

<Tip>
  When **no keywords are configured** but auto-investigation is enabled, Struct falls back to AI classification (Slack) or investigates all new items (Linear, Asana).
</Tip>

### Configuration

Keywords are configured per-source in each integration's **Manage** modal:

1. Open **Connections** → click **Manage** on the integration
2. Scroll to **Keyword Filtering**
3. Enter one keyword per line in the **Include Keywords** or **Exclude Keywords** fields
4. Save your changes

### Examples

<Tabs>
  <Tab title="Production Alerts Only">
    **Include:**

    ```
    production
    critical
    P0
    incident
    ```

    **Exclude:**

    ```
    staging
    development
    test
    ```
  </Tab>

  <Tab title="Error Monitoring">
    **Include:**

    ```
    error
    exception
    OOMKilled
    crash*
    timeout
    ```

    **Exclude:**

    ```
    resolved
    recovered
    flaky-test
    ```
  </Tab>

  <Tab title="Specific Services">
    **Include:**

    ```
    payments*
    checkout*
    auth*service
    ```

    **Exclude:**

    ```
    staging
    canary
    ```
  </Tab>
</Tabs>

***

## Best Practices

<CardGroup cols={2}>
  <Card title="Start with keywords" icon="filter">
    Begin with a few high-signal include keywords rather than monitoring everything. Expand as you gain confidence.
  </Card>

  <Card title="Use exclude keywords for noise" icon="volume-xmark">
    Filter out staging alerts, test messages, and resolved notifications to keep investigations focused.
  </Card>

  <Card title="Scope to specific teams/projects" icon="bullseye">
    For Linear and Asana, select only the teams and projects that contain actionable engineering issues.
  </Card>

  <Card title="Review and refine" icon="arrows-rotate">
    Check your investigation history periodically and adjust keywords to reduce false positives.
  </Card>
</CardGroup>

<Note>
  Need help configuring auto-investigations for your workflow? Reach out at [help@struct.ai](mailto:help@struct.ai).
</Note>
