# 新建工作流

## 1  创建工作流名称

{% hint style="info" %}
注：名称只能包含**小写英文字母**，**数字以及减号“-”** ，名称**不得少于2个字符**且**首位不能为减号**。
{% endhint %}

![](/files/1zGkcrgieEZ5At3ZgBqi)

## 2  **设置工作流条件**

### **2-1  设置运行参数**

在【Parameters】栏，点击【添加】,进行参数设置

![](/files/tga8LcwtjFT5wVQeO6Kz)

在【Name】栏填写**参数名称**（注意：名称只能包含英文字母，数字以及下划线“\_”，名称不得少于2位字符且首位不能为数字）**，**&#x5728;【Type】栏填写相应的**数据类型**并在【Default】栏填写相应**默认值**

![](/files/tga8LcwtjFT5wVQeO6Kz)

### **2-2  设置环境参数**

在【Environment】栏，点击【添加】,分别&#x5728;**【Key】**（注意：Key名称只能包含英文字母，数字以及下划线“\_”，名称不得少于2位字符且首位不能为数字）&#x548C;**【Value】**&#x680F;输入相应参数。

![](/files/nSICUWeJdx55UqFA7YvA)

### **2-3  设置实例参数**

在【Instances】栏，分别选择【实例配置】与【实例个数】

![](/files/ipYdGBYwu2zaM3omNK3x)

## **3. 输入YAML文件**

在【YAML File】部分，输入您已写好的YAML代码

![](/files/AITAH2YWiVgZwUJSqlSz)

{% content-ref url="/pages/-MgyqAlKRRJaxL4yE2yb" %}
[YAML语法说明](/guide/tensorbay/action/action-syntax.md)
{% endcontent-ref %}

## **4  发布工作流**

全部设置完毕之后，您可点击【发布】来创建或更新工作流，也可点击【取消编辑】来退回自动化详情界面，但所做修改将不会保存

![](/files/ga1o2o8zozQLOgMohhDE)


---

# 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.graviti.cn/guide/tensorbay/action/xin-jian-gong-zuo-liu.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.
