We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e1295c commit d56f005Copy full SHA for d56f005
slides/thumbnail/thumbnail.gs
@@ -0,0 +1,15 @@
1
+/**
2
+ * Saves a thumbnail image of the current Google Slide presentation in Google Drive.
3
+ * Logs the image URL.
4
+ * @param {number} i The zero-based slide index. 0 is the first slide.
5
+ * @example saveThumbnailImage(0)
6
+ */
7
+function saveThumbnailImage(i) {
8
+ var presentation = SlidesApp.getActivePresentation();
9
+ var thumbnail = Slides.Presentations.Pages.getThumbnail(presentation.getId(),
10
+ presentation.getSlides()[i].getObjectId());
11
+ var response = UrlFetchApp.fetch(thumbnail.contentUrl);
12
+ var image = response.getBlob();
13
+ var file = DriveApp.createFile(image);
14
+ Logger.log(file.getUrl());
15
+}
0 commit comments