# Setting up a workflow

Use [workflows](/guides/workflows.md) to act on monitor alerts without manually deciding what to do each time. A workflow appears as a button on every alert that matches its filters. Configure it once, and anyone with access can run it from the alert page.

## How workflows work

A workflow has three parts:

* **Scope:** which alerts the workflow applies to. Today, workflows run on monitor alerts. Filters let you narrow scope by connector or by specific monitors; leave a filter empty to match all alerts.
* **Trigger:** when the workflow runs. Manual workflows appear as a button on every alert that matches the workflow's filters. Clicking the button opens a dialog where the user fills in any required inputs before running.
* **Steps:** what the workflow does. Each step runs a plugin. This release supports a single step using the Send Email plugin.

## Required Role

* You need at least the Workflow Editor role.

## How to create a workflow

Follow the steps below to create and configure a workflow in Datalogz.

1. Go to  **Settings → Workflows → Definitions**.
2. Click **Create Workflow** and configure the following:

<figure><img src="/files/gric6GJmWSVik8BAS7aR" alt=""><figcaption></figcaption></figure>

| Field                            | Description                                                                          |
| -------------------------------- | ------------------------------------------------------------------------------------ |
| **Name & description**           | What users see on the alert page when the workflow button appears.                   |
| **Trigger**                      | Set to **Manual**. Automatic and Scheduled triggers are visible but not yet enabled. |
| **Connector** (filter)           | Limit the workflow to alerts from a specific connector, or leave blank to match any. |
| **Linked** **Monitors** (filter) | Limit the workflow to specific monitors, or leave blank to match all.                |

3. Create jobs for the workflow:
   1. Click the pencil to edit the job name.
   2. Select a [plugin](#plugins).
   3. Click **+Add Job** to add another job.
   4. Create dependencies between jobs.

<figure><img src="/files/33ww29xpHlCtHjNk2AXx" alt=""><figcaption></figcaption></figure>

4. Save the workflow to make it live. It will immediately appear on any [alert](/guides/workflows/running-a-workflow-from-an-alert.md) that matches the configured filters.

### Plugins

Plugins are the actions a workflow executes. This release includes one:

#### Send Email

Sends a notification email about the alert. Recipients and message content are not fixed at configuration time. The person running the workflow chooses them when they click the button.

**Inputs at trigger time:**

* **Recipient type:** who receives the email:
  * **User:** a specific user in your account; the email goes to their registered address.
  * **Team:** all members of a team.
  * **Static address:** any email address, useful for external contacts such as on-call aliases or vendor contacts.
* **Comment:** a free-form message included in the email body alongside the alert details.

**What the email contains:**

The email includes the monitor name, asset, and connector associated with the alert, plus the comment. Emails sent to internal recipients (User or Team) also include a direct link back to the alert in Datalogz. Static external addresses receive the email without an app link.


---

# 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.datalogz.io/guides/workflows/setting-up-a-workflow.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.
