How to make starting a UiApp by a group of users easy? - google-apps-script

After opening Gmail or Google Drive you see the google bar (containing the Google logo, a searchbox and clickable button for apps, notification of unread messages, sharing and about) on top of the window.
I want to put a put a button for starting my UiApp (build with GAS) there as well.
Is this possible (and how) ?
Several users will have read access to the google drive. I want those users to be able to start my UiApp from a button in google bar as well. What should I do (and what should they do) to make that possible?
If this is not possible, where can I put my UiApp best so users can start it easy?
My application is NOT intended to be accessible by other people except the ones I provided access to my Google Drive.

I believe you can accomplish this by leveraging the Gadgets section of the Gmail API to accomplish this as detailed here. I've seen this type of Gadget added by a Chrome Extension before but not directly from Google Apps Script.

I think you would need to use the "New" button, and publish a script to the Chrome Web Store. Then your app would be in the drop down list of the "New" button. The problem with that, is that the general public could see the app. I'm assuming you don't want that.
If you want an easily accessible central location for users, you could create a website with Google App Engine. You can get a free domain name of
www.mySiteName.appspot.com
It would be easier for users to get there than the URL of your Apps Script.

Related

Integrate Gmail api with Google app maker

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.

Create shared Google Drive document owned by web service

I'm new to the Google APIs, and would like to write a small service class for my web application that:
creates blank Google document without user assistance
assigns a generated title
returns a URL that can be provided to multiple people to edit this document
This document mst be editable via a sharing link. Ideally it is owned/managed as part of the web service's Drive storage.
Code is welcome if it's easier than explaining, but I'm really asking for help understanding Google's service offering.
Can I fully authenticate using only credentials specific to my app? (e.g. call the Drive API without prompting an interloper/observer/user to
authenticate.)
Once authenticated, can I create documents local to my
API?
Whose quota are the created documents consuming, the person that created the API key?
Can I share
these created documents with others?
Will I be able to manage a list of
these created file URLs from a standard Google web UI?
Just to clarify what it is that you are asking. You want to be able to embed a google doc on your website A couple things that can happen here.
First, you will need to create a google doc, lets say a spreadsheet. Within that spreadsheet you will:
click File > Publish to the Web.
From here a new window will be brought up. Click Embed and Published content and settings and click the publish button. Ensure the Automatically republish when changes are made checkbox. (this will allow for your website to be automatically updated anytime that doc is changed.
Take the embedded link that is generated and plop it in your webpage and it will be live.
Now you can share the page via Google Docs and anyone that has that link can make changes to that spreadsheet. As soon as a change is made, it will update on your website with the next refresh.
Hope this is all clear, let me know if there is anything unclear.
Cheers

Modifying Google Drive Apps for education platform vs Browser Extension?

I'm working with a few schools to develop a series of interactive textbooks for students. The textbooks need to have randomly generated exercises, for which I've already developed a prototype.
It's also required that the app is managed entirely through Google Drive (eg, I can't use WordPress or even Google Sites), although I can create my own Apps - so long as those can be installed and accessed through Drive.
What I'd like to do is:
Allow authors to create randomly generated worksheets using Google Forms, similar to how they can with my current generator
Allow authors to click on a menu item in Google Docs that embeds a widget/iFrame inside a Doc
Embed JSX Graphs into a Doc
Log students answers into a Spreadsheet
"Pretty-fy" spreadsheet into a nicer display in an instructors page - either in spreadsheet, doc, or custom Google App
Everything must work off of Google Drive
My questions are:
Is this something that can be achieved purely through Google App Scripts?
Would someone viewing the Docs be able to see the embedded widgets without my App Scripts installed (if this is even how it works).
Can I extend Google Apps (when viewed by a visitor) to show a sidebar with ToC
Can cross-document TOC be built, where a TOC is generated from the Headers of all docs in a folder?
Would it be easier to create a Browser Extension that can search for certain strings (or even better, a placeholder image with "please install extension") in the app and replace them with the interactive widgets?
Browser Extension
Aside from extending Google Apps, I could also create a browser extension that students install that does #2...this would be fairly easy. Of course, "Install" is a scary word for parents, so preferably a solution that doesn't require students to install anything.
I guess, really, my direct question is this: Can Google App Scripts alone extend Drive Apps to create interactive textbooks for students and teacher planners.
As commented by Mogsdad, your question is indeed overly broad. But I'll attempt to answer it.
From the list you things you'd like, only point 3 may be problematic. You'd have to test if JSX Graphs works well with Apps Script Html Services. I'm afraid it won't. But you have other Chart solutions on Apps Script.
From your list of questions:
I don't think so, unless you make some compromises on your requirements.
No, only scripts installed on the document/form/spreadsheet itself can embed widgets on it.
Not with Apps Script, to run/interact with scripts the user must be a collaborator, not a visitor (meaning he must have edit rights on the file). Maybe with a browser extension.
Yes. But if there's "too many" files to be processed, you're likely going to hit some Apps Script quotas that will make your life difficult.
I didn't really understood this question. But browser extensions can surely do more than scripts, but they will require installation on each browser for all your users.

How to login to a website, read data?

I would like to write a GoogleApps script that accesses a website, logins using my credentials, makes a selection from a drop down menu and copies the displayed values to paste them on my active spreadsheet.
Is this possible or should I go about it a different way?
Directly, that is not possible. However if the website offers an API or if the website makes use of URL parameters to pass information about what you've selected, it might be possible if the website also uses HTTP authentication.
Absolutely possible. Capture what you need to do for authentication. Repeat it with Google Apps script.
Capture what you need to do with the drop downs. Repeat it with Google Apps script.
Quite generic instructions, but you didn't give any more specificity to your problem. Use something like TamperData addon for Firefox to capture/see what Google Apps Script needs to pass back and forth to the server.

Get listed in Google Drive Apps Collection

I have released an app for Google Drive in the Chrome Web Store. I thought it might get added to the Google Drive Collection automatically, but that didn't happen. Is there any form I have to submit?
For your application to appear in the collection of Drive apps your Chrome Web Store app's manifest file need to specify the Google Drive container and your API console project ID as described in this document.
Then your app's listing should get the "Works with Google Drive" badge and, given a few minutes delay for indexing, your app will appear on the collection of Drive apps.
Beware: you may not see it there as a listing doesn't appear for you in that collection if you have already installed it on your browser. It will appear to all other users who have not installed your app yet. To make sure it's there: try looking at the collection with another browser (FireFox for instance).