# Set Variable stage

**Set Variable Stage**

The **Set Variable** stage allows you to assign a value to a predefined or new variable within your workflow. These variables can hold data from earlier stages, calculations, or static values and can be used in later stages like Add Record, Update Record, Conditions, Notifications or AI Stages.

<figure><img src="/files/VXt9bAzUlEKbLtQLmGGq" alt="" width="533"><figcaption></figcaption></figure>

**Interface Overview**

**1. Name**

* Specify the name of the variable you want to set.
* This must be unique within the workflow.

**2. Select Data Type**

Choose the data type for the variable. Common types include:

* String
* Number
* Decimal
* Boolean
* Date
* Record
* Records

**3. Value**

Choose what value you want to assign to the variable. Options include:

* **Custom / Static Value**\
  (e.g., "Approved", 10, true, "2025-08-08")
* **Stage Output**\
  Use outputs from previous workflow stages:

“outputs(StageName)”

**Example:**

* outputs(Add\_Candidate Record)
* outputs(Update\_New Record)

Once selected, you can reference this variable using:\
${Variable:YourVariableName}\
Or for specific fields (if it’s a record/records):\
${Variable:YourVariableName:FieldName}

**Example**

You added a candidate using a stage named Add\_Candidate Record. You now want to store the output for later use.

* **Name:** Candidate\_Record
* **Data Type:** String
* **Value:** outputs(Add\_Candidate Record)

You can later access the candidate record using:

${Variable:Candidate\_Record}


---

# Agent Instructions: 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://docs.aiflo.app/web-workflow/set-variable-stage.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.
