Variables
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.
Understanding variables
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, wrap it in double curly braces ({{ }}
). This allows you to reference data from previous actions within your workflow.
The syntax for variables in Lleverage follows a simple structure:
Start with the name of the action that produces the data.
Use a
.
(dot) to append specific fields or properties of that action's output.
For example:
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.
Examples
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:From a Prompt action: After generating content or analyzing text, you can access ther rsponse as follows:
From a Similarity Search action: After running a Vector Store Similarity Search, you can reference its result using:
Working with variables
Auto-complete
To make it easier to work with variables, Lleverage 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.
Checking available variables
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.
Advanced usage
Nested data
Access nested information using dot notation.
When working with lists (arrays) of data, you can access individual elements using bracket notation.
Database connection strings
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.
Last updated