Created
June 23, 2025 21:24
-
-
Save andycasey/1008a1df3b9fa0cd08b8753f997fcf00 to your computer and use it in GitHub Desktop.
Google Apps Script for converting all slide decks in a folder to PDF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function convertSlidesInFolderToPdf(fromFolderId, destinationFolderId) { | |
const folder = DriveApp.getFolderById(fromFolderId); | |
const destinationFolder = DriveApp.getFolderById(destinationFolderId); | |
const files = folder.getFilesByType(MimeType.GOOGLE_SLIDES); | |
while (files.hasNext()) { | |
const file = files.next(); | |
const deck = DriveApp.getFileById(file.getId()); | |
const pdfBlob = deck.getBlob().setName(file.getName() + ".pdf").getAs('application/pdf'); | |
destinationFolder.createFile(pdfBlob); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment