Tutorials
How to use Variables

1. Introduction
In Yala, variables are custom columns in your Google Sheets, created to store any kind of information you want to reference in your workflow prompts. To refer to them when interacting with the system, simply enclose the column name in backticks. For example, if you create a column named Limit Value
or Destination Line
, when referring to them in a command, use backticks such as `Limit Value` or `Destination Line`.
2. How Variables Work
They store data: They can hold text, numbers, sheet names, line numbers, etc.
They are referenced in prompts by placing the column name in backticks.
They make adjustments easier: If you need to change the value of `Limit Value` from 50 to 80, simply edit that cell in the spreadsheet—no need to rewrite the prompt.
In the Nutritionist
tab, each row (task) can have Yala columns (like `Memory Prompt`, `Agent Name`, etc.) and additional columns for variables. This way, you can further customize your automation.
3. Creating Variable Columns in the “Nutritionist” Tab
Imagine you have two columns: Limit Value
and Destination Line
, written exactly like that, with spaces and capital letters if you wish:
Limit Value
: a number to use in a condition (e.g., filtering products above 60 grams).
Destination Line
: indicates the line to which you want to jump after performing a certain action (e.g., line 10).
When Yala processes the row (Status = Pending), it sees these columns as variables that can be referenced in prompts by placing the column name between backticks.
4. Referencing Variables in Prompts
Whenever you want to use the value of a variable column, place its name between backticks in your prompt. For example:
Action Prompt:
Here, Yala interprets `Limit Value` as the actual cell value (e.g., 60) and `Destination Line` as 10.
Memory Prompt:
If `Limit Value` is 60, it will only list products above 60 g of carbohydrates.
No need for formality or “please”; just give the command in a straightforward way.
5. Practical Usage Examples
Example 1: Filtering via `Limit Value`
Scenario: `Limit Value` = 50 in the “Nutritionist” tab.
Task: In “Nutrition Table,” mark as Pending every item that surpasses 50 g of Carbohydrates.
How to do it:
Keep the row’s Status in “Nutritionist” as Pending.
In a prompt (e.g., Action Prompt), say:
Yala sees `Limit Value` = 50 and applies that condition.
Example 2: Jumping to `Destination Line`
Scenario: `Destination Line` = 10.
Task: After performing updates, continue the flow starting from line 10 in the same tab.
How to do it:
Also set this row’s Status in the “Nutritionist” tab to Pending.
In the Action Prompt
:
If `Destination Line` = 10, Yala jumps to line 10 and proceeds.
6. General Recommendations
Use clear names: For example, `Limit Value` and `Destination Line` are descriptive, even with spaces.
One row, one task: If each row in “Nutritionist” is a separate workflow, create variables relevant to that row.
Update dynamically: If you need to change `Limit Value` from 60 to 80, just edit the cell in Google Sheets.
Combine with other sections:
`Memory` to collect data filtered by `Limit Value`.
`Parsing` to extract conditional information.
`Data` to automatically update columns of variables (advanced usage).
`Action` to jump using `Destination Line`.
7. Common Issues
Variable not found: Make sure you wrote the column name exactly as is, including spaces and capitalization, and enclosed it in backticks.
Empty cell: If `Limit Value` is blank, Yala may not know how to compare.
No effect: Remember to set Status = Pending for Yala to process that row and read its variables.
8. Relationship with Status
Variables do not directly alter the row’s Status
, but for the row to be processed (and variables to be read), you must:
Set that row to Status = Pending in the “Nutritionist” tab.
Yala will then process that row, see the variable columns, and use them in your commands.
9. Additional Information
Memory: Use variables like `Limit Value` to decide what data the Memory section should gather.
Data: Program updates to `Limit Value` or `Destination Line` for an even more dynamic workflow.
Action: Jump to `Destination Line` or manage statuses using variable references.
Support: For any specific questions, contact the Yala support team.
Conclusion
By creating columns such as Limit Value
and Destination Line
(or any others you need) in the “Nutritionist” tab, you can easily make your commands more adaptable—just edit the spreadsheet cell to change the value. When you reference them in your prompt with backticks, `Limit Value` or `Destination Line`, Yala will retrieve the current cell values directly, eliminating the need to rework your logic. This offers flexibility and simple maintenance for your automations.