> 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/es/acciones/workflow-concepts/workflow-steps/logic-steps.md).

# Código

Aplica funciones programáticas y lógicas en tus flujos de trabajo

Los pasos de código permiten a los usuarios añadir una automatización más tradicional a los flujos de trabajo. Si buscas una forma de recrear comportamientos comunes en distintos lenguajes de programación, entonces es probable que los siguientes pasos tengan la respuesta:

1. [**Ejecutar código**](/docs/es/acciones/workflow-concepts/workflow-steps/logic-steps/code.md) -- aplicar código personalizado de Python o JavaScript para transformar datos o añadir lógica compleja
2. [**Llamar a la API** ](/docs/es/acciones/workflow-concepts/workflow-steps/logic-steps/api.md)-- realizar solicitudes HTTP a APIs y servicios externos
3. [**Formatear JSON**](/docs/es/acciones/workflow-concepts/workflow-steps/logic-steps/json.md) -- estructurar la salida de tu flujo de trabajo como JSON válido para facilitar su consumo
4. [**Ejecutar consulta SQL**](/docs/es/acciones/workflow-concepts/workflow-steps/logic-steps/sql-query.md) -- ejecutar consultas en tus bases de datos conectadas
5. [**Escribir texto Liquid**](/docs/es/acciones/workflow-concepts/workflow-steps/logic-steps/text.md) -- crear plantillas de texto con sustitución dinámica de variables

Los pasos de código ofrecen la flexibilidad y la potencia necesarias para gestionar transformaciones de datos complejas, integrarse con servicios externos e implementar lógica personalizada que va más allá de lo posible con pasos preconstruidos. Tanto si necesitas analizar estructuras de datos complejas, realizar cálculos matemáticos o conectarte a APIs especializadas, los pasos de código te proporcionan las herramientas para realizar estas tareas dentro de tus flujos de trabajo.

{% hint style="info" %}
Nota: los pasos de código solo están disponibles para aplicaciones de flujo de trabajo. Por el momento no están disponibles para los 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/es/acciones/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.
