Back to Blog

InfoSlides dynamic template data schema

Paste a data schema instead of typing it

Every template has a Data Schema: the list of fields it shows, like a ticket number, a room or a price. Each field matches a {{placeholder}} in the template's HTML. Instead of adding the fields one at a time, you can paste the whole schema in one go.

How to use it

  1. Open Templates and create a new template, or edit one of your own.
  2. In the Data Schema box, click Paste schema.
  3. Paste your JSON and click Apply.
  4. Check the fields in the grid, then click Save Template.

You can paste any of the four formats below. You do not need to say which one it is: InfoSlides recognises it. All four examples describe the same thing, a queue board in a clinic waiting room, and all four fill the grid with the same five fields.

1. A sample of the data (the easiest)

Paste one example of the data the screen will show. InfoSlides reads the field names and works out each type from the value: text, a number, true/false, or a list.

{
  "ticket": "A-142",
  "room": "Room 2",
  "waiting": 7,
  "open": true,
  "next": ["A-143", "A-144"]
}

This is usually what the system that sends the data already has. As a bonus, if the Sample Data box is still empty, the sample is copied there too, so the preview shows real values straight away.

2. A plain list of fields

A list with a name and a type for each field. Add "required": false for a field that can be left out; any field without it counts as required.

[
  { "name": "ticket",  "type": "string" },
  { "name": "room",    "type": "string" },
  { "name": "waiting", "type": "number" },
  { "name": "open",    "type": "boolean", "required": false },
  { "name": "next",    "type": "array",   "required": false }
]

3. A JSON Schema

If a developer or another system already describes the data as a JSON Schema, paste it as it is. A field is required when it is listed under required.

{
  "type": "object",
  "properties": {
    "ticket":  { "type": "string" },
    "room":    { "type": "string" },
    "waiting": { "type": "integer" },
    "open":    { "type": "boolean" },
    "next":    { "type": "array", "items": { "type": "string" } }
  },
  "required": ["ticket", "room", "waiting"]
}

4. The InfoSlides schema format

The format templates are stored in. Use it to copy the schema from one template to another.

{
  "fields": [
    { "name": "ticket",  "type": "string",  "required": true },
    { "name": "room",    "type": "string",  "required": true },
    { "name": "waiting", "type": "number",  "required": true },
    { "name": "open",    "type": "boolean", "required": false },
    { "name": "next",    "type": "array",   "required": false }
  ]
}

How types are read

The grid has four types. Everything you paste is mapped onto one of them:

  • string: text, and anything that does not fit the others (objects, empty values, unknown types)
  • number: number, integer, or any numeric value
  • boolean: boolean, bool, or true/false
  • array: array, or a list value like ["A-143", "A-144"]

A JSON Schema type written as a list, like ["string", "null"], uses its first entry that is not null.

Good to know

  • Apply replaces the grid. The pasted schema becomes the whole schema; it is not added to the fields already there.
  • Nothing is saved until you click Save Template, so you can paste again if something looks wrong.
  • Field names are kept exactly as written. They must match the {{placeholders}} in your HTML, including upper and lower case.
  • If a name appears twice, the first one is kept.
  • TenantLogo and AccentColor are skipped. They are filled in automatically with your logo and brand colour, so they are never data fields.
  • JSON wrapped in a code block (```json ... ```), as AI assistants often write it, works as it is.
  • If the text is not valid JSON, or no fields are found in it, you see a message and the grid is left unchanged.

Let an AI assistant write it

Any AI assistant can write the schema for you. Describe what the screen should show and paste the answer straight into Paste schema. Two prompts that work well:

Write one sample JSON object with the data a TV screen in our
clinic waiting room should show: the ticket being served, the
room, how many people are waiting, whether the clinic is open,
and the next tickets. Use short camelCase field names. Reply
with the JSON only.
Here is my slide template HTML. List every {{placeholder}} in it
as a JSON array of fields, each with "name" and "type"
(string, number, boolean or array). Reply with the JSON only.

[paste your template HTML here]

The second prompt is useful when you already have the HTML: it makes sure the schema matches the placeholders exactly.

For AI agents working through the API

Paste schema is a feature of the template editor. An agent creating a template through the API (POST /v1/templates) does not send a schema at all: in code mode the schema is built from the {{placeholders}} in the HTML it sends, and in AI mode from the top-level fields of its sampleJson. An agent helping a person in the editor should hand them the schema in one of the four formats above, preferably a sample of the data (format 1), since that also fills the preview.

Turn your slides into a live TV stream. Upload a PowerPoint, pair a screen, and it plays. Free plan, no card required.
Start free
An unhandled error has occurred. Reload ✕