Variables in Moonlit are constant values stored in your project for easy reference across all your apps. They're simpler than documents and are typically used for storing information like company overviews, content writing guidelines, or product details.
Provide a name for your variable (e.g., "Brand Guidelines").
Enter the value, such as details about tone and style for articles.
Add tags to categorize your variables (optional but recommended).
Using Variables in Apps
To use variables in your apps:
Go to the Studio page and open your desired app.
Use the double bracket syntax to reference variables: {{Variables.VariableName}}.
You can also use the slash key (/) to view available references.
This approach is particularly useful for middle and bottom of funnel content, allowing you to easily reference features, pain points, and benefits across multiple apps.
Variables in Dropdown Inputs
Variables can be used to populate dropdown inputs:
Create variables for different scenarios (e.g., client overviews).
Tag these variables consistently (e.g., "Client Overview").
In the Studio, edit your app and add a dropdown select input.
Use the button next to the Options field to set dropdown options from variables.
Filter variables by tag name to populate the dropdown.
This feature is handy for switching between contexts, such as generating content for different clients.
Key Takeaways
Variables store constant values for easy reference across your project.
Use the double bracket syntax to reference variables in your apps.
Variables can be used to populate dropdown inputs for flexible workflows.
Use documents and knowledge retrieval for large amounts of text data.
Use variables for smaller, constant values that need accurate referencing.