Skip to main content

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​

  1. Exact match required: Variable names are case-sensitive
  2. Left-to-right replacement: Variables are replaced in order of appearance
  3. 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​

ElementFormatExample
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