google-apps-script

Copy image from Google Sheets to Google Docs using Google Apps Script

烂漫一生 提交于 2020-05-16 13:30:07
问题 I was working on generating a report as Google Docs document using data from spreadsheets. Some parts of the sheets contain a step-by-step screenshot walkthrough (That is, text, image, text, image vertically). That needs to be copied to the doc. I have read through Google Apps Script reference and found that OverGridImage represent the image in the file. However, there was no method that allows exporting as a blob, or even a URL. (Since the image pasted on the sheets come directly from

How to compress files in google drive?

回眸只為那壹抹淺笑 提交于 2020-05-16 11:29:41
问题 Is there any way to compress large files into smaller .zip of .tar.gz files in google drive? I tried google appscript but it created .zip files but not compressing. How to do this? 回答1: I have tried and tested the below code with a pdf file which is in my Drive of 10MB size and it did compressed it for 9MB. I even tested for a Drive file(slides), it did compress it. function fileZip(){ var files = DriveApp.getFilesByName('Google_Apps_Script_Second_Edition.pdf'); while (files.hasNext()) { var

How to compress files in google drive?

扶醉桌前 提交于 2020-05-16 11:27:30
问题 Is there any way to compress large files into smaller .zip of .tar.gz files in google drive? I tried google appscript but it created .zip files but not compressing. How to do this? 回答1: I have tried and tested the below code with a pdf file which is in my Drive of 10MB size and it did compressed it for 9MB. I even tested for a Drive file(slides), it did compress it. function fileZip(){ var files = DriveApp.getFilesByName('Google_Apps_Script_Second_Edition.pdf'); while (files.hasNext()) { var

How to compress files in google drive?

折月煮酒 提交于 2020-05-16 11:25:33
问题 Is there any way to compress large files into smaller .zip of .tar.gz files in google drive? I tried google appscript but it created .zip files but not compressing. How to do this? 回答1: I have tried and tested the below code with a pdf file which is in my Drive of 10MB size and it did compressed it for 9MB. I even tested for a Drive file(slides), it did compress it. function fileZip(){ var files = DriveApp.getFilesByName('Google_Apps_Script_Second_Edition.pdf'); while (files.hasNext()) { var

Apps Script vs Chrome Extension: Writing an alternative spellchecker to Google Docs

半城伤御伤魂 提交于 2020-05-16 08:55:50
问题 Say, I want to develop an alternative spellcheck module to google docs . This means that I have to get corrections from my backend, and color the misspelled text's background, and do a small popup bubble when user hovers over it, where I'd display the correction. (please mind that spellcheck is not the actual goal of my project, but it does address my problems in a more simplified way) What are my options? Any ideas how to do this? Few possible solutions I came up with: Chrome extension vs

Apps Script vs Chrome Extension: Writing an alternative spellchecker to Google Docs

你。 提交于 2020-05-16 08:54:28
问题 Say, I want to develop an alternative spellcheck module to google docs . This means that I have to get corrections from my backend, and color the misspelled text's background, and do a small popup bubble when user hovers over it, where I'd display the correction. (please mind that spellcheck is not the actual goal of my project, but it does address my problems in a more simplified way) What are my options? Any ideas how to do this? Few possible solutions I came up with: Chrome extension vs

ReferenceError: ConferenceDataService is not defined

Deadly 提交于 2020-05-15 22:52:49
问题 I am trying to develop google calendar add-on like zoom meeting. In appsscript.json file, below code is there. "calendar": { "conferenceSolution": [{ "onCreateFunction": "createConference", "id": "1", "name": "Meeting", "logoUrl": "https://companyxyz.com/images/logo192.png" }], "eventOpenTrigger": { "runFunction": "buildSimpleCard" }, "currentEventAccess": "READ_WRITE" } } In Calendar.gs, below code is there. function createConference(e) { Logger.log(e); var dataBuilder =

Google Apps Scripts: import (upload) media from Google Drive to Google Photos?

核能气质少年 提交于 2020-05-15 21:45:47
问题 I see that we can import (upload) media (photos, videos,...) from Google Drive to Google Photos. My goal is: do this task with code. I have successfully got a list of photos from Google Drive, and I store their IDs in an Array. I have this code: var arrId = [ //Some image id... ]; var length = arrId.length; var driveApplication = DriveApp; for(var i=0;i<length;++i) { var file = driveApplication.getFileById(arrId[i]); //Now I got the file, how can I programmatically import this file to Google

Google Apps Scripts: import (upload) media from Google Drive to Google Photos?

早过忘川 提交于 2020-05-15 21:45:46
问题 I see that we can import (upload) media (photos, videos,...) from Google Drive to Google Photos. My goal is: do this task with code. I have successfully got a list of photos from Google Drive, and I store their IDs in an Array. I have this code: var arrId = [ //Some image id... ]; var length = arrId.length; var driveApplication = DriveApp; for(var i=0;i<length;++i) { var file = driveApplication.getFileById(arrId[i]); //Now I got the file, how can I programmatically import this file to Google

Google Apps Script: “Unreachable Service: mirror” error

拈花ヽ惹草 提交于 2020-05-15 11:43:45
问题 Some months ago (while Apps Script was using the Rhino runtime) I wrote a script using the Google Classroom API. All the functions in the script always worked fine. When in February Google changed to the Chrome V8 runtime, I migrated my script and it continued working fine. Today, when I try to run any of the functions of this script, I get an "Unreachable Service: mirror" error. No matter the function called. Other person reported 9 days ago a similar error (googlesheets script error