google-apps-script

DocsList.createFile sometimes creates blank or corrupted PDF

淺唱寂寞╮ 提交于 2021-02-05 09:43:44
问题 I'm trying to create a google document (I would love to create it as HTML if this could work that way) then export that document as a pdf to send as an email attachment. Here is the basic structure that I have var docName = "test"; var doc = DocumentApp.create(docName); doc.appendParagraph("Hello World"); DocsList.createFile(docName, doc.getAs('application/pdf').getBytes(), 'application/pdf'); But this behaves oddly. Sometimes it creates a blank pdf, sometimes a corrupted one that doesn't

Embed image from google drive without grey border and zooming tools?

僤鯓⒐⒋嵵緔 提交于 2021-02-05 09:39:18
问题 I have a webpage that has an image that is stored in google drive, and using the google drive embed code results in this- and I want to include this image in my website without the border and tools, making it look like this- Adding the image file to my project is not an option, as I am using google apps script as web domain as I am not old enough to have a credit card to purchase REAL web domain, and I am broke and cannot simply rake leaves or shovel driveways because of COVID. so I cannot

How can I add new sections to an existing card on Gmail Addon?

半世苍凉 提交于 2021-02-05 09:38:07
问题 I'm actually trying to create a Chat interface in Gmail using Add-ons with App Script. All the interactions are working. But it keeps navigating to different cards rather than have it all in one card. Like in Google Tasks. Is there a way in which I can just keep adding sections to the same card dynamically to create a chat like interface. I assume if it is possible on Google Tasks Add-on it should be possible in this case too. Please help me out as it is a necessary requirement. 回答1: Update :

How can I collect all of the data on a Google spreadsheet and then clear it after the script has been run?

为君一笑 提交于 2021-02-05 09:36:19
问题 I am creating a script that will grab all unread e-mails, move the bodies of these e-mails into a Google spreadsheet, push all of this data through to Slack via webhook, then clear the sheet. The first part of the script that grabs the unread e-mails and puts it in the appropriate cells is working fine. The part where it is pushing the data through is not working. I have it set to a loop to make sure that it grabs all of the data, but it is not working. I have tried to make it not show up as

Delete row in google spreadsheet from a specific range based on values from another specific cell range

泄露秘密 提交于 2021-02-05 09:30:23
问题 I need a little help with my script. First, here is a link to the ss: https://docs.google.com/spreadsheets/d/1TgG64irjoxkV9wKlT5bEnaNEWlGyOlNxVoLxOmQZ2BA/edit?usp=sharing I want to delete rows from sheet "Team 1" (range: A15:A41), based on values from sheet "Overview" (range: C4:C12). Basically, if any value from C4:C12 is found in A15:A41, the row where is found should be deleted. Ex. for my ss: C4 = 3, that means in sheet "Team 1", row 17 should be deleted. My script so far: function

Delete row in google spreadsheet from a specific range based on values from another specific cell range

两盒软妹~` 提交于 2021-02-05 09:29:58
问题 I need a little help with my script. First, here is a link to the ss: https://docs.google.com/spreadsheets/d/1TgG64irjoxkV9wKlT5bEnaNEWlGyOlNxVoLxOmQZ2BA/edit?usp=sharing I want to delete rows from sheet "Team 1" (range: A15:A41), based on values from sheet "Overview" (range: C4:C12). Basically, if any value from C4:C12 is found in A15:A41, the row where is found should be deleted. Ex. for my ss: C4 = 3, that means in sheet "Team 1", row 17 should be deleted. My script so far: function

Google AppScript syntax error for sendemail. Can't ID my problem

好久不见. 提交于 2021-02-05 09:27:29
问题 I am trying to get Google sheets to send personalized emails from long list on another sheet in the workbook. I used a tutorial (as I am a certified novice at all coding languages) but the AppScript is telling me that line 4 has a syntax error. I cannot for the life of me figure out what I've done wrong, but I'm sure that its blatantly obvious when explained by someone with these legitimate skills. Here is the script: function sendEmail() { var ss = SpreadsheetApp.getActiveSpreadsheet() var

Google app script web app getActiveUser.getEmail() not working when deployed as USER_DEPLOYING

ⅰ亾dé卋堺 提交于 2021-02-05 09:26:28
问题 I am trying to create a web app which will be using google sheets as backend. I want to enable users to access the web app and perform read/write operations through web app only. I do not want those users to have an access to the google sheet as I want to limit the data they can read through the web app. I tried using USER_DEPLOYING as the execute as, but doing so I am not able to get the person's email who is using the web app. Is there any way to achieve what I am trying to do? 回答1: Issue:

Using onEdit trigger, is there a way to make sure the last row in a Sheet is visible to users?

橙三吉。 提交于 2021-02-05 09:25:09
问题 I have a Google Sheet that accumulates up to 100 entries per day. As users add new entries, the script puts new data into the last row (see snippet below). However, there are only 12 rows visible on the screen, so once those are filled, the user can't see new entries. How can I make the last row visible to the user each time data is entered? I am new to google-apps-script, so thanks for any ideas. I believe onEdit trigger no longer works with sheet.setActiveRange() , so I am looking for a

Google apps script stopped after just one iteration

不想你离开。 提交于 2021-02-05 09:11:36
问题 I have a little function in google app script that have to do some things in a for loop, i.e.I have 3 rows with some values and for each row I have to update a sheet, but unfortunately I don't understand why but after just one loop the program stopped! And there are no return statements. this is the code: function movimentiRicorrenti(){ tempoInizioScript = new Date(); var rigaInizio = 2 Logger.log("Data e ora script movimenti ricorrenti: " + Utilities.formatDate(new Date(), "GMT+0200", "dd/MM