> For the complete documentation index, see [llms.txt](https://docs.datasaur.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasaur.ai/integrations/robosaur/commands/apply-project-tags.md).

# Apply Project Tags

## How it works

```bash
$ npm run start -- apply-tags -h
Usage: robosaur apply-tags [options] <configFile>

Applies tags to projects based on the given config file

Options:
  -h, --help  display help for command
```

* Robosaur applies tags to projects based on the configuration file, or from a separate CSV file. The CSV file can be stored in your local drive or one of our supported cloud object storage.
* If a tag does not already exist in the team, Robosaur automatically creates it before applying it to the project.
* The behavior is controlled through the `applyTags` configuration.

## Payload

### JSON format

```json
{
  ...
  "applyTags": {
    "teamId": "<TEAM_ID>",
    "source": "inline",
    "payload": [
      {
        "projectId": "<PROJECT_ID_1>",
        "tags": ["<TAG_1>", "<TAG_2>"]
      },
      {
        "projectId": "<PROJECT_ID_2>",
        "tags": ["<TAG_3>"]
      }
    ]
  }
  ...
}
```

### CSV format

CSV files are supported for all storage methods. If multiple tags are specified in the `tags` column, Robosaur applies all tags to the project. Use a comma (`,`) to separate multiple tags.

Example:

```
tags,projectId
"<TAG_1>,<TAG_4>",<PROJECT_ID_1>
<TAG_2>,<PROJECT_ID_1>
<TAG_3>,<PROJECT_ID_2>
```

## Object storage

The `applyTags` source supports inline, local filesystem, and cloud object storage. For more details, refer to [Storage Options](/integrations/robosaur/storage-options.md).

### Local file example

```json
{
  ...
  "applyTags": {
    "teamId": "<TEAM_ID>",
    "source": "local",
    "path": "<path/to/csv/file>"
  }
  ...
}
```

### Cloud object storage example

```json
{
  ...
  "credentials": {
    ...
  },
  "applyTags": {
    "teamId": "<TEAM_ID>",
    "source": "s3 | gcs | azure",
    "bucketName": "<BUCKET_NAME>",
    "path": "<path/to/csv/file/on/bucket>",
  }
  ...
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.datasaur.ai/integrations/robosaur/commands/apply-project-tags.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
