I need to extract all slide titles from a 100 slide presentation to create a table of contents google document. All the slides follow a strict template so the titles are more or less uniform throughout the presentation.
I am trying to do this using the google slides api–where I can get a json representation of the slide document:
https://slides.googleapis.com/v1/presentations/[presentation id]
But the json seems to be more a collection of shapes and text boxes and it does not seem to trivial to only extract the title text box and its contents.
Does anyone have a way to generate a table of contents automatically or an App script or google slides API way of doing this?
Thanks in advance.
Hari
Best Answer
I wrote an enormous set of code to go through every slide and look through every page element.
CAVEATS:
You can add the code to any slide deck but it also lets you look through your drive and select a presentation to add the TOC to. No code is added to that presentation.
https://docs.google.com/presentation/d/1X_zyari_BpEWjJAqnOLrb6rWQvZBvR2wNoBgg5WrgIs/copy
I am very new at coding so perhaps someone else will pick this up and polish it.