Chrome Extension or Gmail Contextual Gadget? - google-chrome

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.

Related

Google scripts create new page elements in gmail

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

Hyperlinks within email body work in browser but not Gmail mobile app

I've got a program that generates email reports and sends to certain recipients. The email contains a table of contents with hyperlinks to bookmarks later in the email.
This works perfectly when viewing mails in the browser, e.g. on gmail.com. However, recently something seems to have changed in the Gmail mobile app, and my hyperlinks no longer work there.
When generating the email, the link is of the form:
Section 1
and the bookmark is of the form:
<a name="section_1"/>
In the browser, the link URL appears in the form:
https://mail.google.com/mail/u/0/#m_3653008429050877336_1
In the Gmail app, however, the link appears in the form:
x-thread://-90370221/435827759917983#m_3653008429050877336_1
Any ideas what has changed, and how to make my intra-document hyperlinks work again?
Orignal Answer
This functionality is not available in gmail app. Here is the link to google forum where you can confirm:
https://productforums.google.com/forum/#!topic/gmail/CdhA_3Z1yTo
You can insert link in the gmail app (like http://www.google.com) in Gmail app which is automatically converted to clickable link when you send the message but if you want hyperlink (like "click here" and when you click on it you are directed to the link to the page) you will have to do it from your browser only. There is no option available in Gmail app to do that.
The alternate solution is to use Microsoft Outlook. Add your google account in Outlook app.
In the compose section long press in the area then you get option to add hyperlink.
Answer after discussion in chat
It seems that the problem is with the gmail app version. If you want to open links received in your gmail app so that you are redirected to the location of message in the same mail you need to have minimum version 8 of gmail app. Verified this as I was able to access the links in my gmail app as well as my browser.
Platforms on which veried the links:
Android 6.0.1 - Gmail Version: 8.1.7.182107449.release
Windows 10 - Chrome: Version 63.0.3239.132
Ubuntu 16.04 (xenial) - Firefox: Version 57.0.4
To get around the Gmail app not having an option to insert a link into text (hyperlink) on my mobile device I use another mobile app to compose the email first. Currently, the only app I have discovered to be compatible with this trick is Google Docs. I find it works for typing, formatting, inserting images and creating hyperlinks.
To upload from Google Docs into Gmail I am presently only aware of the ability to highlight the planned body of the email in Google Docs then pasting it into Gmail.
Using Google Docs I am aware of the ability to carry over changes to some features of the hypertext. Such as colour, boldness, italics, size, underline. There are possibly more customizable options available before inserting what you have composed into Gmail.
I am unaware of any tricks to create a usable hyperlink of images for use in the Gmail app.
Such a feature outside the “Signature” on Gmail desktop could prove most beneficial.
I had the same issue. I was adding hyperlinks as following
Click Here
I did it to handle the possibility of https not available on the website as links are dynamic in the email. When I changed it to following then it worked on gmail app as well.
Click Here
You can’t do it in the gmail mobile app. Sorry. Also, it matters what version you have.
I found a link on these forums with a fix. Essentially they said that if you put a span inside the link, it will fix the problem. I've not yet had a chance to test it however. According to the post:
This won't work:
Bar
But either of the following will:
<span>Bar</span>
<font>Bar</font>

Can I use Google Drive's editor interface embed in a website?

I want to use google drive to store the files, but allow the users of my website to be able to edit them transparently, so that they don't have to go to google drive's website.
Is this possible with the current API? Thus far I have only seen how to create an app for them to install in google drive, or doing something like DrEdit (https://developers.google.com/drive/examples/), which parses the files to JSON and uses the ACE editor, which is definitely not what I want.
EDIT:
I believe it is not possible to do this with Google Drive, I've decided to go with Zoho Docs instead.
Yes it's possible. The biggest consideration is how much formatting you want to support. Eg. if it's plain text, it's very simple. If you want to support character or layout formatting, it becomes more complex.
I don't believe its possible to embed the editor (or even embed a preview!) using an iframe, because if you look at how the google docs page loads, it first redirects you to the login page, and that automatically logs you in if you are already logged in, and redirects you back to the docs editor.
This means that the iframe would have to at least pass through the login page, even if the user doesn't need to enter anything. However, google's login page has the x-frame-option header set to SAMEORIGIN (or deny?), and thus, the browser refuses to display it, and thus you can't actually get logged in!
The only way I've found to enable just preview embedding (not editing), is to publish the document first (via the File->publish to web menu item).

gadget in site with custom setting fields

I'm wondering if the following is possible.
When you insert your gadget in a site page, you can config some settings such as height, border and url.
Is it possible to add custom fields to config the gadget?
For example, use selects the gadget (url), then additional fields appear.
There's workarounds to achieve such functionality (i.e. have a set of parameters for a script per sites page), but it's not possible to do specifically what you're asking. i.e. to put a parameter field on the script gadget interface.
Anyway, that seems like a real good enhancement Apps Script gadgets for Sites could have. You could open an enhancement request on Apps Script issue tracker.

How to build a chrome extension to add panel to gmail windows?

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.