# Create a Workflow

## **Enter the Workflow Name**

![](https://2993186011-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MGbJTODB-ncDvFhokcx%2F-MhXEQyJFKh5Ad4tP5B-%2F-MhXFznSc0j079n-C5b6%2F2.png?alt=media\&token=e5a13085-073c-4e51-8b28-25f508f03d7c)

{% hint style="info" %}
(Note: A workflow name can only contain lowercase letters, numbers, and minus signs. The name cannot be less than 2 characters, and its first character cannot be a minus sign.)
{% endhint %}

## Set Workflow Running Conditions

### 1. Set Running Parameters

Click **Add** to set parameters.

![](https://2993186011-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MGbJTODB-ncDvFhokcx%2F-MhXEQyJFKh5Ad4tP5B-%2F-MhXNthS_zCtz939SeHV%2F5.png?alt=media\&token=e67670a4-283e-4aa9-a576-4103a036ff92)

Fill in **Parameters name** (Note: A parameter name can only contain letters, numbers, and underscores. The name cannot be less than 2 characters, and its first character cannot be a number.), **type of data**, and **default value**.

### 2. Set Environmental Parameters

![](https://2993186011-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MGbJTODB-ncDvFhokcx%2F-MhXEQyJFKh5Ad4tP5B-%2F-MhXO-C4fdRJAxdiqB39%2F6.png?alt=media\&token=d0afbeb4-c1c6-437a-a058-c03cbcaf33e2)

Click **Add** in the Environment column, and then enter the corresponding parameters in the **Key** (Note: A key can only contain letters, numbers, and underscores. The name cannot be less than 2 characters, and its first character cannot be a number) and **Value** columns respectively .

![](https://2993186011-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MGbJTODB-ncDvFhokcx%2F-MhXEQyJFKh5Ad4tP5B-%2F-MhXO5L3UHDT_x9nx848%2F7.png?alt=media\&token=347e756a-d714-4e95-bd09-e9be6d25cf6c)

### 3. Set Instance Parameters

Select instance configuration and the number of instances in the Instances column.

![](https://2993186011-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MGbJTODB-ncDvFhokcx%2F-MhXEQyJFKh5Ad4tP5B-%2F-MhXOA-R-dyUhQtzhBf8%2F8.png?alt=media\&token=e6d98c83-bc23-4437-b52d-f954d617a5d2)

## Enter Your YAML Code

Enter your YAML code in the YAML File.

![](https://2993186011-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MGbJTODB-ncDvFhokcx%2F-MhXEQyJFKh5Ad4tP5B-%2F-MhXOOfJdKBXz3G3c_SY%2F10.png?alt=media\&token=7514daf6-f2f8-4d8a-8329-f2d6530366b8)

{% content-ref url="yaml-syntax-description" %}
[yaml-syntax-description](https://docs.graviti.com/guide/tensorbay/action/yaml-syntax-description)
{% endcontent-ref %}

### **Publish the Workflow**

After all settings are completed, you can click **Publish** to create or update the workflow, or click **Cancel** to return to the Actions Details page, which will not save the change.

![](https://2993186011-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MGbJTODB-ncDvFhokcx%2F-MhXEQyJFKh5Ad4tP5B-%2F-MhXOULJtMBUK9lrCybt%2F11.png?alt=media\&token=7fa659d1-2abd-4ec2-afb8-352da5fdb42a)
