Skip to main content

Overview

Templates in Hooked use a powerful scene-based system that allows you to create personalized videos at scale. Understanding scenes and variables is key to leveraging templates effectively.

What are Scenes?

Scenes are individual segments of your video, each with its own script and customizable overlay elements. Think of them as slides or sections in your video presentation.

Scene Structure

Each scene contains:
  • script: The narration text that the avatar will speak
  • variables: Array of key-value pairs for text overlays displayed on the slide (names, titles, company names, etc.)

What are Variables?

Variables are dynamic text elements that appear as overlays on your video slides. They allow you to personalize each video by replacing placeholder text with specific values. Common uses:
  • Names and titles
  • Company names
  • Product information
  • Dates and numbers
  • Custom messages

Variable Names

✅ Valid Variable Names:
Rules:
  • Lowercase letters
  • Use underscores for spaces
  • Descriptive names
  • No special characters
❌ Invalid Variable Names:

Creating Multi-Scene Templates

Templates can have multiple scenes, each with different overlay text:

Variable Rules

1. Template Defines Required Variables

The template creator defines which variables are needed for each scene. When generating a video, you must provide values for all required variables.

2. Variables Are Case-Sensitive

Variable names must match exactly:

3. Variables Appear as Text Overlays

Variables are displayed as text elements on the slide, not spoken in the narration:

4. Empty Values Are Allowed

Variables can have empty strings if the template allows it:

Complete Example

Here’s a full example of generating a video from a template with multiple scenes:

Best Practices

Use Descriptive Variable Names

Keep Scripts Natural

Validate Before Sending

Always check that:
  1. All required variables are present
  2. Variable names match exactly (case-sensitive)
  3. Values are properly formatted (strings, numbers, etc.)
  4. No extra variables are provided that don’t exist in the script

Common Patterns

Personalized Greeting

Product Information

Call to Action

Troubleshooting

Error: “Variable not found in script”

Problem: You provided a variable that doesn’t exist in the script. Solution: Remove unused variables or add them to the script.

Error: “Missing required variable”

Problem: A {{variable}} in the script doesn’t have a value. Solution: Provide all required variables.

Next Steps

Complete Workflow

See scenes and variables in action

Personalization

Advanced variable strategies

Bulk Generation

Generate at scale with templates

Template Example

Complete code example