Design your template slide first, then write zero layout code
Open your Google Slides deck and style slide 1 exactly the way you want every output slide to look — fonts, colors, logo, background, the works. Anywhere you want dynamic data, type a placeholder in double curly braces: {{Name}}, {{Title}}, {{Revenue}}. The exact string inside the braces must match your spreadsheet column header, case-for-case.
That one slide is the only design work you do. The script calls template.duplicate() in a loop, which copies every shape, image, and style perfectly. replaceAllText then walks every text box on the duplicate and swaps {{Name}} for the actual cell value. You never call addTextBox or setFontSize. I keep a notes column in my sheet that I deliberately leave out of the template so it never shows up on slides — just don't add a {{Notes}} placeholder and the column is ignored.
Put your spreadsheet data on a sheet named Data with column headers in row 1. The script reads headers = rows[0] and constructs the tag string from each header name, so adding a new column to your sheet automatically wires up a new placeholder — no code change required.