I am working on a code that creates some images in a Google Drive folder and then downloads them.
I already have the download URLs of the files from file.getDownloadURL()
, but I don't know how to make the request to download them.
Already tried someting like this but I guess it is not the way.
function myFunction() {
var carpeta = DriveApp.getFolderById(id);
var archivos = carpeta.getFiles();
var archivo = archivos.next();
var link = archivo.getDownloadUrl();
var response = UrlFetchApp.getRequest(link);
}