Google Docs Add-On for Inserting Hyperlinks with Titles

Sondre Kolaautomat
2 min readOct 28, 2016

--

I don’t know you but when I am in brainstorming mode I collect a lot of links in a Google Docs document or wiki. I feel frustrated when these links are just URLs because they don’t have a direct meaning. This is why I created a simple Google Docs add-on for inserting a hyperlink with the page title and link. The add-on adds a menu and once you click the “Add-ons / Helper / Insert link with title” option you just enter the link and after pressing “Ok” the add-on retrieves the title from the web page and inserts it as a hyperlink. That’s all.

The alternative to this add-on is to copy a hyperlink directly in the clipboard. For example, if you copy this-link and paste it within a document it will be copied, but it will persist the original style instead of merging it with the style of your document. The “Paste without formatting” option doesn’t work either because it just copies the text without the link.

How To Use It

  1. Open a Google Docs document
  2. Go to the “Tools / Script Editor…” option
  3. Remove the code snippet and put the code available in https://github.com/skolaautomat/helper-endpoint/blob/master/google.apps/Helper.js
  4. Save the script and refresh the document
  5. You will see a new option available under “Google Add-ons / Helper / Insert link with title”
  6. Click on this new option and enter an URL

Notes

  • I published an external RESTful service to get the title from an HTML because it is much difficult to parse HTMLs within a Google Apps script.
  • Currently, the Google Apps API is pretty limited. You can’t assign a shortcut to an option or press “enter” instead of clicking the “Ok” button. Microsoft Office add-ons are much more powerful. There is a big opportunity leveraging Google Sheets Add-ons.

References

--

--