Skip to main content

How to Create Dynamic Variables

Step 1: Locate the variables panel

First, go to the PromptEverything app and open any prompt (or create a new one).

Identify the Variables Panel (on the right side of the workbench in wide screens). You'll see:

  • Header: "Variables" with a sparkle icon (✨)

Empty Variables Panel

Step 2: Create a new variable

  1. Click the "Add Variable" button or press ⌘K/Ctrl+K
  2. Variable input form appears with:
    • Text input field with placeholder "variable_name"
    • "Add" button to confirm
    • "Cancel" button to close form

Add Variable Form Open

Step 3: Give your variable a name

  • Use descriptive names, separate words with underscores: email_subject
  • Avoid spaces or hyphens: user-name won't work
  • Press Enter or click the "+" button to create the variable

Variable Name Typed

Step 4: Use Variables in Your Prompt Template

Now add variables to your prompt template. In the Editor Panel (left side), type your template using the variable syntax:

Template with Variables

Notice how:

  • Variables are highlighted in the Monaco editor
  • Template syntax {{email_tone}} and {{email_subject}} is clearly visible
  • Prompt preview updates in the sidebar

Step 5: Fill in Variable Values

After adding variables to your template, they'll appear in the Variables Panel. Fill in their values:

  1. Click in the value field for each variable
  2. Type the values you want to use
  3. Press Enter or click outside to save

Fill in variable values

Step 6: Preview Your Results

In Preview Mode, you'll see:

  • Your prompt with variables replaced by their actual values
  • Real-time updates as you change variable values

Preview Mode with Rendered Content

Visual Indicator: Variables in the preview will show the actual values instead of {{variable_name}}

Variable Naming Best Practices

✅ Good Variable Names

{{customer_name}}     - Clear and specific
{{email_tone}} - Describes the purpose
{{blog_topic}} - Context-aware
{{deadline_date}} - Descriptive
{{target_audience}} - Professional naming

❌ Poor Variable Names

{{text}}      - Too generic
{{thing}} - Meaningless
{{x}} - Not descriptive
{{var1}} - Numbered variables
{{user-name}} - Hyphens cause issues

Naming Conventions

  • Use underscores for multi-word variables: email_subject
  • Be descriptive but concise: recipient_name not name
  • Include context when helpful: blog_tone vs just tone
  • Stay consistent across similar prompts

Next Steps

Once you're comfortable with basic variables, explore these advanced techniques:

Having issues? Check the Troubleshooting section above or open PromptEverything and try the steps yourself!