Variable Syntax Reference
Complete reference for variable syntax, naming rules, and supported formats in PromptEverything.
Basic Syntaxā
Variable Formatā
{{variable_name}}
Requirements:
- Must use double curly braces
{{and}} - No spaces inside the braces:
{{name}}ā ,{{ name }}ā - Case-sensitive:
{{Name}}and{{name}}are different variables
Valid Variable Namesā
Allowed characters:
- Letters (a-z, A-Z)
- Numbers (0-9)
- Underscores (_)
Naming rules:
- Must start with a letter:
{{name}}ā ,{{1name}}ā - Can contain numbers after the first character:
{{user1}}ā - Can contain underscores:
{{user_name}}ā - Cannot contain spaces:
{{user name}}ā - Cannot contain hyphens:
{{user-name}}ā - Cannot contain special characters:
{{user@name}}ā
Examplesā
ā Valid Variables:
{{name}}
{{email_address}}
{{user123}}
{{firstName}}
{{TOPIC}}
{{project_deadline_date}}
ā Invalid Variables:
{name} // Single braces
{{ name }} // Spaces inside braces
{{user-name}} // Hyphen not allowed
{{user name}} // Space not allowed
{{123user}} // Cannot start with number
{{user@email}} // Special characters not allowed
Variable Replacementā
How Variables Are Replacedā
- Exact match required: Variable names are case-sensitive
- Left-to-right replacement: Variables are replaced in order of appearance
- Multiple instances: All instances of the same variable are replaced with the same value
Replacement Examplesā
Template:
Hello {{name}}, welcome to {{company}}. Your {{name}} account is ready!
Variables:
name: "John"company: "PromptEverything"
Result:
Hello John, welcome to PromptEverything. Your John account is ready!
Special Casesā
Empty Variablesā
Empty variables are replaced with nothing (removed completely):
Template:
{{greeting}}{{name}}, how are you?
Variables:
greeting: "" (empty)name: "Alice"
Result:
Alice, how are you?
Undefined Variablesā
Variables without values remain unchanged:
Template:
Hello {{name}}, your order {{order_id}} is ready.
Variables:
name: "Bob"order_id: (not defined)
Result:
Hello Bob, your order {{order_id}} is ready.
Whitespace Handlingā
Variables can include surrounding whitespace:
Template:
Dear {{title}} {{last_name}},{{line_break}}Your appointment is confirmed.
Variables:
title: "Dr."last_name: "Smith"line_break: "\n\n" (empty line)
Result:
Dear Dr. Smith,
Your appointment is confirmed.
Common Patternsā
Conditional Contentā
Use empty variables for optional content:
Template:
{{urgent_prefix}}Subject: {{subject}}
{{greeting}}
Your message here.
{{signature}}
For urgent emails:
urgent_prefix: "URGENT: "greeting: "This requires immediate attention."signature: "Please respond by EOD."
For normal emails:
urgent_prefix: "" (empty)greeting: "" (empty)signature: "Thanks!"
List Variablesā
Use variables to include structured content:
Template:
Meeting Agenda:
{{agenda_items}}
Action Items:
{{action_items}}
Variables:
agenda_items: "⢠Budget review\n⢠Q4 planning\n⢠Team updates"action_items: "1. Submit reports by Friday\n2. Schedule follow-up meetings"
Nested Contentā
Variables can contain formatting:
Template:
# {{document_title}}
{{content_sections}}
---
{{footer_info}}
Limits and Constraintsā
Variable Name Lengthā
- Maximum length: 50 characters
- Recommended length: 20 characters or less
- Best practice: Use descriptive but concise names
Number of Variablesā
- Per prompt: No hard limit
- Recommended: 5-15 variables for most use cases
- Best practice: Group related variables logically
Variable Value Lengthā
- Maximum length: 10,000 characters per variable
- Recommended: Keep values reasonable for intended use
- Best practice: Use shorter values for better readability
Best Practicesā
Naming Conventionsā
ā
Recommended:
{{user_name}} // Clear and descriptive
{{email_subject}} // Includes context
{{meeting_date}} // Specific purpose
{{sender_signature}} // Complete description
ā Avoid:
{{text}} // Too generic
{{thing}} // Meaningless
{{var1}} // Non-descriptive
{{n}} // Too short
Variable Organizationā
Group related variables:
// Contact information
{{recipient_name}}
{{recipient_email}}
{{recipient_company}}
// Email details
{{email_subject}}
{{email_priority}}
{{email_body}}
Default Valuesā
Consider providing helpful defaults:
{{tone}} ā "professional"
{{urgency}} ā "" (empty for normal priority)
{{signature}} ā "Best regards,\n[Your Name]"
Troubleshootingā
Variable Not Replacingā
Problem: {{name}} appears in output instead of being replaced
Causes & Solutions:
- Typo in template: Check spelling of
{{name}} - Typo in variable name: Ensure exact match (case-sensitive)
- Missing value: Assign a value to the variable
- Extra spaces: Use
{{name}}not{{ name }}
Unexpected Outputā
Problem: Variable replacement produces wrong result
Causes & Solutions:
- Case sensitivity:
{{Name}}ā{{name}} - Multiple variables: Check if similar variable names exist
- Special characters: Use only letters, numbers, and underscores
Variables Not Detectedā
Problem: Variable doesn't appear in Variables panel
Causes & Solutions:
- Invalid syntax: Must use
{{variable_name}}format - Invalid characters: Use only allowed characters
- Save required: Save the prompt after adding variables
Quick Referenceā
| Element | Format | Example |
|---|---|---|
| Basic variable | {{name}} | {{user_name}} |
| Multi-word | {{word_word}} | {{first_name}} |
| With numbers | {{word123}} | {{project2024}} |
| Optional content | {{prefix}}content | {{urgent}}Message |
| Empty for removal | {{variable}} = "" | Removes completely |
Valid characters: Letters, numbers, underscores
Case sensitive: Yes
Max name length: 50 characters
Max value length: 10,000 characters