Minor issue when sharing custom document - google-drive-api

I've integrated the Google Drive share dialog and it works like a charm.
The only minor issue that I came across is that the notification email contains a broken icon.
It would be ideal if the proper icon for my custom mimetype (as configured in the Google API Console) would be used.
This is how the notification mail looks like:

Related

Set a custom favicon for different google spreadsheets

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

How can i add Big Text in Gmail App Script Add In?

I am trying to create an add-in for Gmail using the app script. I want to use large text on top of the add-in.
But as the documentation says Gmail Add-in only supports CardService as of now, can't render an HTML there. After my research, I didn't find any option through CardService to achieve the same.
But I saw another Google Add-in doing the same I wanted to achieve.
Google Keep
I want something like No notes yet text
Answer:
The TextParagraph class supports some basic HTML formatting, but this functionality does not support font size.
Feature Request:
There is however a pre-existing feature request on Google's Issue Tracker requesting this exact functionality. You can see this at the following link:
Request for API or function to set font sizes in text paragraphs.
I urge you to hit the star on this feature request report, as Google prioritises feature requests based on popularity.

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>

Chrome Extension or Gmail Contextual Gadget?

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.

Apps Script Gadget not working on a custom website

i have this problem, and it seems that i'm not alone.
If i embed a simple apps script form with some textarea,buttons and labels in a custom web url www.mydomain.com/mypage...the page simply don't show nothing and the Chrome console report that error:
Refused to display document because display forbidden by X-Frame-Options.
Instead if i see the page from the original url:
https://sites.google.com/a/mydomain.com/mysite/mypage
i see the apps script correctly.
Anyone solved that problem or can tell me a workaround??
Thank you
This is a known issue and there has been a lot of chatter on this topic. Here is the issue filed in issue tracker. You may star it. People have listed some workaround as well.
Google Apps Script Gadget not working with custom web address mapping