google-apps

Using Google Directory API to fetch all users in a domain

不羁的心 提交于 2019-12-11 19:26:15
问题 I am building an app for the Google Marketplace and just made the switch to OAuth 2.0 from 1.0 before final deployment. Before the switch, I was able to use the provisioning API to fetch users in a domain that has installed the app given, appropriate permissions have been granted. My experience with the Directory API (the OAuth 2 counterpart) requires that i perform a 2-legged OAuth to get an access token which I then uses to perform the Admin action. This only works if the access token

how can I create batch in javascript loop to select x Rows then next x Rows until all rows are done?

帅比萌擦擦* 提交于 2019-12-11 15:05:22
问题 I have a google sheet with some data and I am trying to combine all cell data in a JSON variable so I can pass it on to API to do something. I have this javascript function that takes all data and combine everything in JSON variable like this: function combine_val() { var startRow = 2; // First row of data to process. Starting with 2 to ignore headers var startColumn = 1; //First Column to process, in case that changes. var numRows = mysheet.getLastRow(); // Number of rows to process var

Design decisions for Google App Engine hosted app using Google Apps APIs

我的梦境 提交于 2019-12-11 14:37:46
问题 I never used Google technologies to develop webapps before, and I'm a bit overloaded and confused. A lot of information. My scenario: Developing a webapp for, say, company.com, using Google App Engine (Python, Webapp2, Jinja2...). The domain company.com is Google hosted (e-mail and calendars are the important parts here). So, I want my GAE-based app to add events to the domain users' calendar, send them e-mails, etc. The basic flow is: A user of this domain logs into the web app, using his

How to set curl timeout in Google API PHP client version 2.2.2

眉间皱痕 提交于 2019-12-11 09:31:18
问题 I am trying to set the default curl timeout in the scripts I am using for batch updating users using directory api. Only a handful of users are added before the curl connection times out. I have tried this but it doesn't work with the API v2.2.2 Can someone show me how to update the curl timeout settings using php? Thank you. Here is the code: $groupEmail = "my group email"; require_once realpath(dirname(__FILE__).'/vendor/autoload.php'); $client = new Google_Client(); $client->setAuthConfig(

GoogleApps client giving SocketTimeOutException only

江枫思渺然 提交于 2019-12-11 09:09:57
问题 We wrote a client to create a user on googleapps using the GoogleNetHttpTransport, but we are getting a socketTimeoutException when making the user as Super Admin through superadmin api. Connecting User has superAdmin Privileges itself. How to increase the ReadTimeOut/SocketTimeout when we are using the GoogleNetHttpTransport . Please find below code snippent on connecting to target and making the client httpTransport = GoogleNetHttpTransport.newTrustedTransport() ; GoogleCredential

Google script : how to resize image in blob?

夙愿已清 提交于 2019-12-11 08:19:45
问题 I have a blob containing an image that is remotely loaded and created in Google Drive: var response = UrlFetchApp.fetch(fileURL); var fileBlob = response.getBlob(); var folder = DriveApp.getFolderById('THjgj698979XXXXXXXX'); var result = folder.createFile(fileBlob); What I want is to resize the image contained in this fileBlob. How can I do that? For your information, a post that can help but finally didn't really help me:(explains how to resize an image, not how to resize an image in a blob)

Google Sheets web app to run script as owner

◇◆丶佛笑我妖孽 提交于 2019-12-11 07:39:02
问题 Hi have a simple script that sends an email from a spreadsheet I need to allow the other users of the sheet to call the script but I want the script to be ran as me (the owner) so that the email is sent from my account. I've looked at some similar questions and answers but nothing seems to work. I've got a button on my sheet calling the doGet function with the following code. function doGet(e){ UrlFetchApp.fetch('https://script.google.com/a/----.org/macros/s/AKfycbxT--------------------------

Return row number is match error

◇◆丶佛笑我妖孽 提交于 2019-12-11 07:01:10
问题 I have some tables in one sheet and I need to make a script to send an email everyday. The script it search today date, match it into my table and return column number, then I looks for Total on the first column (A) and once found it, return row number. Once I have row number and column number, return Total value for that day. I'm not advanced with JavaScript and I'm struggle with arrays (still learning). The script I have so far is working very good as long I have only one table on that

When recurring id is generated with format previous_event_id+_R+date

拜拜、爱过 提交于 2019-12-11 06:49:29
问题 Normally, this is the format of a recurring event ID generated by Google: qmjtng94k5mgge24890nmoasts (26 character alphanumeric) In some cases, we see that the recurring event ID generated is of the format: qmjtng94k5mgge24890nmoasts_R20160823T180000 I want to know when this kind of event Id is generated ? Specifically, when is a recurring event ID generated with the underscore, capital R, date suffix and the same previous eventId prefix? 回答1: When recurring event ID generated with the

Login using UrlFetchApp function and scrape private data

不羁的心 提交于 2019-12-11 06:27:08
问题 I need to scrape private data from portal which doesn't support API. IMPORTXML can't do this because of login. I have a link with information of from & to date and the content is table with cost data. I need to login and scrape simple table into my Google Sheet. I need to log in into this website: https://www.glami.cz/registrace/prihlasit and than scrape this url: https://partner.glami.cz/s/e-commerce/days/866/?from=2016-12-01&to=2016-12-09 The form on this site is: <form action="/registrace