Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Download all attachments
function downloadAllFiles(notification)
{
var card = new Notification(notification).addedLabel("Download").card();
var folder = DriveApp.createFolder(card.id());
card.attachments().each(function(att)
{
var file = Trellinator.downloadFileToGoogleDrive(att.link());
folder.addFile(file);
});
card.attachLink({name: "All Attachments",link: folder.getUrl()});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment