I am using this script to download a URL set in a google sheet cell to a specific folder in google drive called "game_thumb" If cell B1 is "yyyyy.com/picture.png" I expect picture.png to be downloaded to the google drive folder. I get an error"ReferenceError: "DocsList" not defined. (line 5). I also would like the file to be renamed to include Cell A1 (contentCellA1_picture.png) before it is downloaded to drive. The code I use:
function getFile(fileURL) { // see https://developers.google.com/apps-script/class_urlfetchapp var response = UrlFetchApp.fetch(fileURL); var fileBlob = response.getBlob() var folder = DocsList.getFolder('game_thumb'); var result = folder.createFile(fileBlob); debugger; // Stop to observe if in debugger }