> For the complete documentation index, see [llms.txt](https://docs.airops.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.airops.com/docs/pt/acoes/workflow-concepts/workflow-steps/logic-steps.md).

# Código

Aplique funções programáticas e lógicas nos seus Workflows

Os Passos de Código permitem que os utilizadores adicionem automatização mais tradicional aos Workflows. Se procura uma forma de recriar comportamentos comuns em diferentes linguagens de programação, então os seguintes passos provavelmente têm a sua resposta:

1. [**Executar Código**](https://docs.airops.com/docs/pt/acoes/workflow-concepts/workflow-steps/logic-steps/code.md) -- aplicar código personalizado em Python ou JavaScript para transformar dados ou adicionar lógica complexa
2. [**Chamar API** ](https://docs.airops.com/docs/pt/acoes/workflow-concepts/workflow-steps/logic-steps/api.md)-- fazer pedidos HTTP a APIs e serviços externos
3. [**Formatar JSON**](https://docs.airops.com/docs/pt/acoes/workflow-concepts/workflow-steps/logic-steps/json.md) -- estruturar o resultado do seu Workflow como JSON válido para facilitar o consumo
4. [**Executar Consulta SQL**](https://docs.airops.com/docs/pt/acoes/workflow-concepts/workflow-steps/logic-steps/sql-query.md) -- executar consultas nas suas bases de dados ligadas
5. [**Escrever Texto Liquid**](https://docs.airops.com/docs/pt/acoes/workflow-concepts/workflow-steps/logic-steps/text.md) -- criar modelos de texto com substituição dinâmica de variáveis
6. [**Formatar Seleção Simples/Múltipla**](https://docs.airops.com/docs/pt/acoes/workflow-concepts/workflow-steps/logic-steps/format-single-multi-select.md) -- transformar uma lista de objetos em etiquetas e valores de opções em JSON ou CSV

Os Passos de Código fornecem a flexibilidade e o poder necessários para lidar com transformações de dados complexas, integrar serviços externos e implementar lógica personalizada que vai além do que é possível com passos pré-construídos. Quer precise de analisar estruturas de dados complexas, realizar cálculos matemáticos ou ligar a APIs especializadas, os Passos de Código dão-lhe as ferramentas para realizar estas tarefas dentro dos seus workflows.

{% hint style="info" %}
Nota: os Passos de Código estão disponíveis apenas para aplicações de Workflow. De momento, não estão disponíveis para Agentes.
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.airops.com/docs/pt/acoes/workflow-concepts/workflow-steps/logic-steps.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
