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

# Workflows

> Automate your support processes with powerful workflow automation.

<img src="https://mintcdn.com/thena-840ce5ec/fnPhXvYfm-TNmZho/images/docs/Workflows.webp?fit=max&auto=format&n=fnPhXvYfm-TNmZho&q=85&s=4a39654e783715288147fe88483e0905" alt="Workflow configuration in Thena" className="rounded-lg" width="7680" height="4800" data-path="images/docs/Workflows.webp" />

## 🔄 What's a workflow?

Workflows in Thena are powerful automation tools that help you streamline repetitive tasks, ensure consistency, and improve your team's efficiency. A workflow consists of:

* **Trigger events** that start the automation
* **Conditions** that determine when it should run
* **Activities** that perform the actual work
* **Status controls** to activate or pause automation

You can create workflows to handle everything from ticket routing and escalation to notifications and data updates across your entire support process.

<Tip>
  Start with simple workflows and gradually add complexity as your team becomes more comfortable with automation.
</Tip>

## ⚡ Trigger events

Trigger events are what kick off your workflows. Thena supports a wide range of events from both the platform and integrated applications.

### Common trigger events

<CardGroup cols={2}>
  <Card title="Ticket events" icon="ticket">
    • Ticket created<br />
    • Ticket updated<br />
    • Ticket status changed<br />
    • Ticket comment added<br />
    • Ticket assigned/reassigned
  </Card>

  <Card title="Integration events" icon="plug">
    • Slack message sent<br />
    • Email received<br />
    • Form submission<br />
    • External app events<br />
    • Scheduled/timer events
  </Card>
</CardGroup>

Whether it's a new high-priority ticket or a customer reply, events give you precise control over when automation should activate.

## 🎯 Workflow conditions

Conditions let you create smart filters that determine exactly when your workflow should run. You can build rules using any field or property available in the trigger event.

<Accordion title="Ticket properties" icon="ticket">
  Filter based on priority, status, assignee, account, custom fields, or any ticket data.
</Accordion>

<Accordion title="User attributes" icon="user">
  Target workflows based on user type, permissions, team membership, or custom properties.
</Accordion>

<Accordion title="Content analysis" icon="magnifying-glass">
  Use sentiment, keywords, or message content to trigger specialized workflows.
</Accordion>

<Accordion title="Time and context" icon="clock">
  Consider business hours, timezone, or historical data when deciding to activate.
</Accordion>

Use **match all** (AND) or **match any** (OR) logic to create precise targeting for your automation needs.

## 🛠️ Activities and actions

Activities are the actual work your workflow performs. Thena provides a rich library of built-in activities plus support for custom integrations.

### Built-in activities

<CardGroup cols={2}>
  <Card title="Ticket management" icon="list-check">
    • Create or update tickets<br />
    • Change status or priority<br />
    • Assign to agents or teams<br />
    • Add comments or notes<br />
    • Set due dates
  </Card>

  <Card title="Communication" icon="phone">
    • Send Slack notifications<br />
    • Email stakeholders<br />
    • Create announcements<br />
    • Update external systems<br />
    • Log activity
  </Card>
</CardGroup>

<CardGroup cols={2}>
  <Card title="Data operations" icon="database">
    • Update account information<br />
    • Create or modify records<br />
    • Sync with external databases<br />
    • Generate reports<br />
    • Archive data
  </Card>

  <Card title="Flow control" icon="arrow-right">
    • Add delays or wait periods<br />
    • Branch based on conditions<br />
    • Loop through data sets<br />
    • Error handling and retries<br />
    • Workflow orchestration
  </Card>
</CardGroup>

### Visual workflow builder

Create workflows using Thena's intuitive drag-and-drop interface:

* **Visual canvas** for designing workflow logic
* **Activity library** with all available actions
* **Connection lines** showing the flow between activities
* **Real-time validation** to catch configuration issues
* **Testing tools** to verify your workflow before activation

## 📋 Managing workflows

