[Yandex Cloud documentation](../../../../index.md) > [Yandex Serverless Integrations](../../../index.md) > [Step-by-step guides](../../index.md) > Workflows > Managing a workflow > Managing labels > Adding a label

# Adding a label to a workflow

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), navigate to the folder where you want to add a label to a [workflow](../../../concepts/workflows/workflow.md).
  1. Navigate to **Serverless Integrations**.
  1. In the left-hand panel, click ![image](../../../../_assets/console-icons/graph-node.svg) **Workflows**.
  1. Click ![image](../../../../_assets/console-icons/ellipsis.svg) in the workflow row and select ![image](../../../../_assets/console-icons/pencil.svg) **Edit**.
  1. Expand **Additional parameters**:

      1. In the **Labels** field, click **Add label**.
      1. Enter the key and value, and press **Enter**.

  1. Click **Save**.

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  To add a label to a [workflow](../../../concepts/workflows/workflow.md), run this command:

  {% note warning %}
  
  The existing labels (`labels`) will be completely overwritten by the ones you provide in your request.
  
  {% endnote %}

  ```bash
  yc serverless workflow update <workflow_name_or_ID> \
    --yaml-spec <specification_file> \
    --labels <label_list>
  ```

  Where:

  * `--yaml-spec`: Path to the [YaWL specification](../../../concepts/workflows/yawl/index.md) file for the workflow, e.g., `./yawl-spec.json`.
  * `--labels`: List of labels. You can specify one label or multiple labels separated by commas in `<key1>=<value1>,<key2>=<value2>` format.

  Result:

  ```text
  id: dfqjl5hh5p90********
  folder_id: b1g681qpemb4********
  specification:
    spec_yaml: "yawl: ..."
  created_at: "2025-03-11T09:27:51.691990Z"
  name: my-workflow
  description: created via cli
  labels:
    owner: "admin"
    version: "alpha"
  status: ACTIVE
  log_options: {}
  service_account_id: aje4tpd9coa********
  network_id: enpm8v48ehcl********
  ```

- API {#api}

  To add a label to a [workflow](../../../concepts/workflows/workflow.md), use the [Update](../../../workflows/api-ref/Workflow/update.md) REST API method for the [Workflows](../../../workflows/api-ref/Workflow/index.md) resource or the [workflow/Update](../../../workflows/api-ref/grpc/Workflow/update.md) gRPC API call.

{% endlist %}