# Adicionar TAGS pelo fluxo

### O que o código faz?

Esse código verifica se a variável "context" existe e se ela possui uma propriedade "tags". Se essa condição for verdadeira, ele verifica se a propriedade "tags" possui pelo menos um elemento, comparando o tamanho da propriedade "tags" com 0. Se essa verificação também for verdadeira, o código adiciona uma nova tag "Tag2" ao final da lista de tags existente. Se qualquer uma dessas verificações for falsa, o código define a propriedade "taavags" como uma nova lista com um único valor "novo\_valor".

### Copie o código aqui:

```javascript
context.tags = ["Insert_Contact_Tag"] //Insere tag de Contato (Não some)
context.conv_tags = ["Insert_Conv_Tags"] //Insere tag de atendimento (Some após finalização do atendimento)
```


---

# 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://help.cosmobots.io/help/outros/exemplos-de-codigos-javascript/adicionar-tags-pelo-fluxo.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.
