Templating Recipes with {{slot}} Variables

Use {{slot}} variables to template JSON recipes, define a recipe once, fill slots from a data source, and reuse it across every campaign and batch run.

A {{slot}} variable is a named placeholder inside a template that gets filled with a real value at generation time, write Hi {{first_name}}, your {{product}} ships {{date}}, supply the values, and you get a finished, personalized output. In CoreReflex, {{slot}} template variables are the mechanism that turns a one-off piece of copy or a single creative recipe into a reusable asset you can run across an entire campaign. Define the structure once, fill the slots from a data source, and the same recipe produces a hundred on-brand variants.

What is a {{slot}} variable?

Think of a slot as a labeled blank in a fill-in-the-blank form. The double curly braces mark text that isn't literal. It is a reference to a value supplied later. Everything outside the braces is fixed structure; everything inside is variable.

Subject: {{benefit}} for {{audience}}
Body: Hi {{first_name}}, here's how {{product}} helps you {{outcome}}.

Run that template with first_name = "Dana", product = "Slide Studio", and so on, and you get a clean, finished string with no braces left behind. The power isn't in any single fill. It is that the structure is now decoupled from the content. You can change the values a thousand times without rewriting the template, and you can change the template once to update every output that uses it.

This is the same idea that template engines have used for decades, applied to creative production. CoreReflex's Write pillar uses {{slot}} templates for copy, and the same convention carries into JSON workflow recipes so that whole pipelines, script, voice, image, video, can be parameterized the same way.

Anatomy of a templated recipe

A recipe in CoreReflex is a structured, JSON-based description of a creative job: what to write, what to generate, in what order, against which quality gates. Slots are what make a recipe reusable instead of single-use.

A simplified recipe skeleton might look like this:

{
  "name": "product-launch-short",
  "slots": ["product", "headline_benefit", "audience", "cta"],
  "script": "Meet {{product}}: {{headline_benefit}} built for {{audience}}. {{cta}}.",
  "voice": "brand-hd",
  "shots": ["hook", "demo", "cta-card"]
}

The slots array declares the variables the recipe expects. The script field references them. When you run the recipe, every {{slot}} is resolved before anything is generated. Crucially, the fixed parts, the voice, the shot structure, the quality gates, stay constant across every run, which is exactly what keeps a hundred outputs on-brand. If you want the full picture of how these recipes are assembled and executed, the primer on JSON workflow recipes goes deeper than the skeleton above.

Where slot values come from

A template is only useful if filling it is easy. Slot values can come from several sources, and good automation uses the one that fits the job:

  • By hand. For a single output, you type the values into the slots. This is the Write pillar's everyday mode, fast, deliberate, one piece at a time.
  • From a brief or prompt. You describe the campaign and let the system populate slots from your input, then review before generating.
  • From a structured data source. A spreadsheet, a database table, or a feed where each row is one set of slot values. This is the engine behind batch generation: one recipe, one data source, N rows, N finished outputs.
  • From an upstream step. In a multi-stage recipe, an earlier step's output becomes a later step's slot value, a generated headline flows into the video's on-screen text, for example.

The data-source mode is where templating earns its keep. Map your spreadsheet columns to slot names once, and every row becomes a finished asset. It is the exact pattern behind batch image generation with Imagen recipes, where each row defines a different prompt, product, or variant.

Build a recipe once, reuse it everywhere

Here is the practical workflow for turning a good piece of creative into a reusable, templated recipe:

  1. Write the best version by hand. Get one output exactly right, the wording, the structure, the shots. Don't template until you know what "good" looks like.
  2. Identify what changes. Read back through and underline every phrase that would differ across campaigns: product names, benefits, audiences, dates, calls to action.
  3. Replace each with a named slot. Swap the underlined phrases for {{descriptive_name}}. Use clear names, {{headline_benefit}} beats {{var2}} when you revisit this in three months.
  4. Lock the fixed parts. Everything you didn't underline, voice, grade, shot roles, quality gates, stays constant. That is what enforces consistency.
  5. Wire a data source. Map your slot names to columns in a sheet or table. Each row is now one run.
  6. Run and review. Generate a small batch, check the outputs, refine the template if needed, then scale.

The discipline in step one is what separates a reusable system from a mess. A template built before you know the ideal output just encodes your guesses. This is part of the broader practice of treating creative production as repeatable content automation rather than a series of one-offs.

From filled recipe to scheduled, hands-off runs

A reusable recipe invites a natural next move: stop running it manually. Because recipes are structured and parameterized, the Autopilot scheduler can execute them on a cadence, pull the latest rows from your data source, fill the slots, run the recipe, and route finished assets to your library without a human in the loop. That is how teams schedule hands-free video generation for recurring needs like weekly product spotlights or per-segment ad variants.

And because every generation in CoreReflex carries a portable provenance trace, model, prompt, resolved slot values, and score, a batch run isn't a black box, you can see exactly which values produced which output, replay any generation, and audit the whole run. Templating gives you scale; provenance keeps that scale accountable.

Frequently asked questions

What is a {{slot}} variable in a recipe?

It is a named placeholder, written with double curly braces like {{product}}, that gets replaced with a real value when the recipe runs. The text around it stays fixed, so the slot lets you reuse one structure across many different fills, the foundation of templated, repeatable creative production.

Where do slot values come from?

Four common sources: typed by hand for a single output, populated from a brief you describe, pulled row-by-row from a structured data source like a spreadsheet, or passed in from an earlier step in a multi-stage recipe. Batch generation uses the data-source mode, where each row becomes one finished asset.

Can I reuse one template across campaigns?

Yes. That is the entire point. Once your recipe's variable parts are slots and its fixed parts (voice, shots, grade, quality gates) are locked, a new campaign is just a new set of slot values, you change the data, not the template, and the structure that made the first output good is enforced on every output after it.

How is a {{slot}} template different from find-and-replace?

Find-and-replace edits one document. A {{slot}} template is a reusable structure with declared variables that a recipe resolves at generation time, can fill from a data source row-by-row, and can run on a schedule. It is the difference between editing a file and operating a system.

Template once, generate forever

Slots are a small idea with an outsized payoff: separate the structure of your creative from its content, and scale stops being a function of effort. Write your best version, mark what changes, name the slots, and wire a data source, then let Autopilot run it. Read the recipe and templating docs for the complete schema, or start free with no credit card and turn your best piece of work into a repeatable engine.

Share this article

Pass it to someone who is still editing by hand.

Ready to direct your own film? It is free to start — no credit card.

Start free

← All articles