> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/technical-reference/workflow-execution/inputs-outputs-and-variable-references.md).

# Inputs, Outputs, and Variable References

Variable references insert data from an earlier step into a later input or prompt. Use the actual output field so the workflow passes values automatically.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2Fx2e8VVzbKO7y7JGlJu4o%2FG022.mp4?alt=media&token=1a30d604-2a6b-4d06-ac88-7d32e26adb4c>" %}

## Before you begin

An upstream node that produces the required value and a downstream field that supports references.

## Key concepts

| Term               | Definition                                                                                                                                                   |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Variable reference | A reference that inserts a value from another workflow field. The referenced field must exist and have a compatible type.                                    |
| Expression         | A supported instruction for selecting or transforming a value. Evaluate it against the actual input structure, especially lists and nested objects.          |
| Object             | A structured value containing named fields. Preserve the structure when a receiver expects fields rather than formatted text.                                |
| List               | An ordered collection of values. A receiver expecting a list needs an array, not a text description of several items.                                        |
| Output mapping     | Selection of a node’s returned field for another step or the final interface. A successful intermediate result is not automatically visible to the end user. |

## Connect node inputs and outputs

1. Run or inspect the upstream node to identify its output fields.
2. Insert the required variable in the downstream input. Use the variable picker where available.

![Insert a source reference from the picker, then select the field the receiving step needs.](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/Ki2N6RO8BAR11pFcS69f/assets/g022-g022-02-template.png)

Insert a source reference from the picker, then select the field the receiving step needs.

3. Run the connected path and inspect the resolved downstream input.

The downstream node receives the value produced in the current execution.

## Behavior and limitations

A display label is not always the underlying field key. Treat text, objects, and lists as different types. A template that displays an object as text does not necessarily preserve its structured fields. Repair missing references after renaming or replacing nodes.

## Related resources

[Map variables and expressions](/guides-and-quickstarts/workflow-builder/map-variables-and-expressions.md)

[Execution Order and Node Dependencies](/technical-reference/workflow-execution/execution-order-and-node-dependencies.md)


---

# 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.stackai.com/technical-reference/workflow-execution/inputs-outputs-and-variable-references.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.
