Variables
Last updated
Was this helpful?
Last updated
Was this helpful?
In Lleverage, variables are used to pass data between actions. They let you capture data from one action and use it in another, making your workflows dynamic and interconnected. By using variables, you can dynamically access data, adjust workflow logic, and manage inputs and outputs across different actions.
Every action in your workflow can produce output that subsequent actions might need. Variables let you access this output easily. Think of them as containers that hold different types of information - text, numbers, files, or complex data structures.
To use a variable, you can either:
Click on the @ symbol in input fields and select the variable from the dropdown
Or wrap it in double curly braces ({{ }}
) for backward compatibility
The variable structure follows a simple pattern:
actionName.outputName
This structure allows Lleverage to know exactly which data you're referring to, whether it's from an Input action, an API response, or any other action.
From an Input action: You can reference data from a trigger by using the input's name and field. For example, if you have a trigger that captures form data, you can refer to a field called name like this:
Using @ symbol: Click @ and select trigger > body > name
Using curly braces: {{trigger.body.name}}
From a Prompt action: After generating content or analyzing text, you can access the response as follows:
Using @ symbol: Click @ and select prompt > text
Using curly braces: {{prompt.text}}
From a Similarity Search action: After running a Vector Store Similarity Search, you can reference its result using:
Using @ symbol: Click @ and select vectorStoreSimilaritySearch > data
Using curly braces: {{vectorStoreSimilaritySearch.data}}
Lleverage now offers a simplified way to work with variables using the @ symbol:
Look for the @ button in input fields that can accept variables
Click the @ button to see a dropdown of all available variables
Select the variable you want to use from the organized list
The variable will be inserted automatically with the proper formatting
This approach eliminates the need to remember exact variable paths or type curly braces, making workflow building faster and error-free.
For users who prefer typing variables manually, Lleverage still offers auto-complete functionality. As you start typing {{
in any field, you'll get suggestions for available variables based on the actions in your workflow. You can hit Enter or click the suggestion to auto-complete the variable.
This reduces typing errors and speeds up workflow creation.
Suggestions are context-aware, meaning they reflect the data that has been passed through your workflow.
To see what variables are available for use in your workflow, you can check the Input tab of any action. This tab lists all the variables that are accessible at that point in the workflow. Keep in mind that the workflow must be executed at least once for the system to populate these available variables, as it needs to process the previous actions to understand what data is being passed through.
Access nested information by selecting deeper levels in the variable dropdown after clicking the @ button, or using dot notation with curly braces.
Using @ symbol: Click @ and navigate through nested properties
Using curly braces: {{customerData.address.city}}
When working with lists (arrays) of data, you can access individual elements by selecting them from the dropdown or using bracket notation with curly braces.
Using @ symbol: Click @ and navigate through array items
Using curly braces: {{orderDetails.items[0].price}}
For database connection strings, these are managed through Secrets or Connections within your project. When setting up a database connection, you can select a string from a dropdown menu. However, if needed, you can also manually enter a connection string by clicking the icon next to the selection.