I want to connect between a smart power switch app(eWelink for example) to google app scripts.
The problem is the API(https://ewelink-api.vercel.app/docs/introduction) uses a library which isn't possible to use in google app scripts. What is the easiest way to bypass this?
I recommend sending the data collected by the eWeLink API to Google Spreadsheets, then interacting with it through Google App Scripts . You can get more information in this regard here.
Related
I created a simple calculator using Google Apps Script and deployed as web app. The calculator has four inputs and the calculated value is generated with a formula.
But I need that in data studio. So I used the "URL embed" feature in data studio. But it displays a message saying "can't embed due to provider site restrictions".
Both apps script and data studio are services provided by google. But I don't understand why I can't embed a website created using apps script into data studio.
I have deployed the web app in every possible way but did not work.
Is there any way to embed a website into data studio?
If not possible using apps script, then which other programming language should I use to create a calculator and embed it into google data studio?
Any help will be appreciated. Thanks in advance.
As you can check in DataStudio documentation, not all sites can be embeded and this resource can be blocked by the website owner:
This is related with X-Frame-Options in the HTTP header. (Documentation)
This answer has more additional information of this option:
how to block website from loading in iframe?
So I guess Google Apps Script is sending and X-Frame-Options=DENY or something that avoid it from being load in an <iframe>.
I searched a little, and I found this answer. I'm not a Google Apps Script expert, but apparently, Google Apps Script already has this feature, but you need to enable it.
Embedding Google Apps Script in an iFrame
I'm creating a google app using app maker. I want to integrate the Gmail API with the application. I went through it's guideline, but couldn't able to find any useful resource for my use case.
According to the guideline, google app script are supporting this, but I don't' know if it is possible to integrate the that it to the Google App Maker application.
Thanks in advance.
Update
I have done a bit of research and found that there's an inbuilt object called GmailApp which could be access via a server script. There are number of functions related to that. What I particularly looking for is to get/read email thread for the given subject and open it in a separate browser window, so the user will be able to interact with it (read the thread, reply..etc.)
I was able to integrate the Gmail API by going to
APP SETTINGS -> Advanced services and click on ADD SERVICE.
From there we could select Gmail API from the available services. As shown in the screen capture below.
What options are there to pull a GApps user creation date?
I saw that the Admin SDK is capable of it, is it the only API capable of doing this? does any of the previous one also capable of?
If possible using GAS, it will be most excellent,
Thank you!
Indeed there does not seem be Google Apps Script services to pull the creation date. The DomainUser class provide interesting functionality for interacting with domain users (only for admins).
Using the Admin SDK with Google Apps Script using UrlFetchApp.addOAuthService is not as complex as it looks. You can read this answer which will throw some light on how you can use external API calls for certain Google API and bring the data to Google Apps Script.
The scope for the ADMIN SDK will be as follows
oAuthConfig1.setRequestTokenUrl("https://www.google.com/accounts/OAuthGetRequestToken
?scope=https://www.googleapis.com/auth/admin.directory.user.readonly");
Notice that in this case I have requested a readonly scope.
Very related to this question: SSO, using Google Apps user database but I'm wondering how the user Nil started off with his OpenID script.
Could anyone give some background on this? I'm not very familiar with OpenID.
The Google Apps Marketplace Google Apps Platform Single Sign On overview provides all the information you need to get started. Since #Nils describes a Corporate Google Apps environment, it's very likely that this is where they went to start their implementation, since...
For in-house apps developed with the Google Apps extensions console, implementing Single Sign-On is a strongly recommended best practice.
You'll find background information and links to existing OAuth libraries in a variety of languages.
You should also look at the Google Identity Toolkit, which provides an API you can use to implement SSO for your web app, as well as a Javascript widget you can incorporate to make the task simple.
I'm following this guide to create a sample web app which implements the Google Drive PHP SDK.
When I access the URL, the app keeps redirecting to the same page in an infinite loop, so no content is shown actually. Any idea why this is happening? Is it due to some mistake I made in the config file?
The document says how to implement the sample app - called DrEdit - as a Google Chrome application. Can anyone tell me if it is possible to use the SDK for creating non-Google Chrome apps? Also, does anyone have any example implementation of the Google Drive SDK?
If you provide more information and code, we can debug your first issue.
Otherwise:
Yes, you can write apps for Drive that are not Chrome apps. Chrome Web Store is an optional distribution mechanism for the API. Your apps will work in any browser.
There are documented PHP snippets for every API method, e.g. https://developers.google.com/drive/v1/reference/files/get