### Workflow dashboard

Your workflow dashboard gives you complete visibility and control:

<CardGroup cols={3}>
  <Card title="Active monitoring" icon="eye">
    See which workflows are running and their current status
  </Card>

  <Card title="Quick controls" icon="gear">
    Enable or disable workflows with a single click
  </Card>

  <Card title="Performance tracking" icon="chart-line">
    Monitor execution times and success rates
  </Card>
</CardGroup>

### Workflow actions

<CardGroup cols={2}>
  <Card title="View and edit" icon="pencil">
    Modify workflow logic, update conditions, or add new activities
  </Card>

  <Card title="Execution history" icon="clock">
    Review past runs, debug issues, and track performance metrics
  </Card>

  <Card title="Duplicate workflows" icon="copy">
    Clone existing workflows as templates for new automation
  </Card>

  <Card title="Version control" icon="git">
    Track changes and roll back to previous versions when needed
  </Card>
</CardGroup>

## 🔗 Integration and automation

Workflows integrate seamlessly with your existing tools and processes:

### Cross-platform automation

<CardGroup cols={2}>
  <Card title="Slack integration" icon="slack">
    Automatically notify channels, create threads, or update status messages
  </Card>

  <Card title="Email automation" icon="envelope">
    Send personalized responses, escalation notices, or status updates
  </Card>

  <Card title="Custom apps" icon="puzzle-piece">
    Connect to any external system via webhooks or API calls
  </Card>

  <Card title="Data sync" icon="database">
    Keep information current across all your business systems
  </Card>
</CardGroup>

### Advanced features

<CardGroup cols={2}>
  <Card title="Error handling" icon="shield-check">
    Built-in retry logic and compensation strategies for failed activities
  </Card>

  <Card title="Rate limiting" icon="gauge">
    Automatic throttling to respect API limits and system resources
  </Card>

  <Card title="Conditional branching" icon="code-branch">
    Create complex logic flows with multiple paths and decision points
  </Card>

  <Card title="Data templating" icon="code">
    Use dynamic variables and liquid templates for personalized content
  </Card>
</CardGroup>

## 📊 Workflow examples

### High-priority ticket escalation

**Trigger**: Ticket created with priority = "High"\
**Conditions**: Business hours AND account tier = "Enterprise"\
**Activities**:

1. Assign to senior support team
2. Notify team lead via Slack
3. Set due date to 2 hours
4. Add escalation tag

### Customer response automation

**Trigger**: Ticket comment added\
**Conditions**: Comment author = customer AND ticket status = "Waiting on customer"\
**Activities**:

1. Change status to "In progress"
2. Assign to available agent
3. Remove "waiting" labels
4. Log response time

### Weekly report generation

**Trigger**: Schedule (every Monday 9 AM)\
**Conditions**: Team has active tickets\
**Activities**:

1. Generate ticket summary
2. Calculate team metrics
3. Send report to stakeholders
4. Update dashboard widgets

## 🧠 Best practices

<CardGroup cols={2}>
  <Card title="Start simple" icon="seedling">
    Begin with basic workflows and add complexity gradually as your team learns
  </Card>

  <Card title="Test thoroughly" icon="vial">
    Use the testing tools to verify workflows before activating in production
  </Card>

  <Card title="Monitor performance" icon="monitor-waveform">
    Regularly check execution logs and success rates to optimize workflows
  </Card>

  <Card title="Document purpose" icon="file">
    Give workflows clear names and descriptions so your team understands their purpose
  </Card>
</CardGroup>

## 🔔 Workflow status and monitoring

Once active, workflows provide real-time feedback and monitoring:

* ✅ **Successfully executed** (e.g., Completed in 1.2s)
* 🟨 **In progress** (e.g., Running activity 2 of 5)
* 🔴 **Failed execution** (e.g., Error: API timeout)
* ⏸️ **Paused workflow** (e.g., Manually disabled)

Your team always knows the status of automation—and can intervene when needed to ensure smooth operations.
