Variables

Named settings for a workflow, such as a tone or a name. Pick the value once and use it in any neuron as {{vars.id}}.

A variable is a named setting for the whole workflow, such as a tone, a length or a name. You pick its value in the Variables section of the canvas, and use it in any neuron as a reference like {{vars.tone}}. On each run, the reference is replaced with the variable's value at that moment.

A variable means nothing by itself: it's the neurons that reference it that give it a meaning. Only you change a variable, by hand. Runs read it and never change it.

Create a variable

  1. Open Variables in the left rail of the canvas.
  2. Click New variable.
  3. Type a name, for example "Story length", and pick a type.
  4. Click Create. The variable opens so you can set its value.

The types are:

  • Text: any text, up to 2,000 characters.
  • Number: any number.
  • Single select: one of the choices you add.
  • Multi select: any of the choices you add. A reference reads them as a list separated by commas, for example "Space, Kindness".
  • Yes/No: a reference reads it as Yes or No.

For a select type, add the choices under CHOICES, then pick the value. Removing the choice that is picked clears the value. A variable can have up to 50 choices, each up to 100 characters.

A workflow can have up to 50 variables, and a name can be up to 100 characters.

Use a variable

Variables work wherever references do: GET text inputs and queued values, the DO Instructions, and the SEND fields Email to, Telegram chat and Endpoint URL.

  1. Click in the field.
  2. Type two opening curly braces ({{), or click Insert a reference.
  3. Pick the variable from the VARIABLES group. Each one shows its name and its current value.

You can also copy a variable's reference from its ID in the Variables section and paste it into the field.

A variable is text, so it can't fill an input that needs a file or a table.

Change a variable

Open the variable in the Variables section to change its value, choices, name or type. Changing the type keeps the value where it fits: a single select becomes a multi select with the same choice picked, and text that is one of the choices stays picked when it becomes a single select.

Every change is saved with the workflow and can be undone like any other edit.

Change the ID

The ID is made from the name when you create the variable, and stays the same when you rename it. To change it, click Change under ID, type the new ID and click Save ID. IDs use lowercase letters, numbers and dashes, and two variables can't share one. Every reference to the variable is updated to the new ID.

Delete a variable

Open the variable and click the delete button. The message says how many neurons use it. Their references stop working, and those neurons won't run until you remove the reference or pick another variable.

Show to agent users

Each variable has a Show to agent users setting, on by default. It records whether the people who use your agent should pick their own value. It doesn't change how your own runs work.

Common problems

No variable called vars.…

The reference points at a variable that doesn't exist: it was deleted, or the ID was typed wrong. Pick the right one with Insert a reference. A neuron with this problem doesn't run until it's fixed.

Reference IDs are lowercase letters, numbers and dashes

The reference was typed with capitals or underscores, like {{Vars.Tone}}. Use the lowercase form shown in the message.

See also References.

Variables - Docs