Google-apps-script – Add progress bar to Google Slides

google-apps-scriptgoogle-apps-script-add-ongoogle-slides

I want to add a rectangle along the bottom of each slide that displays the progress through the presentation. For example, if there were 10 slides, and the slide template is 10" wide, then the first slide's rectangle would be 1" wide, the second one would be 2" wide, and so on.

I can do it manually, but it seems like an easy thing to write an add on for. I found an add-on tutorial that does exactly what I want, but when I go to the "Try it out" section, the sub-menu never appears under the Add-ons menu. Is this tutorial out of date? Has anyone else gotten it to work recently?

I found an add on in the marketplace that looks like a packaged version of the tutorial, but it says it's unverified and won't let me install it.

This app has not been verified yet by Google in order to use Google Sign In.

Has anyone found a way to make progress bars that is easier than manually adjusting the size of the rectangles on each slide?

Best Answer

Thanks to Rubén's comment, I looked at the execution transcript, and found this error:

[19-11-28 15:11:32:379 PST] Starting execution
[19-11-28 15:11:32:498 PST] SlidesApp.getActivePresentation() [0.114 seconds]
[19-11-28 15:11:32:570 PST] Execution failed: Authorization is required to perform that action. (line 6, file "progress") [0 seconds total runtime]

The troubleshooting guide tells you how to authorize the script.

To authorize the script, open the Script Editor and run any function. The authorization prompt appears so you can authorize the script project. If the script contains new unauthorized services, you must re-authorize the script.

I ran the onInstall function, authorized the script when prompted, and then I was able to use the add on to add a progress bar to the slides.