Created
May 24, 2019 14:42
-
-
Save iaindooley/5e7a9c89370b71181b2dd3e4e0015bee to your computer and use it in GitHub Desktop.
Download all attachments
This file contains 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 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