Dynamic Content
Beyond simple substitution, the template engine can generate scenes from arrays and show or hide content with flags — the building blocks of data-driven videos (product feeds, listings, leaderboards, reports).
iterate — one scene per array item
Set iterate on a scene to the name of an array variable. The scene is
rendered once per item, in order:
{
"variables": {
"products": [
{
"title": "Aurora Sneakers",
"price": "$129",
"photo": "https://…/aurora.jpg"
},
{
"title": "Nimbus Backpack",
"price": "$89",
"photo": "https://…/nimbus.jpg"
},
{ "title": "Vega Watch", "price": "$249", "photo": "https://…/vega.jpg" }
]
},
"scenes": [
{
"id": "product",
"iterate": "products",
"duration": 3,
"transition": "slideleft",
"visuals": [
{ "type": "IMAGE", "src": "{{item.photo}}", "resize": "cover" },
{ "type": "TEXT", "text": "{{item.title}} — {{item.price}}" }
]
}
]
}
Inside an iterated scene:
{{item}}is the current array element (rename it with"iterateAs": "product"→{{product.title}}).{{index}}is the zero-based position.- Generated scenes get ids
product-0,product-1, … and the scene'stransitionautomatically chains clone → clone, with the last clone keeping the original transition target.
Limits: up to 50 items per iterated scene and 100 scenes after expansion by default (plan-dependent — validation errors report your active limits).
condition — show or hide
condition prunes a scene (or an element) when falsy. It takes a boolean
flag — a literal, a boolean variable, or a {{flag}} placeholder that
resolves to one (by design there is no expression language):
{
"variables": { "showOutro": false, "hasDiscount": true },
"scenes": [
{
"id": "main",
"visuals": [
{ "type": "TEXT", "text": "20% OFF", "condition": "{{hasDiscount}}" }
]
},
{ "id": "outro", "condition": "{{showOutro}}", "visuals": [] }
]
}
iterate and condition combine: the condition is evaluated per item, so
"condition": "{{item.featured}}" renders only the featured products.
Validation & debugging
iteratereferencing a non-array (or undefined) variable is a field-level validation error.- Pruned scenes/elements are counted in the render's resolution stats.
- The editor's Variables panel previews iteration (first item) and condition results live on the stage, and flags undeclared variables before you save.
Put it together: bulk personalized videos
iterate builds the inside of one video from data; bulk
rendering renders many videos from many
variable sets. A product-feed pipeline typically uses both: one template,
iterate for the per-video product list, bulk items for per-customer or
per-category variants.