# Create Workflow

## Requirements

* Linux Control Center = 2.10.X or higher

## Overview

* The Linux Control Center Workflow allows you to create workflows with decision making and chaining of actions. With an intuitive interface, it allows total control in a simple and fast way.

## Objective

* This document aims to demonstrate the step by step and demonstrate how to use the Linux Control Center Workflow.

## Workflow Steps

* See an example of how a workflow with decision making works.

  ![](/files/oQWcAVTWav3Xf5zSoCt8)

## Create a Workflow

1. Click on **Workflow** on the left sidebar.

   ![](/files/DeWJuw6GeGJJdiI5hpfB)
2. Click on **Create**.

   ![](/files/qbv1vsOmZzTJyoAdOZNO)
3. Enter the name for the Workflow in the **Name** field.

   ![](/files/9BBZT9ffp5n3aiUnX6Qk)
4. Click **Start New Workflow**.

   ![](/files/rgh5hJ1r8fhKypE5HLvv)
5. Choose the desired *Action* in the **Action** field

   ![](/files/iLUziPUs736DMjkNBaXL)
6. Choose the **Host** on which you want to execute the action in the **Host** field.

   ![](/files/ZU1KVU9h4BoukTGj94fe)
7. You can also execute the action in a group by selecting it in the **Group** field.

   ![](/files/HblAYKczVf24M6FaOMpT)
8. Click **Create**.

   ![](/files/QhEa9lDPuacAxst8JtKo)
9. Click **Save** to create the *Workflow*.

   ![](/files/xaTMEL76ryKRVeQpuvPf)

## Create Sub Action

1. Open the Workflow in which you want to add an *Action* with decision making and click **Add Subaction** for the desired action.

   ![](/files/shjd5bToXln4Nxq7CyQS)
2. Click on **Action** and choose the *Sub Action*

   ![](/files/1rZLr6vcErRr6fuEg8gi)
3. Choose which result will be responsible for executing the *Sub Action*.

**Always**: Executes the *Sub Action* regardless of the result of the previous *Action*.\
**Success**: Executes the *Sub Action* only in case of *Success* of the previous *Action*.\
**Error**: Executes the *Sub Action* only in case of *Error* of the previous *Action*.\
**Regex**: Executes the *Sub Action* only if the defined *Regular Expression* is the result of the previous *Action*.<br>

```
![](/pt-br/images/workflow/create_workflow/condicao.png)
```

1. Click **Create** to create the *Sub Action*.

   ![](/files/lo6TiXSIYlj6RAtl7Znv)
2. Click **Save** to save the *Sub Action*

   ![](/files/VfUrsNDayqXsTPZChHdj)

## Executing the Workflow

1. Click **Workflow** on the left sidebar.

   ![](/files/DeWJuw6GeGJJdiI5hpfB)
2. Click **Actions** in the *Workflow* line and click **Run**.

   ![](/files/oUSRlUaDG4MMhjDv74Pu)
3. It is also possible to run within the *Workflow* page

   ![](/files/3Y0Dv7FRInBQhQwTwF4E)
4. Click **Agree** to run the *Workflow*

   ![](/files/d03oH57tZJbZdtiTAmio)
5. See the example of [Workflow Steps](#workflow-steps).

   ![](https://gitlab.com/7dev-doc/linux-control-center/-/blob/main/pt-br/images/workflow/create_workflow/lcc_workflow_flow.png)


---

# 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.linuxcontrolcenter.com.br/en/workflow/create-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.
