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

# Workflows

> Build AI-powered automations that run multi-step tasks on your behalf

Workflows let you create AI agents that handle complex, multi-step work automatically. Define what you want done, add the tools and context the AI needs, and let it run—on a schedule or whenever you trigger it.

## What can workflows do?

A workflow is basically an instruction manual for an AI coworker. You describe the goal, list the steps, and the AI figures out how to execute each one. Some examples:

* **Weekly reports**: Pull data from connected apps, summarize it, post to a project channel
* **Content pipelines**: Research a topic, draft an article, create social posts
* **Customer follow-ups**: Check for new support tickets, draft responses, flag urgent ones
* **Code reviews**: Scan recent commits, note potential issues, create tasks for fixes

The AI can use any tools you've connected—GitHub, Gmail, Slack, Shopify, and dozens more.

## Creating a workflow

<Steps>
  <Step title="Create a workflow page">
    In any project's Resources section, click **+ New** and select **Workflow**.
  </Step>

  <Step title="Write your goal">
    Describe what you want the workflow to accomplish. Be specific—the clearer you are, the better the results.
  </Step>

  <Step title="Add steps">
    List the steps as a numbered list. Each step should be a single action the AI can complete.
  </Step>

  <Step title="Connect integrations">
    If your workflow needs external tools (GitHub, email, etc.), add them from the configuration panel.
  </Step>

  <Step title="Add context">
    Include any pages, files, or background info the AI should reference while working.
  </Step>
</Steps>

## Anatomy of a workflow

A workflow page has three main parts:

### Configuration block

At the top of the page, you'll see settings for:

| Setting          | What it controls                                                   |
| ---------------- | ------------------------------------------------------------------ |
| **AI model**     | Which AI model runs the workflow (affects speed and quality)       |
| **Schedule**     | When to run automatically (manual, hourly, daily, weekly, monthly) |
| **Integrations** | Which connected apps the workflow can use                          |

### Goal section

A plain-language description of what the workflow should accomplish. Write this like you're explaining the task to a new team member.

**Good goal:**

> Check our GitHub repository for any open PRs older than 3 days. For each one, post a reminder in the #dev channel asking the author to address it or close it.

**Vague goal:**

> Help with GitHub PRs.

### Steps section

A numbered list of actions. Each step should be:

* **Specific**: One clear action
* **Achievable**: Something the AI can actually do with available tools
* **Sequential**: Order matters—later steps can depend on earlier ones

```markdown theme={null}
1. Fetch all open pull requests from the main repository
2. Filter to PRs that have been open more than 3 days
3. For each PR, look up the author's Slack handle
4. Post a message in #dev tagging the author with a link to their PR
5. Create a summary of all PRs you messaged about
```

## Running workflows

### Manual runs

Click the **Run** button in the workflow header to start immediately. You'll see real-time progress as the AI works through each step.

### Scheduled runs

Set a schedule in the configuration block:

| Schedule    | When it runs                                |
| ----------- | ------------------------------------------- |
| **Hourly**  | Every hour on the hour                      |
| **Daily**   | Once per day (you pick the time)            |
| **Weekly**  | Once per week (you pick the day and time)   |
| **Monthly** | Once per month (you pick the date and time) |

Scheduled workflows run automatically. You'll see results in the workflow's run history.

## Watching a workflow run

When a workflow executes, you can watch it in real time:

* **Step timeline**: See which step is currently running
* **Tool calls**: Watch the AI interact with connected apps
* **Progress indicators**: Track completion percentage
* **Token usage**: Monitor how much AI capacity the run uses

The AI shows its work—you can see exactly what it's doing at each step.

## Review gates

Sometimes you don't want the AI to barrel through every step without checking in. Add review gates to pause execution and wait for your approval.

### How review gates work

1. The workflow runs until it hits a review gate
2. Execution pauses and you get a notification
3. You review what the AI has done so far
4. Choose to **approve** (continue), **reject** (stop), or **regenerate** (try again with feedback)

### When to use review gates

* Before sending external communications
* Before making changes that are hard to undo
* When the AI needs to make judgment calls
* For high-stakes steps where you want human oversight

<Info>
  Review gates are optional. Simple, low-risk workflows often don't need them.
</Info>

## Workflow results

After a workflow completes, you get:

* **Output summary**: What the workflow accomplished
* **Tool call log**: Every action taken, with parameters and results
* **Resources created**: Any tasks, pages, or other items the workflow made
* **Run duration**: How long execution took
* **Token usage**: AI capacity consumed

All runs are saved in the workflow's history, so you can review past executions anytime.

## Integrations in workflows

Workflows become much more powerful when connected to external tools. When you add an integration, the AI can:

| Integration | What workflows can do                                |
| ----------- | ---------------------------------------------------- |
| **GitHub**  | Read/create issues, PRs, comments, check repo status |
| **Gmail**   | Send emails, search inbox, draft replies             |
| **Slack**   | Post messages, read channels, send DMs               |
| **Linear**  | Create/update issues, manage projects                |
| **Shopify** | Check orders, update products, manage inventory      |

<Card title="Set up integrations" icon="plug" href="/settings/integrations">
  Connect apps to enable them in workflows.
</Card>

## What workflows create

Workflows can generate resources as they run:

* **Tasks**: Create task records for follow-up work
* **Pages**: Generate documents with findings or reports
* **Messages**: Post updates to project channels
* **Calendar events**: Schedule meetings or reminders

These show up in your workspace like any other resource, tagged with which workflow created them.

## Troubleshooting workflows

<AccordionGroup>
  <Accordion title="Workflow fails at a specific step">
    Check the error message in the run log. Common causes:

    * Missing integration permissions
    * API rate limits on connected services
    * Step instructions that are unclear or impossible

    Try rephrasing the step or checking your integration connections.
  </Accordion>

  <Accordion title="Results aren't what I expected">
    The AI interprets your instructions, so vague goals lead to unpredictable results. Review your goal and steps:

    * Is each step specific enough?
    * Did you provide enough context?
    * Are there edge cases you didn't account for?
  </Accordion>

  <Accordion title="Workflow runs too slowly">
    Complex workflows with many steps take time. To speed things up:

    * Combine steps that can be done together
    * Use a faster AI model for simple tasks
    * Remove unnecessary steps
  </Accordion>

  <Accordion title="Scheduled workflow didn't run">
    Check that:

    * The schedule is set correctly in configuration
    * The workflow isn't paused
    * There are no integration connection issues
  </Accordion>
</AccordionGroup>

## Tips for better workflows

<AccordionGroup>
  <Accordion title="Start simple, then expand">
    Build a basic version first and make sure it works. Add complexity gradually—it's easier to debug a simple workflow than a complex one.
  </Accordion>

  <Accordion title="Be specific in your steps">
    "Check GitHub for issues" is vague. "Fetch open issues labeled 'bug' from the acme/api repository" is specific.
  </Accordion>

  <Accordion title="Test before scheduling">
    Run the workflow manually a few times before setting up automated scheduling. Make sure it behaves the way you expect.
  </Accordion>

  <Accordion title="Use review gates for risky steps">
    Any step that sends external communications or makes permanent changes should probably have a review gate.
  </Accordion>

  <Accordion title="Add context generously">
    The more relevant context you provide (pages, examples, background info), the better the AI can execute your instructions.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="AI capabilities" icon="wand-magic-sparkles" href="/ai-coworkers/ai-capabilities">
    See everything AI coworkers can do.
  </Card>

  <Card title="Integrations" icon="plug" href="/settings/integrations">
    Connect external apps for workflows.
  </Card>
</CardGroup>
