> For the complete documentation index, see [llms.txt](https://documentation.proto.cx/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.proto.cx/docs/modules/ai-agents/workflows-and-actions.md).

# Workflows and actions

{% hint style="info" %}
Workflows are configured in the **Workflows** tab of the AI agents dashboard. They define how an AI agent responds to messages and events using a tree of triggers and actions.
{% endhint %}

***

## Triggers

A trigger is a system event or a person's message that starts a set of actions. Triggers can sit at the top level of a flow or be nested within other triggers and actions.

| Trigger                                                                                     | Fires when                                                  |
| ------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| [Message received](/docs/modules/ai-agents/workflows-and-actions/message-received.md)       | A person's message approximately matches a defined intent   |
| [Attachment received](/docs/modules/ai-agents/workflows-and-actions/attachment-received.md) | A person sends an attachment (image, video, audio, or file) |
| [Fallback](/docs/modules/ai-agents/workflows-and-actions/fallback.md)                       | No other trigger at the current level matches               |
| [Chat closed](/docs/modules/ai-agents/workflows-and-actions/chat-closed.md)                 | A chat is closed — permanent, top-level only                |
| [Collect feedback](/docs/modules/ai-agents/workflows-and-actions/collect-feedback.md)       | A CSAT rating is submitted at the end of a chat             |

***

## Actions

An action is started by a trigger. Actions range from sending a preset reply to transferring a chat or calling an external service.

| Action                                                                                    | What it does                                                              |
| ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| [Send message](/docs/modules/ai-agents/workflows-and-actions/send-message.md)             | Replies with one of the defined preset messages                           |
| [Send attachment](/docs/modules/ai-agents/workflows-and-actions/send-attachment.md)       | Submits a file by upload, link, or chat script                            |
| [Show carousel](/docs/modules/ai-agents/workflows-and-actions/show-carousel.md)           | Displays an interactive card carousel in the chat                         |
| [Ask survey](/docs/modules/ai-agents/workflows-and-actions/ask-survey.md)                 | Collects survey responses for analytics                                   |
| [Live agent handoff](/docs/modules/ai-agents/workflows-and-actions/live-agent-handoff.md) | Transfers the chat to a live agent in the [Inbox](/docs/modules/inbox.md) |
| [External handoff](/docs/modules/ai-agents/workflows-and-actions/external-handoff.md)     | Transfers the chat to Bitrix24 or Zendesk                                 |
| [AI agent handoff](/docs/modules/ai-agents/workflows-and-actions/ai-agent-handoff.md)     | Transfers the conversation to another AI agent                            |
| [Create ticket](/docs/modules/ai-agents/workflows-and-actions/create-ticket.md)           | Generates a support ticket and sends the first email                      |
| [Jump](/docs/modules/ai-agents/workflows-and-actions/jump.md)                             | Jumps to another trigger or action in the flow                            |
| [Branch](/docs/modules/ai-agents/workflows-and-actions/branch.md)                         | Applies conditional logic to determine the next path                      |
| [Set variable](/docs/modules/ai-agents/workflows-and-actions/set-variable.md)             | Creates or updates a chat session variable                                |
| [Switch language](/docs/modules/ai-agents/workflows-and-actions/switch-language.md)       | Changes the AI agent's active language mid-chat                           |
| [Send API](/docs/modules/ai-agents/workflows-and-actions/send-api.md)                     | Sends a request to an external endpoint                                   |
| [LLM processing](/docs/modules/ai-agents/workflows-and-actions/llm-processing.md)         | Uses an LLM to generate a response from a prompt and input                |
| [Auto fill field](/docs/modules/ai-agents/workflows-and-actions/auto-fill-field.md)       | Automatically populates predefined fields from conversation context       |
| [Auto team match](/docs/modules/ai-agents/workflows-and-actions/auto-team-match.md)       | Matches a team by alternative names configured in Team settings           |
| [SQL query](/docs/modules/ai-agents/workflows-and-actions/sql-query.md)                   | Executes a read-only SQL query against a connected database               |
| [Send graph](/docs/modules/ai-agents/workflows-and-actions/send-graph.md)                 | Displays data as a chart in the chat                                      |
| Close chat                                                                                | Closes the current chat                                                   |

***

## Configuration

**To add an action** — select **Add action** at the point in the tree where it should run, then choose from the list and configure in the settings panel.

**To add a trigger** — select **Add trigger** at the top level, or **Add workflow trigger** within the tree.

{% hint style="info" %}
Some triggers and actions are only available under certain parents depending on compatibility.
{% endhint %}

**Enabling and disabling** — every trigger and action except Chat started and Chat closed can be toggled with the **Enabled** switch in its row. Disabling removes it from the active flow without deleting it.

**Deleting** — in a trigger or action row, select the options icon → **Delete**.

***

## Localisation

Triggers that assess messages and actions that send content (Send message, Send attachment, Show carousel, Ask survey) are localised per language. Adding a language does not auto-translate existing content — enter it separately for each language or the trigger will not fire in that language.

To localise a trigger or action:

{% stepper %}
{% step %}

### Select the trigger or action

Open it in the Workflows tab.
{% endstep %}

{% step %}

### Switch language

Use the language dropdown (top right) to select the target language.
{% endstep %}

{% step %}

### Enter the content

Type the localised version for that language.
{% endstep %}

{% step %}

### Repeat

Repeat for each configured language.
{% endstep %}
{% endstepper %}
