Roadie

Set a variable action

Automation · 2 min read ·

Saves a value that later steps and later runs can read.

Set a variable is the variable.set Automation action. Saves a value that later steps and later runs can read.

Availability: Choose this action in a flow when its feature and required connections are available to your channel. Before you start: Create or open an Automation flow with a trigger.

Options and starting values

The values below are what the editor starts with for a channel with no matching resources selected. They are starting values, not a guarantee that the step can run as shown. Required resource choices and trigger fields may change the starting values.

  • Variable (name) — text; required; validation: matches ^[a-z0-9][a-z0-9_-]{0,39}$; editor starts with my_variable.
  • As (as) — choice; required; choices: number, text, flag, list, json; editor starts with number.
  • Value (value) — text; maximum 2000 characters; required; editor starts with 0; accepts fill-ins.
  • For (minutes) (minutes) — number; minimum 1; maximum 10080; whole number; may be null; optional; editor leaves this unset.

In a flow

Add Set a variable after the event, command or timer that should cause it. Saves a value that later steps and later runs can read.

Example: Store the number 1 as a channel variable. Choose a different name if your channel already uses this one.

Options: {"name":"water_breaks","as":"number","value":"1"}.

For orientation, the editor starts with {"name":"my_variable","as":"number","value":"0"} in a blank channel. Complete any placeholder destination, resource or text before enabling the flow; passing the field schema alone does not prove this will run.

In tests default: New Set a variable steps start at Apply. The trigger editor’s Run test currently applies every action regardless of this per-step default. Use a harmless flow when learning the Test panel; a test can make real changes.

Values for later steps

This action does not declare a named output for later steps.

If the step fails

The run log records the failed step and its reason. The step’s Stop the run if it fails setting decides whether later steps run. Missing connections, permissions, or required choices can prevent this step from completing.

Browse all actions · Use fill-ins