google-apps

Debug a Google Apps Script which is triggered by post request?

一笑奈何 提交于 2020-07-20 04:29:07
问题 I have a simple script in Google Sheets which is trigger by a command in Slack and just adds the Slack message as a new row. It is quite a simple function and is deployed as a web app and does work: function doPost(req) { var sheet = SpreadsheetApp.openById('[My Sheet Id]'); var params = req.parameters; Logger.log(params.text); sheet.appendRow(params.text); return ContentService.createTextOutput("Saved your entry:" + params.text); } However the Logger.log function never logs anything in the

How to update permissions in Google Drive API v3?

给你一囗甜甜゛ 提交于 2020-07-13 15:44:12
问题 I uploaded wav file using service account, service account created the file, service account is the owner: metadata = {'name': filename, 'parents': [FolderId]} media = MediaFileUpload(filepath, mimetype='audio/wav') r = drive.files().create(body=metadata, media_body=media, fields='id').execute() {'permissions': [{'deleted': False, 'displayName': 'My name', 'emailAddress': 'myemail@gmail.com', 'id': '00654354190098938408', 'kind': 'drive#permission', 'photoLink': 'https://lh6.googleusercontent

How to update permissions in Google Drive API v3?

China☆狼群 提交于 2020-07-13 15:40:27
问题 I uploaded wav file using service account, service account created the file, service account is the owner: metadata = {'name': filename, 'parents': [FolderId]} media = MediaFileUpload(filepath, mimetype='audio/wav') r = drive.files().create(body=metadata, media_body=media, fields='id').execute() {'permissions': [{'deleted': False, 'displayName': 'My name', 'emailAddress': 'myemail@gmail.com', 'id': '00654354190098938408', 'kind': 'drive#permission', 'photoLink': 'https://lh6.googleusercontent

Create my own Google site template Using my own CSS [duplicate]

ε祈祈猫儿з 提交于 2020-06-27 03:48:08
问题 This question already has an answer here : How to create a custom Google Sites theme? (1 answer) Closed 2 years ago . Is there a way to create my custom Google site using my own CSS code? I have tried putting <style> but google won't allow me. I can use several inline CSS, but i have noticed that some CSS are not allowed too. e.g position:absolute; I'm asking this because i can see some websites selling Google site templates. How did they manage to do those template? What language are they

Create my own Google site template Using my own CSS [duplicate]

自古美人都是妖i 提交于 2020-06-27 03:47:26
问题 This question already has an answer here : How to create a custom Google Sites theme? (1 answer) Closed 2 years ago . Is there a way to create my custom Google site using my own CSS code? I have tried putting <style> but google won't allow me. I can use several inline CSS, but i have noticed that some CSS are not allowed too. e.g position:absolute; I'm asking this because i can see some websites selling Google site templates. How did they manage to do those template? What language are they

get Entry ID which is used to pre-populate fields (Items) in a Google Form URL

送分小仙女□ 提交于 2020-06-23 03:07:35
问题 NOTE: This question is not about finding ID of an Item (form element), but an ID of Entry. These are different things. Entry ID is a number which is used to pre-populate fields (Items) in a form URL. As described here https://developers.google.com/apps-script/reference/forms/text-item it is possible to get a TextItem ID (actually, any Item ID) via getID() method. If you open any public Google Form HTML source code you will see something like this in the var FB_PUBLIC_LOAD_DATA : [232495719,

Google Sheets: count numbers of HYPERLINKS where value > 0

本小妞迷上赌 提交于 2020-06-17 02:05:05
问题 I have a range of cells in Google Sheets Some of these cells contain values (numbers) some with and others without HYPERLINKS I need to count the number of hyperlinks for this range of cells if the value > 0 This function works fine, but does not include any cell-values Counting hyperlinks on Google Sheets formula 回答1: You want to calculate the number of cells which have the formulas of =HYPERLINK() and the value more than 0 . This is run for one row and also there are the cells which have no

Can I generate a file from Google Sheets script?

与世无争的帅哥 提交于 2020-05-24 21:28:09
问题 I'm using Google Sheets to prototype a bunch of numerical data for something I'm doing. Is there a way to export a subset to a text file? Effectively, what I'm aiming to do is export a file I can include directly in the build for another project. So is there a way to generate a text file for download? 回答1: If you have a Google Apps account, then you can use DocsList.createFile() to create the text file and save it in your documents list. Section 3 of this tutorial shows how to save the

Can I download file from URL link generated by google apps script

前提是你 提交于 2020-05-11 07:20:07
问题 Please help I'm learning google-apps-script for short time. I want to download file from remote site by url generating from data that stores in my spreadsheet. for example, i have 2 paremeters: Cell1 = val1, val2, ... valN Cell2 = val21, val22, ... val2N I split string from cell data to Arrays and than generate URL. for example: http://mysite.com/files/file.val1.val22.zip Than i need to download file from this link... Can I do this process automaticaly ? 回答1: This example function will

Google Apps Script: AuthMode gets confused w/ multiple logged in users

本小妞迷上赌 提交于 2020-04-07 06:17:19
问题 I'm bumping into a weird problem in Google Apps Script, working on a Slides add-on. When I run the add-on in an incognito window with just one user logged in (call it User B), everything works fine. When I run the add-on with multiple users logged in (call it Users A and B in the same Chrome tab), it seems like Apps Script gets confused around the authorization. When I try to use the add-on as User B (as evidenced by the profile showing up in the upper right corner), all functionality of the