Is there an appscript that can merge 2 or more google slides into a new slide deck ?

I am working on an Appsheet where I have listed all the files from a Google Drive Folder in a view. All these files are Google Slides. I want to have a setup in which I can select a few files (Google slide files) and merge them completely to create a new slide deck. 

I am looking for a script that can perform this task so that I can integrate it with my AppSheet. Or if there's any other way I can achieve this?

Thanks

1 1 1,551
1 REPLY 1

I did manage to come up with a script that can merge multiple google slides files together. Here is the code if anyone is interested:-

function mergeSlides(presentationURLs) {  // -> array of presentation slides to be merged
var newdeck = SlidesApp.create("Merged Presentation");  //name of the new file
var newURL = newdeck.getUrl();
var newdeck = SlidesApp.openByUrl(newURL);   //creat and open the new deck

for (let j=0; j<presentationURLs.length; j++)  //for each url
{
  var tobeappended = SlidesApp.openByUrl(presentationURLs[j]);
  var slides = tobeappended.getSlides();
  for (let i=0; i<slides.length; i++)  //for each slide of the file
  {
    newdeck.appendSlide(slides[i]);
  }
}
var newslides = newdeck.getSlides();
newslides[0].remove();
}

I am looking for a way to integrate it with the appscript so I can run it on the selected files. 

Top Labels in this Space
Top Solution Authors