> For the complete documentation index, see [llms.txt](https://developers.make.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.make.com/custom-apps-documentation/component-blocks/api/handling-responses/output.md).

# Output

**Required**: no\
**Default**: `body`, when `iterate` is not set; `item` otherwise

With the `output` directive, you can specify how you want your module output to look.

## iterate

When using iterate, `output` is processed for each item of the array that is specified with the `iterate` directive.

When not using iterate, `output` is executed only once and the result is fed to the `wrapper` directive if present. Otherwise, it will be the final result of the module.

Within a chain of requests, the output directive should only be defined once, in the final step, to produce the module’s or RPC's output.

When you aren't using `iterate`, you can use the `body` object to specify the output of the module.

{% tabs %}
{% tab title="Example" %}

```json
"output": "{{body}}"
```

{% endtab %}
{% endtabs %}

You can also transform the output using custom IML functions to shape the final result as needed.

{% tabs %}
{% tab title="Example" %}

```json
"output": "{{parseResponse(body)}}"
```

{% endtab %}
{% endtabs %}

When using the `iterate` directive, specify the output using the `item` object. However, the `body` is still available to use.

{% tabs %}
{% tab title="Example" %}

```json
"iterate": "{{body.items}}",
"output": {
    "id": "{{item}}"
}
```

{% endtab %}
{% endtabs %}

## wrapper

When using the `wrapper` directive, the value becomes the final output of the module. This directive is executed only once and at the end of the processing chain. There are no more directives or transformations after it.

In the `wrapper` directive, you can define additional top-level properties alongside the `output`. In the example below, the properties `someAdditionalStuff` and `aNumber` appear at the top level of the final result, while the transformed data is nested inside the data field.

{% tabs %}
{% tab title="Example" %}

```json
"iterate": "{{body.users}}",
"output": {
	"label": "{{item.name}}",
	"value": "{{item.id}}"
},
"wrapper": {
	"someAdditionalStuff": "helloworld",
	"aNumber": "{{body.aValue}}",
	"data": "{{output}}"
}
```

{% endtab %}
{% endtabs %}


---

# 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:

```
GET https://developers.make.com/custom-apps-documentation/component-blocks/api/handling-responses/output.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.
