function SAVEFILE(e) {
const messageId = e.message.id;
const url = "https://api-data.line.me/v2/bot/message/"+ messageId +"/content";
const headers = {
'Authorization': 'Bearer ' + ACCESS_TOKEN
};
const response = UrlFetchApp.fetch(url, { headers: headers, muteHttpExceptions: true });
const blob = response.getBlob();
const folder = DriveApp.getFolderById(FOLDER_ID);
const file = folder.createFile(blob);
const urlFile = file.getUrl()
return "บันทึกเรียบร้อย URL:" + urlFile
}
Upoad รูปภาพ วิดีโอ และไฟล์ เข้า Drive ผ่าน Line OA
RELATED ARTICLES