google-apps-script

How do I pass unique values in Google Sheet to HTML Email template

六眼飞鱼酱① 提交于 2020-07-23 06:38:17
问题 I have a google sheet that has project data(project code, name, dates project leaders et.c) and I am trying to get row data for unique values in this case emails. If for example email johndoe@testmail.com appear x number of times, the row data should be captured and passed to html file then emailed to johndoe@testmail.com same case to other emails. So specific project leaders should receive emails on only the projects they lead. I have am newbie in JavaScript/GAs, and have done tonnes of

How to include a specific range only in a pdf exported from a Google Sheets spreadsheet

旧巷老猫 提交于 2020-07-23 06:33:37
问题 I have a sheet that I would like to send a specific range (A1:O44) as a pdf document and leave out further information in other cells. Currently, it is all functioning to send these sheets and all is working fine, however, I cannot seem to get the script correct to limit it to a certain range in the sheet. There are 2 tabs in the sheet and I would like both of those to be sent in one email as part of the same attachment (as is currently set up). The email is generated by clicking the submit

How to include a specific range only in a pdf exported from a Google Sheets spreadsheet

我是研究僧i 提交于 2020-07-23 06:31:21
问题 I have a sheet that I would like to send a specific range (A1:O44) as a pdf document and leave out further information in other cells. Currently, it is all functioning to send these sheets and all is working fine, however, I cannot seem to get the script correct to limit it to a certain range in the sheet. There are 2 tabs in the sheet and I would like both of those to be sent in one email as part of the same attachment (as is currently set up). The email is generated by clicking the submit

Slides App: getActivePresentation error after v8 migration

无人久伴 提交于 2020-07-23 06:14:54
问题 Seems to happen when you are logged in with 2 different accounts to Google and test the app - 1 account in Chrome browser and another in Google Slides app or Apps Script panel. Other than that, all works fine. I have a function imageToSlide called from html template like this: google.script.run .withSuccessHandler(sidebar.onSuccess) .withFailureHandler(sidebar.onAddDocumentError) .imageToSlide(url, link, width, height); Inside it I do var presentation = SlidesApp.getActivePresentation();

Slides App: getActivePresentation error after v8 migration

泪湿孤枕 提交于 2020-07-23 06:13:22
问题 Seems to happen when you are logged in with 2 different accounts to Google and test the app - 1 account in Chrome browser and another in Google Slides app or Apps Script panel. Other than that, all works fine. I have a function imageToSlide called from html template like this: google.script.run .withSuccessHandler(sidebar.onSuccess) .withFailureHandler(sidebar.onAddDocumentError) .imageToSlide(url, link, width, height); Inside it I do var presentation = SlidesApp.getActivePresentation();

Slides App: getActivePresentation error after v8 migration

守給你的承諾、 提交于 2020-07-23 06:12:32
问题 Seems to happen when you are logged in with 2 different accounts to Google and test the app - 1 account in Chrome browser and another in Google Slides app or Apps Script panel. Other than that, all works fine. I have a function imageToSlide called from html template like this: google.script.run .withSuccessHandler(sidebar.onSuccess) .withFailureHandler(sidebar.onAddDocumentError) .imageToSlide(url, link, width, height); Inside it I do var presentation = SlidesApp.getActivePresentation();

Inserting image into Google Doc with apps script says invalid image data

旧时模样 提交于 2020-07-22 18:26:15
问题 I am trying to insert all images from a Google Drive folder into a Google document. But on insertImage I always get an "invalid image data" error. function myFunction() { var folder = DriveApp.getFolderById(id); var files = folder.getFiles(); while (files.hasNext()) { var file = files.next(); var img = file.getBlob(); var imgDoc = DocumentApp.getActiveDocument().getBody().insertImage(0, img); } } There are numerous examples that explain how to do this, and all say to get the image blob and

Script Error on internal function when calling another function in a library

我与影子孤独终老i 提交于 2020-07-22 14:18:46
问题 I am having an issue with a script that references a library. My issue is not connecting to the library, its that my script calls a function, but when it runs, it errors out on a function that I am not referencing. In sheet A, I have this code: function DataPull() { MasterScriptLibrary.DataPullBillable() } In MasterScriptLibrary (project's full name is 2020 Master Script Library), I have 2 distinct functions (they don't reference each other at all) called convertPersonnel and DataPullBillable

Script Error on internal function when calling another function in a library

僤鯓⒐⒋嵵緔 提交于 2020-07-22 14:18:01
问题 I am having an issue with a script that references a library. My issue is not connecting to the library, its that my script calls a function, but when it runs, it errors out on a function that I am not referencing. In sheet A, I have this code: function DataPull() { MasterScriptLibrary.DataPullBillable() } In MasterScriptLibrary (project's full name is 2020 Master Script Library), I have 2 distinct functions (they don't reference each other at all) called convertPersonnel and DataPullBillable

Appscript: Add data from Google Spreadsheets to Firebase RealtimeDB node

拟墨画扇 提交于 2020-07-22 11:08:09
问题 Im trying to add data from google's sheets to firebase. This is my spreadsheet and this is what im trying to achieve -> RealtimeDb This is what i have done so far, but it creates new node Items and put only the values without their names. Like What it does --> Items >0 1: 'name of the product' 2: 'product barcode'..etc ------------------ What i want --> Items > examplebarcode : itemname : 'radeonRX' itembarcode: '234523523523' var secret = '...' function getFirebaseUrl(jsonPath) { return (