google-apps

If var isnumber, for script

南笙酒味 提交于 2019-12-04 01:47:22
I need to run a script which contains the logic: If isNumber, Then DoSomething. I've run other such if then tests such as if blank, and if cell contains "x". It should be simple but I can't find a solution. I've tried getNumberFormat, innum, isnumber, etc. function ifIsNumber() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var s = ss.getActiveSheet(); var substring1 = s.getRange("A1").getNumberFormat(); s.getRange("B1").setValue(substring1); } This code checks cell A1 and returns in cell B1 the string "0.###############", for both cells containing numbers AND text. How can I identify which

Cannot deliver email to Google Apps address; Gmail receives the same email fine

雨燕双飞 提交于 2019-12-04 01:46:57
问题 I have a Drupal site with the Webform module installed to send out emails to a small group of people with Google apps accounts. It used to work; now, with nothing having been changed, they do not receive the messages at all. They are not in spam; they just never arrive period. However, if I put in my own personal Gmail address as a recipient, I receive it fine... not in spam or anything. I thought maybe the problem was that my domain (hosted at MediaTemple) didn't have an SPF record, so I

Single Sign-On with Google Apps + App Engine

百般思念 提交于 2019-12-04 01:31:22
Is it possible to achieve SSO with the built-in OpenId on App Engine? I've been trying to integrate a Marketplace app and get the user logged in when coming from Google Apps (the admin panel or universal navigation). I failed miserably, then now I found this: "The one exception to this is applications which do hybrid OpenID/OAuth — whitelisting does not currently work with this approach." (from here ) I assume that I have to implement OpenId using a library instead of using the built-in one to achieve SSO with Google Apps in my app? Or if it is possible with built-in OpenId, is there an

Google Apps Admin API: need to specify account user for service account?

最后都变了- 提交于 2019-12-03 22:47:26
I'm creating a Marketplace App that should be able to read all the users of a domain. I request access to these scopes: https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/admin.directory.user.readonly Then when the 'Universal Navigation Extension' is accessed this happens: Credential credential = new GoogleCredential.Builder() .setTransport(httpTransport) .setJsonFactory(jsonFactory) .setServiceAccountId(SERVICE_MAIL) .setServiceAccountScopes(Arrays.asList(DirectoryScopes.ADMIN_DIRECTORY_USER_READONLY))

Problems using the goo.gl API from google apps script

别等时光非礼了梦想. 提交于 2019-12-03 21:51:07
问题 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)

Google Marketplace - Installing application and access tokens

岁酱吖の 提交于 2019-12-03 21:25:46
问题 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

Requested client not authorized

夙愿已清 提交于 2019-12-03 18:15:57
问题 I am trying to get google users from my domain using google service account . But it throws error Error:"access_denied", Description:"Requested client not authorized.", Uri:"" My code X509Certificate2 certificate = new X509Certificate2(key_path, "notasecret", X509KeyStorageFlags.Exportable); ServiceAccountCredential credential = new ServiceAccountCredential( new ServiceAccountCredential.Initializer("publickey.gserviceaccount.com") { Scopes = scopes, User = "admin@domain.com" }.FromCertificate

Best way to connect a spreadsheet to web database

人走茶凉 提交于 2019-12-03 16:10:50
I'm using web based database for which I need to add spreadsheet capabilities to its front end. I was thinking that I could use Google Docs Spreadsheets. Their Google App Script seems to have the functionally that I need. In particular I can use the URLFetch service combined with onEdit events to keep the spreadsheet and DB in sync -- AJAX style. It also allows me a lot of flexibility in constructing, saving, and sharing the spreadsheets However some things about Google App Script gave me pause. It runs server-side so it's difficult to debug locally. It doesn't have any sort of debugger with

Google App Script ContentService downloadAsFile not working

最后都变了- 提交于 2019-12-03 15:16:10
I have a web app developed using Google App Script HtmlService and from the html form, populating excel sheet in the Google drive using SpreadsheetApp . And one another section is calling ContentService to download data as excel file. function doGet(e) { // Read excel sheet //getAppFile(); // Render the application from HTML template return HtmlService.createTemplateFromFile('index').evaluate() .setTitle('Go Smart') .setSandboxMode(HtmlService.SandboxMode.IFRAME); } function downloadDoubleQuateCsvFile() { var sheetId = PropertiesService.getScriptProperties().getProperty('sheetId'); var ss =

Monitoring changes in Google Drive files for whole domain using Drive API

半腔热情 提交于 2019-12-03 14:14:49
问题 we are creating Google Drive moderation application to keep list of changes for all files in a Gapps domain. The problem is that we need to impersonificate as every single user - one by one - in order to get all the changes since it seems there is no global API method for this. This is terrible approach for scalability since we have loads of users (10000+) and loads of changes for each of them. Is there any way to get changes of files for whole domain at one shot or at least in some more