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

# Code

Apply programmatic and logical functions into your Workflows

Code Steps enable users to add more traditional automation into Workflows. If you're looking for a way to recreate common behavior across coding languages, then the following steps likely hold your answer:

1. [**Run Code**](/actions/workflow-concepts/workflow-steps/logic-steps/code.md) -- apply custom Python or Javascript code to transform data or add complex logic
2. [**Call API** ](/actions/workflow-concepts/workflow-steps/logic-steps/api.md)-- make HTTP requests to external APIs and services
3. [**Format JSON**](/actions/workflow-concepts/workflow-steps/logic-steps/json.md) -- structure the output of your Workflow as valid JSON for easier consumption
4. [**Run SQL Query**](/actions/workflow-concepts/workflow-steps/logic-steps/sql-query.md) -- execute queries against your connected databases
5. [**Write Liquid Text**](/actions/workflow-concepts/workflow-steps/logic-steps/text.md) -- create text templates with dynamic variable substitution
6. [**Format Single/Multi Select**](/actions/workflow-concepts/workflow-steps/logic-steps/format-single-multi-select.md) -- turn a list of objects into JSON or CSV option labels and values

Code Steps provide the flexibility and power needed to handle complex data transformations, integrate with external services, and implement custom logic that goes beyond what's possible with pre-built steps. Whether you need to parse complex data structures, perform mathematical calculations, or connect to specialized APIs, Code Steps give you the tools to accomplish these tasks within your workflows.

{% hint style="info" %}
Note: Code Steps are only available for Workflow applications. They are not available for Agents at this time.
{% 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/actions/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.
