Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

258
Views
Is there a way to programmatically copy slide thumbnails as linked objects from Google Slides to Google Docs?

I know that when you manually copy and paste a slide from GSlides to GDocs, there is an option to 'Link to presentation', which allows the pasted image/object in GDocs to remain linked to the original presentation. When the original presentation is updated, a 'Refresh' button appears on the linked object in GDocs, and clicking it syncs the object with the original slide. However, doing this for a big presentation with dozens/hundreds of slides is tedious and time-consuming, so I am trying to write a script in GSlides, which automates copying and pasting linked thumbnails of slides into a GDocs file.

I have found a way to get an image of the thumbnail from GSlides to a GDocs file using Apps Script, but this thumbnail remains as a static image, and there is no way to 're-sync' it to reflect future changes in the presentation. I have also tried programmatically setting a 'LinkUrl' for the pasted image, and setting this Url to the Url which points to the exact slide which the image corresponds to, but this is not the same as manually pasting the slide in, and doesn't link it in the same way - the image still remains static.

This is my Apps Script code which does what I've described above:

function exportSlideImages(presentationId) {
  let presentation = SlidesApp.openById(presentationId);
  let doc = DocumentApp.create('Synced doc');

  presentation.getSlides().forEach(function(slide, i) {
    let thumbnail = Slides.Presentations.Pages.getThumbnail(presentationId, slide.getObjectId(), {
      'thumbnailProperties.thumbnailSize': 'SMALL'});
    let response = UrlFetchApp.fetch(thumbnail.contentUrl);
    let blob = response.getBlob();
    blob.setName('slide' + (i + 1) + '.png');

    let url = SlidesApp.getActivePresentation().getUrl();
    let sldId = SlidesApp.getActivePresentation().getSlides()[i].getObjectId();
    url = url + '/edit#slide=id.' + sldId;

    doc.getBody().insertImage(i,blob).setLinkUrl(url);
 });
}

function test() {
  exportSlideImages(SlidesApp.getActivePresentation().getId())
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!