Google Slides - How to *iteratively* create dynamic content from a bundle? (foreach)

I know you can use two Make modules (“Create a Presentation From a Template” or “Create a Slide from a Template Slide”) to dynamically create Google Slides content…

But the technique relies on replacing specific {{tags}}.

What if, instead of being specific, you want to create Slides content in a repeating fashion, from a source containing multiple items, but an unknown volume?

Lets say an Airtable contains a list of blog posts, records or something similar. How could you use Make to replace not only a single instance of {{Title}}, {{Author}} and {{Image}} but, actually, to insert the content for however-many records there happen to be… ?

Basically, it’s a foreach.

The layout could be tiles like this, or it could be a table. The point is, I just can’t yet see a technique to execute this…

I guess one way would be to specifically code in template tags for the max number of imaginable records, in specific places… eg. {{Blog_Title_01}} … {{Blog_Title_42}}… and then, after generation, discard any unused slides which still have the tags in place. But is that really the best way?

This user has asked something similar, but for Sheets-to-Docs - Create a Google Docs Document from a Template to insert a dynamic table

1 Like

Hello :wave:t5:

Unfortunately, this is not something that can be easily achieved.
I believe, that due to the complexity of Google Slides API, Make chose the approach with replacing tags (placeholders) rather than creating slide objects “from scratch”.

You could use the “Text Aggregator” module to dynamically create a slide text body with various tags. Always the same number of iterations as you would need (e.g. as the number of items from Airtable).
Such a body could then be used in the “Add/Delete a Slide” module.





The above can then dynamically prepare a template for further use.


The “Create a Presentation From a Template” module can then be fed with an array of such tags and their values which worked for me.
It, however, does not work well with the “Upload an Image to a Presentation” module which is a shame as it would sort your challenge.

I would then recommend exploring the use of the “Make an API Call” module with a custom API call to Slides API which theoretically could be used for dynamic slide/presentation creation with an unlimited number of items/images.

Cheerio :cat_roomba:

2 Likes

Smart stuff. I have indeed ended up using something like this… making a multi-bundle beforehand and then, repeating through, actually, replacing a {tag_N}, wherein N corresponds to the bundle number.

I think this can work for image upload, too, when it replaces a tag value.

Thanks.

3 Likes

@ABoyer Thanks for the tip. I’ll take a look, though it doesn’t seem to have a Make integration… ?