google-apps

Google Calendar JSON API: Full-day events always one day longer

可紊 提交于 2019-12-02 18:56:22
问题 Since recently the JSON API always seems to add a day when returning the timespan for full-day events. Display in Google Calendar Web app: Yet what the JSON API returns is this: { "kind": "calendar#event", "etag": "\"2896554426340000\"", "id": "...", "status": "confirmed", "htmlLink": "https://calendar.google.com/calendar/event?eid=...", [...] "summary": "...", [...] "start": { "date": "2016-02-01" }, "end": { "date": "2016-02-02" }, [...] "iCalUID": "...@google.com", "sequence": 0 } 回答1: In

Google Scripts Returning Not a Number

和自甴很熟 提交于 2019-12-02 12:26:39
问题 I've been working on Google Scripts for a bit, but I can't seem to find the solution to my problem. What I am trying to do is multiply the contents of two cells on a spreadsheet together with my function calculateRates() . Here is my code: /** @customFunction */ function calculateRates(hourDecimal, personRate) { var ss = SpreadsheetApp.getActiveSpreadsheet(); //Access spreadsheet var sheet = ss.getSheets()[0]; //Access sheet var range = sheet.getDataRange(); //Access all cells var values =

Create new Doc in Google drive after processing uploaded text file

帅比萌擦擦* 提交于 2019-12-02 11:22:26
问题 I successfully upload a text file to google Drive and I have written a method that successfully translates text to pig latin. now I am attempting to create a new document in Google Drive to output the translated text. However I always receive the message: "an error Occurred" and when I check my Drive I only have the original uploaded text. Here is my code: function doGet(e) { var app = UiApp.createApplication().setTitle("Upload"); var formContent = app.createVerticalPanel(); formContent.add

Google Calendar JSON API: Full-day events always one day longer

家住魔仙堡 提交于 2019-12-02 10:23:15
Since recently the JSON API always seems to add a day when returning the timespan for full-day events. Display in Google Calendar Web app: Yet what the JSON API returns is this: { "kind": "calendar#event", "etag": "\"2896554426340000\"", "id": "...", "status": "confirmed", "htmlLink": "https://calendar.google.com/calendar/event?eid=...", [...] "summary": "...", [...] "start": { "date": "2016-02-01" }, "end": { "date": "2016-02-02" }, [...] "iCalUID": "...@google.com", "sequence": 0 } In the Calendar API the start is inclusive and the end is exclusive. That's why the end will be the next day

YouTube Apps Script API only runnable by accounts without a YouTube channel?

无人久伴 提交于 2019-12-02 07:56:21
This is such a strange issue and there seems to be no documentation of it anywhere online. Whenever I try to execute a script that requires authorization to access an API, the code will only continue executing after authorization if I choose to authorize it from a GMail account, but not a YouTube account. The code literally does not execute after choosing to authorize it from a YouTube account. Even a Logger.Log() call on Line 1 of the function will not trigger unless the code is authorized from a GMail account only. When authorizing from a YouTube account, it will continually loop and request

Show/Hide content in a Gmail email body

本秂侑毒 提交于 2019-12-02 05:30:08
问题 Our organization is completely on Gmail (Google Apps), and we are trying to figure out a way to show/hide content in the body of the email and have the recipient decide whether to show the content or collapse it to hide it. The reason why we need to do this is because we send out generic emails in various languages, so we want the recipient to simply click on their language and have the email show the text in that language. Things we want to avoid: Sending multiple emails out in different

Google Scripts Returning Not a Number

▼魔方 西西 提交于 2019-12-02 05:08:48
I've been working on Google Scripts for a bit, but I can't seem to find the solution to my problem. What I am trying to do is multiply the contents of two cells on a spreadsheet together with my function calculateRates() . Here is my code: /** @customFunction */ function calculateRates(hourDecimal, personRate) { var ss = SpreadsheetApp.getActiveSpreadsheet(); //Access spreadsheet var sheet = ss.getSheets()[0]; //Access sheet var range = sheet.getDataRange(); //Access all cells var values = range.getValues(); //Call to get value of certain cell var totalEarned = hourDecimal * personRate; Logger

How do I get a Google Drive App's Open URL?

╄→尐↘猪︶ㄣ 提交于 2019-12-02 04:50:37
I am hoping to programatically open a drive file with a particular app using the Google drive APIs. The aim is to mimic the GUI drive method of launching an app using the "Open With" context menu for a selected file. While I can get a list of the available apps using apps list method , the app resource doesn't detail the Open URL as far as I can work out. Does anyone know if it is possible to obtain the Open URL using the APIs? I believe if you have the scope set for drive.apps.readonly you should be able to use the File method getOpenWithLinks to discover the URLs. Just testing it now, the

Why does MailApp.sendEmail from Google Spreadsheet Script not Work?

只谈情不闲聊 提交于 2019-12-02 04:20:32
问题 I'm Trying to send email using MailApp.sendEmail in a Google Spreadsheet Script following this example: https://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/ by @mhawksey see: https://docs.google.com/spreadsheets/d/1mhY_hJMMPTmxq3TFAUHK0tKFhGYBpzus-dXE3U5TQdc/edit?usp=sharing The Test web app for your latest code. function works . ( email is sent ) But when I try to trigger the sendEmail() via a POST request it does not

Understanding “CancellationException: Task was cancelled” error while doing a Google Datastore query

孤者浪人 提交于 2019-12-02 03:52:10
I'm using Google App Engine v. 1.9.48. During some of my data store queries, I am randomly getting "CancellationException: Task was cancelled" error. And I'm not really sure what exactly is causing this error. From other Stackoverflow posts , I vaguely understand that this has to do with timeouts, but not entirely sure what is causing this. I'm not using any TaskQueues - if that helps. Below is the stack trace: java.util.concurrent.CancellationException: Task was cancelled. at com.google.common.util.concurrent.AbstractFuture.cancellationExceptionWithCause(AbstractFuture.java:1126) at com