google-apps

OpenById Error when generate Google Doc from Google Form Submission

[亡魂溺海] 提交于 2019-12-01 12:45:38
问题 I am currently working in a Google Education domain and I would like to automatically generate a Google Doc via an onSubmit trigger from a Google Form. I have a template file that I would like to copy and then replace fields (e.g., {{name}}) with responses from the form. Upon submission, the template Google doc is successfully copied and renamed, but I cannot open the doc to replace the text fields. var templateFile = DriveApp.getFileById(id); var targetFolder = DriveApp.getFolderById(id);

Do I need to use my reseller domain when writing apps that use the Reseller API?

喜你入骨 提交于 2019-12-01 11:37:16
问题 I am a Google Apps reseller and would like to use Google APIs like the Google Apps Reseller API to automate my reseller activities. When I signed up to be a Google Apps reseller I was given a new Google Apps domain (reseller.mydomain.com). If I want to automate reseller tasks using the Reseller API, do I have to logon to the Google Developer console as myuser@reseller.mydomain.com or can I continue to use myuser@mydomain.com? I'm hoping I can use my normal user since that is where all my

Google App Script Trigger Id Format

荒凉一梦 提交于 2019-12-01 11:20:53
I am working on Google Spreadsheet's project where I am adding/deleting TimeBased triggers through scripting. All triggers fired will run one function, which will check its Id and run function accordingly. I am saving starting trigger and saving it's id with this code. function startTimer(rn) { var triggerid = ScriptApp.newTrigger('mainFunction') .timeBased() .everyMinutes(1) .create().getUniqueId(); SpreadsheetApp.getActiveSheet().getRange(1, 8).setValue(triggerid); } This functions save's trigger id in this format '6295890543675972447' Now when trigger is fired and runs function

iPhone sending data to and retrieving data from Google Apps?

孤街浪徒 提交于 2019-12-01 09:43:04
I've seen a couple of iPhone applications that have the functionality to export data to a Google Apps document or spreadsheet. I would like to add similar functionality to my iPhone app. Is there an API for that? How about the other direction - is there a way to get data (say a CSV file) from a Google Apps spreadsheet? If there isn't one of those, is there a way to directly import a SQLite dump file in iTunes? Background: the app I'm writing deals with a large number of records, possibly thousands, and rather than expecting people to enter them on that tiny little keyboard, I'd like to be able

Google App script extracting data from website

随声附和 提交于 2019-12-01 09:15:21
问题 So I am writing a script which look at review done on google+ pages and updates a google spreadsheet. I have found out that the line in the html which holds this value is <span class="A7a">103</span> I just need to make it possible for me to extract from the page with just knowing the URL and that html code. 回答1: Use var response = UrlFetchApp.fetch("http://www.website.com/"); To fetch the html of the page. Then use something like var cut = response.substring( str.indexOf( "<span class="A7a">

How limit Google Federated Login to specific Apps domain?

依然范特西╮ 提交于 2019-12-01 05:26:30
I want to implement Single Sign-on in a customer's application. The customer has hosted email through Google Apps. As Google offers OpenID, this could be relatively easy to implement. However, the user might not be signed in to the correct Google Account (or even multiple accounts). So, when using the Google OpenID endpoint https://www.google.com/accounts/o8/id the user is presented with a choice with which Google Account he/she wants to sign-in. As the application will only allow sign-ins from the Google Apps domain, this step could be skipped and should be for increased user experience. I

Find all Google Apps users not using two-factor authentication

馋奶兔 提交于 2019-12-01 03:04:08
问题 We're implementing two-factor authentication for all of our Google Apps users. I've written a script to list the users in a Google Apps domain based on the sample that Google provides (https://developers.google.com/apps-script/advanced/admin-sdk-directory#list_all_users) I'd like to filter that list by users who are or aren't using two-factor authentication but I cannot find anywhere in the User API that allows me to do this. Does anyone know who I can find out if a user is using two-factor

How limit Google Federated Login to specific Apps domain?

牧云@^-^@ 提交于 2019-12-01 02:48:38
问题 I want to implement Single Sign-on in a customer's application. The customer has hosted email through Google Apps. As Google offers OpenID, this could be relatively easy to implement. However, the user might not be signed in to the correct Google Account (or even multiple accounts). So, when using the Google OpenID endpoint https://www.google.com/accounts/o8/id the user is presented with a choice with which Google Account he/she wants to sign-in. As the application will only allow sign-ins

Google Marketplace - Installing application and access tokens

一个人想着一个人 提交于 2019-12-01 00:15:42
Trying to test installation process for my marketplace application. Google documentation says that I can test installation process by using Test Install Flow button in the console. When I click on that button, I see the authorization dialog and I click accept. The dialog is closed and app is installed on the domain I am testing. Question: Should I be getting and storing a refresh_token at some point in this installation process? There is an Install URL that I can specify in Drive SDK but I can't find documentation about when Google posts to this install URL and what gets posted. Here is a

Problems using the goo.gl API from google apps script

故事扮演 提交于 2019-11-30 23:53:29
I'm trying to query the goo.gl API from inside a Google Apps Script. The problem I'm seeing is the following error message: Request failed for https://www.googleapis.com/urlshortener/v1/url?key=AIXXXXXXXXXXXXXXXXXXXXXLmGJQw returned code 400. Server response: { "error": { "errors": [ { "domain": "global", "reason": "parseError", "message": "This API does not support parsing form-encoded input." } ], "code": 400, "message": "This API does not support parsing form-encoded input." } } (line 28) the message comes up when I try to do the actual request at UrlFetchApp.fetch(post_url, options); .