> For the complete documentation index, see [llms.txt](https://docs.rewst.help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rewst.help/rewst-documentation/documentation/automations/workflows-in-rewst/data-input-and-output-input-variables-and-context-variables.md).

# Data input and output: Input and output variables

## Input and output in Rewst

To understand this topic, you'll first need to learn the difference between an input and an output.&#x20;

* An *input* is information that will be put into Rewst automations. This could be the contents of a form, or information sent via integration, for example.&#x20;
* An *output* is the expected result of the automation.&#x20;

If outputs are the return value of a workflow, inputs are the parameters — they're how you pass data into a workflow from the outside, rather than pulling data out of it.

When you ask the Rewst Agent to build for you, it will handle setting up inputs and outputs for your workflow. The below explanation will help you understand what the Rewst Agent will ask of you to properly build on your behalf.

## Workflow input: Input variables

Workflow inputs are commonly known as *input variables*. An input variable is a named piece of data that you define on a workflow to tell it "expect this value to be passed in when you run." They provide data that can be used by tasks within the workflow, or into a workflow called by another workflow. Input variables seed the workflow's context before any tasks run. Rather than hardcoding values directly into your tasks, you define them as inputs so the workflow can behave dynamically depending on what's passed in. Once defined, the value is available inside the workflow as `{{ INPUT.variable_name }}` or `{{CTX.INPUT.variable_name }}` .

Input variables can be broken down into two parts:&#x20;

1. A key&#x20;
2. The specific data or values that vary

This is an example of a variable where \[first\_name] is the key and Ashley is the value:

&#x20;              `[first_name] : "Ashley"`

Input variables get their values in a Rewst workflow through the workflow's initial trigger event. Any data type that is valid in JSON can be used as an input variable. Set up new input variables in the trigger node, or directly in the configuration menu, as depicted in the next section.

<figure><img src="https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2FyM6vR6isVH83QZWGvA1y%2FScreenshot%202026-09-02%20at%2012.46.36%E2%80%AFPM.png?alt=media&amp;token=c4bf8f6c-bf75-4f17-9c8a-b2d77bedcfc8" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Input variables can only be modified or added on the source workflow, not clones of workflows unpacked from Crates.&#x20;
{% endhint %}

## Workflow output: Output variables

Similarly, workflow outputs are commonly known as output *variables*. An output variable is a named mapping you configure in a workflow's settings. It links a name to a variable, essentially indicating "when this workflow finishes, expose this piece of data under this name." This is how a workflow communicates results to whatever called it, whether that's a form or a parent workflow.&#x20;

## Add an input variable

You can add new variables, or modify existing ones, by navigating to your **Workflow > Configure > Inputs.**

Click **Add Input** to see a number of new fields.

<figure><img src="https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2FhcjIuuvs8fT0Drei9s9s%2FScreenshot%202026-09-02%20at%2011.41.41%E2%80%AFAM.png?alt=media&amp;token=7843ceed-af6b-424e-9682-1d57c450a7cd" alt=""><figcaption></figcaption></figure>

1. **Name**: This can be a unique entry relevant to what the aim of the input is going to be. This should not contain spaces.&#x20;
2. **Label**: This text field is used to set a friendly name. It's the field name visible at the time of input.&#x20;
3. **Type**: Short for data type, this field defines what format the data will be in.
   1. **String**
   2. **Number**
   3. **Boolean**
   4. **Object**
   5. **Array**
   6. **Datetime**
   7. **File**
   8. **URL**
   9. **Email**
   10. **Enum**
4. **Description**: Give a description of what the input is used for.
5. **Default**: You can specify a value that will be used if no other input is specified manually.
6. Optionally, check the boxes if you wish for your input variable to be **Required** or **Secret**.

## Add an output variable

Add new output variables, or modify existing ones, by navigating to your **Workflow > Configure > Outputs**.

<figure><img src="https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2FxY7gkLKgf8WMm0YoPZji%2FScreenshot%202026-09-02%20at%2012.52.57%E2%80%AFPM.png?alt=media&amp;token=b0890276-bf10-448a-85cb-11e2c806c864" alt=""><figcaption></figcaption></figure>

Click **Add Output** to see a number of new fields.

1. **Name**: This can be a unique entry relevant to what the aim of the input is going to be. This should not contain spaces.&#x20;
2. **Label**: This text field is used to set a friendly name. It's the field name visible at the time of input.&#x20;
3. **Value binding**: Click ![](https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2FMc5ykHRSGXAo9lcBjWfJ%2FScreenshot%202026-09-02%20at%201.04.28%E2%80%AFPM.png?alt=media\&token=ca850570-00d7-4a6e-aa07-b316d1fbc5a2)to expose the dialog, where you can choose from the populated list of outputs from your workflow.\
   ![](https://3039672601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh0G0em3PH6aDfPoI5XpN%2Fuploads%2FNtgOBgHSSSvSUozUhkTf%2FScreenshot%202026-09-02%20at%201.04.19%E2%80%AFPM.png?alt=media\&token=dcac764d-0e94-472a-833c-088e7b2a5a5e)
4. **Type**: Short for data type, this field defines what format the data will be in.
   1. **String**
   2. **Number**
   3. **Boolean**
   4. **Object**
   5. **Array**
   6. **Datetime**
   7. **File**
   8. **URL**
   9. **Email**
   10. **Enum**
5. **Description:** Give a description of what the input is used for.
6. Optionally, check the box if you wish for your output variable to be **Secret**.

Click the **Outputs** tab of any node to see its output schema, the sample response structure based on the connector definition.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.rewst.help/rewst-documentation/documentation/automations/workflows-in-rewst/data-input-and-output-input-variables-and-context-variables.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
