Skip to main content

Your Google Slides or Docs file is the template

Templates are ordinary Google Slides decks and Google Docs that your designer owns. Placeholders, conditions, loops, repeating slides and per-placement formatting fill a copy of the file from your data; the layout, fonts and brand stay exactly as designed.

There is no proprietary editor and no design to rebuild. A SourceToDocs template is a Google Slides deck or a Google Doc, designed in Google’s own editor by whoever owns your brand. You add markup where the data goes, and every generated file is a copy of that file with the markup replaced. Fonts, colours, master slides, images and spacing are whatever the designer left there.

That is the whole idea, and it is why the output looks like your work rather than a tool’s idea of a report.

What you can write in a template

MarkupExampleSlidesDocs
A value from your data{{ client_name }}YesYes
A specific row{{ sessions[2].title }}Yes (counting from 1)Yes (counting from 0)
A linked record{{ client.Name }}YesYes
Show or hide text{% if status == "Done" %}…{% endif %}YesYes
Repeat text, table rows or whole tables{% for s in sessions %}…{% endfor %}No, see repeating slidesYes
Repeat whole slides per rowTemplate builderYesNo
Swap an image from a URL{{ logo_url }} in the image’s alt textYesNo
Delete an element on a condition{% if … %} in alt textYesNo
Colour a shape from data{% bg {{ status_color }} %} in alt textYesNo
When the run happened, slide numbers{{ _run.started_at }}, {{ _slide.number }}YesRun time only

A placeholder that matches no column renders blank rather than failing the run, so one typo never costs you the whole document. It also means typos are quiet: check the first file.

Google Slides: repeating slides from rows

Slides has no loop tag. Repetition comes from the template builder, an outline of the deck where each entry is one kind of slide:

  • a static slide appears once (a cover, a closing slide);
  • a dynamic slide repeats over the rows of a filtered set, as many rows per slide as the template slide has slots;
  • a group repeats a set of slides per row, so each client gets its cover then its detail slides, in order.

Groups nest up to five levels, joined by a relation between the child’s rows and the parent’s. That is how a QBR deck gets one section per product, and a programme one page per day with its sessions inside.

Formatting in Slides is set per placement, not typed into the tag: uppercase, title case, trim, truncate to a length or to whole sentences, a default for empty values, a dozen date formats and number rounding. An Airtable rich-text field arrives as real bold, italic and links rather than markdown symbols.

Google Docs: documents that grow with the data

Docs uses loops directly. A loop can repeat a phrase, a table row, several rows, a whole table or a run of paragraphs, and a paragraph loop can wrap a table that has its own row loop: one heading and one filled table per department. Pages break where Google lays them out, so a Docs template is the right choice when the length of the document depends on how much data there is.

SourceToDocs dataset builder: an Airtable table with four selected fields and a filtered subset
The data side of a template: the fields a document reads, and the filtered subsets its slides and loops are bound to.

Honest limits

  • Google Slides and Google Docs only. There is no PowerPoint or Word template; a PDF can be exported alongside each generated file.
  • A Slides table row cannot repeat per record yet. Lay out the rows you need and index them, or use a Docs template.
  • A Google Slides deck holds at most 300 slides. A run that would make more keeps the first 300 and says so; split the output to get everything.
  • Docs cannot nest one paragraph loop inside another. Loops inside tables inside a paragraph loop are fine.

Related reading