# Creating Workflows

In Keeping's settings, click on the Automation tab to create a new workflow.

## Setting Up a New Workflow

### Click "Add Workflow" to create a new workflow

![Add a New Workflow by clicking the Add Workflow button](/files/4GoHYHXWiEOgD82e39bW)

### Name your workflow

Name your workflow something that will help you remember what it does, and choose which mailboxes your workflow will run on. Remember, a workflow runs when a new message arrives in one (or more) of your mailboxes. Click "Next Step" to move on.

<figure><img src="/files/UvS0naCDctU0DRiAkVPM" alt="Name your workflow and choose the mailboxes it should run on"><figcaption><p>Name your workflow and choose the mailboxes it should run on</p></figcaption></figure>

### Choose what action triggers the workflow

The **Runs When** dropdown sets the event that triggers your workflow.&#x20;

<figure><img src="/files/imSjfuzo6k50T63pORIw" alt=""><figcaption><p>Choose when your workflow is triggered</p></figcaption></figure>

**Email triggers** — fire when a message arrives in the conversation:

* **Initial email is received** — runs once, when a new conversation is created.
* **Agent replies** — runs each time an agent sends a reply.
* **Customer replies** — runs each time the customer responds to an existing conversation.
* **Initial email, agent replies, customer replies** — runs on every email in the conversation, regardless of who sent it.

**State-change triggers** — fire when a teammate changes a conversation's properties:

* **An agent applies a tag** — runs when a specific tag is added. You'll pick the tag in a follow-up dropdown.
* **An agent assigns a teammate** — runs when a specific teammate is assigned. You'll pick the teammate in a follow-up dropdown.
* **An agent sets a priority** — runs when a conversation is set to a specific priority (Low, Medium, or High).

{% hint style="info" %}
State-change triggers fire when an agent, API call, or integration makes the change — but **not when another workflow's action causes it**. This prevents workflows from chaining into infinite loops.
{% endhint %}

### Choose your matching conditions

**Choose the conditions that need to match to trigger your workflow.** For example, you may want a workflow to run when specific words are present in the subject of your incoming support email. See our help article on [workflow conditions](/help/workflows/workflow-conditions.md) to learn more.

![Add a condition for your workflow](/files/4A0oEYwSdNDVveSEHCq6)

You can **chain together multiple conditions using "AND" and "OR" blocks** by clicking the "AND" or "OR" buttons. For example, you may want to trigger a workflow only when certain words are in the subject AND it is from a specific email address.

### Choose your actions

Select the Actions to apply once your Workflow is triggered. For example, you may want to assign a ticket to a specific agent. As with Conditions, you can chain multiple actions by clicking the "AND" button. See our help center article to learn more about [workflow actions](/help/workflows/workflow-actions.md).

<figure><img src="/files/dRbatKKDboY6eWucQCTe" alt="Add an action for your workflow."><figcaption><p>Add an action for your workflow.</p></figcaption></figure>

### Review and Activate

Review your workflow, and click **Activate** to set it in motion!

<figure><img src="/files/ImNqViZGlYbUbWvPd404" alt="Confirm your choices and Activate your workflow"><figcaption><p>Confirm your choices and Activate your workflow</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keeping.com/help/workflows/creating-workflows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
