I apologize if this is naive, but I couldn't find a succinct answer.
Is it possible to make front end objects (buttons, etc.) appear in someone's gmail inbox using code from a Google script? Or does this require making a browser extension?
I've read the documentation and various tutorials for Google script, but it appears I can only do things like manage settings and send emails, not add entirely new page elements.
Google app scripts overview
Related
I use a lot of different google spreadsheets for day to day tasks.
Sometimes all of them are open at once, and combined with other websites needed it's a lot of open tabs, so the tab header is only the sheets favicon.
I'm looking for a way to add a custom favicon to each spreadsheet using Google Apps Script, to make it easier to identify them when only the icon is visible.
I've found a Chrome extension (https://chrome.google.com/webstore/detail/favicon-changer/ijaabbaphikljkkcbgpbaljfjpflpeoo) which changes the favicon to a specific file I choose, but I need a way to do it natively to each spreadsheet so that it works on any computer.
There's also a different extension which also changes the favicon, but to a random one you can't choose (https://chrome.google.com/webstore/detail/favidenticon-for-google-d/alkonpgilhahbbhihdjnamkmckfajmjo).
Since theres a way to code it in an extension, I'm wondering if there's a way to code it directly in Google Apps Script, assigning a specific file as the favicon.
I've fonund also that there's a setFaviconUrl(iconUrl) method in Class HtmlOutput, but I think it's for Web Apps, I've tried using it but haven't managed to make it work:
https://developers.google.com/apps-script/reference/html/html-output#setfaviconurliconurl
I have the icon files uploaded to a website in case that's needed (this is one of them https://www.botix.com.ar/imagenes-empresa/favicon-pedidos.ico)
I know little about code, so any help would be appreciated!
I am afraid that it is not possible at this moment. The extension you mentioned probably does not work with Google Apps Script and it may be modifying or working with Chrome specific settings or tools.
Since Google Apps Script is not able to work with Chrome related tools or APIs it would not be possible to use Google Apps Script to accomplish this. That is why the only options available are related to Chrome extensions or for web apps as you mentioned.
You can submit this as a feature request for Google Apps Script using this link
Is it possible to use a support file from within the apps script project as a source for iframe in another HTML.
I need to do this as a part of a Web App project in Google Apps Script.
Specifically I need it to work as a menu system which is the same across multiple pages, so that I don't have to repeat the same HTML code over and over again.
Better explained in a picture
Left side menu(buttons) stays the same across pages
There are several ways to accomplish what you are looking (" I don't have to repeat the same HTML code over and over again") but using iframe is not the best way when working with Google Apps Script web applications.
First you have to decide if you want to handle your web application as a multipage or as simple page.
In any case you might find helpful to use templated HTML / scriptlets to pass the code from Google Apps Script .html files to your main html code. If you find yourself scripts hard to start with, then you might use other methods of the HTML Service
Resources
https://developers.google.com/apps-script/guides/html/
https://developers.google.com/apps-script/guides/html/templates
https://developers.google.com/apps-script/reference/html
Related
Use project Javascript and CSS files in a Google Apps Script web app?
Recent related question (no answers at this time, but with comments)
HTML Service: Templated HTML as sidebar
Is it possible to create navigation bar on Google Apps Script?
how to connect a navigation bar (<nav>) with HTML files in google appscript?
I've been looking into adding an "extension" for gmail, this is for an application at work, basically we want to somehow integrate some options (buttons), somewhere contextual to the email that's being viewed currently.
Our users, will then be able to install extension, and the extension will establish the authorisation aspect (not sure how this is done yet) with our application.
I've so far looked into two options, not sure if I'm on the right track:
Chrome extension, that then uses gmail.js (some third party library on github), and use some jquery to search the DOM to insert a button into the reply/delete toolbar.
I understand that this would be more straight forward but would have issues with it breaking if page layout changes, or class names changes. And would also require uses to be using chrome (which is something we are fine about)
Create a gmail contextual gadget add-on, that sits at the bottom of the email, although, I'm not sure if this contextual gadget will appear at the end of the main thread of an email or inside each individual email and will require expanding?
Also correct me if I'm wrong, but are gmail contextual gadgets limited to users with Google Apps subscription in their company? I.e. we have to subscribe to google apps in our domain and deploy it on the google apps marketplace, and similarly also have the users who want to install this gadget to also be using google apps?
Thank for everyones help in advance.
I am trying to create flashcards by using google spreadsheet.
I tried the way suggested at this page
It produces a panel containing the flashcards but actually it is empty.
I am using the last version of google chrome to produce it.
To me, the flashcards gadget, embedded into google dive, seems too old to work with the current version of google chrome.
My questions are:
Could it be possible?
What could be an alternative way to make flashcards related to your gmail account?
According Google Drive Support the Gadgets in Google Spreadsheets will be deprecated.
http://support.google.com/drive/bin/answer.py?hl=en&topic=15165&answer=2791335.
A good alternative could be http://api.flashcardstogo.com/webapp/
Since gadgets have now been deprecated the makeuseof method no longer works.
Fortunately http://flippity.net/ provides similar functionality using publicly shared (obfuscated) links.
Tip: Create a study topic bookmark folder in your bookmarks containing links to both your google spreadsheet and the flippity generated flashcard. That way you can open both with, right-click + "open all bookmarks". It makes it easier to study and add new cards.
I want to build a chrome extension like rapportive.com. I'm new to Chrome extensions and Gmail Content Script. Can any one please suggest how to go about this?
Currently I'm reading Google's Gadget docs.
Here are some notes to get you started. There are more robust ways to build this, but this is the "hello world" of the functionality you are talking about:
You will need to define a content script that you add to the context of gmail. This part is pretty easy and can work with any of the content script examples available in the Google's documentation. You should read and learn about what it means to be a content script.
The content script will need to know where to look inside gmail for an email address. This address will be used to grab the social media information on the user. You message this email address from the content script to the extension's background page.
The background page will need to have social media integration that the user pre-configured. Basically, you need to plug the background page into Facebook's/Twitter's/LinkedIn's APIs and use their APIs to collect information about the email address.
The background page will then message the content script you added to gmail with the social media details for the email address
The content script then modifies gmail's user interface to contain your social media details.
The greatest long-term challenge you will face is that gmail's layout will change unexpectedly and break email discovery or the modified UI. Both issues either require some cleverness to solve, or will require you to stay up at night wondering whether Google will suddenly break your extension.
Good luck!
I don't know what google gadget is and link you provided gives 404 but I don't think you even need this.
What you need is a content script that is injected into gmail page where it adds a panel. So, start with reading about how to create a Chrome extension that is using content scripts.
There is a new SDK for modifying the DOM elements in gmail: https://www.inboxsdk.com/docs/
They have a useful API for adding buttons and other elements.