AppsScriptPulse

Develop My First Gmail Add-on via Google Apps Script: My Software Engineer Internship at dialoggBox

I’m a teacher-turned-developer actively searching my first software engineer job during the pandemic after graduating from Hackbright Academy. As a bootcamp new grad, I am lucky to get an internship opportunity to develop a gmail add-on product at dialoggBox to gain my first industry experience and learn how to work with stakeholders.

My article will be composed of three parts:

  • What service do dialoggBox and this gmail add-on provide?
  • What was my experience using Google Apps Script to build an add-on product?
  • How did I develop each section of the gmail add-on?

The actual details of the add-on developed by the author, Nancy Dai, are promised in a follow-up post but this post serves as a useful insight into the main things to look out for when developing Gmail Add-ons.

Bonus: Following the link to the dialoggBox website I spotted they were using icons from freepik.com which also took me their sister site flaticon.com, which in turn took me to their ‘Icons for Slides and Docs’ add-on.

Source: Develop My First Gmail Add-on via Google Apps Script: My Software Engineer Internship at dialoggBox

Google Developers Blog: Building solutions using the G Suite developer platform

Millions of users know G Suite as a collection of communication and productivity apps that enables teams to easily create, communicate, collaborate, and discover content to supercharge teamwork. Beneath the surface of this well-serving collection of apps is also an extensible platform that enables developers to build targeted custom experiences and integrations utilizing these apps, allowing G Suite’s vast user base to get even more value out of the platform. At first glance, it may not be natural to think of the tools you use for day-to-day productivity and collaboration as a developer platform. But consider what makes up a developer platform; Languages, APIs, runtimes, frameworks, IDEs, ecosystem, etc; G Suite offers developers all of these things and more. Let’s take a closer look at what makes up the G Suite developer platform and how you can use it.

Nice overview of the G Suite developer platform from Charles Maxson. I always find it useful to see how others pitch the platform and from this piece useful to see how Apps Script is put in context with other G Suite development options.

Source: Google Developers Blog: Building solutions using the G Suite developer platform

How to send text messages using Google Sheets and Twilio – Sheets to Apps

Did you know that you can send text messages via Google Sheets? In this episode of Sheets to Apps, we show you how to easily send text messages with Google Sheets via Twilio – an online communications provider.

Back in January Sourabh Choraria highlighted a Medium post from AVG showing how to Send SMS event updates or discount codes using Twilio from a Google Sheet. AVG has now created a short explanatory video covering this solution. You can view the video description for all the code and resources you need to try out this solution.

Google Doc to clean HTML converter for Google Apps Script

Export Google Doc as clean html. Handy to make a WordPress post from Google Doc. – thejimbirch/GoogleDoc2Html

Following on from our previous post highlighting Amit Agarwal’s Send Rich Text HTML Emails with Google Sheet  we received the following recommendation for a Google Doc to HTML converter solution from @IMTheNachoMan:

For those interested in workflows for using Google Docs as an email template this solution already has a emailHtml() function you can build on which appears to already inline images from your Google Doc.

Source: thejimbirch/GoogleDoc2Html

Send Rich Text HTML Emails with Google Sheet – Digital Inspiration

You can format the source data in Google Spreadsheet in different colors, fonts and sizes and all your cell formatting will be retained in the email messages.

Very handy code snippet from Amit Agarwal which lets you convert the formatted text in a Google Sheets cell to HTML. In the example Amit uses the formatted text in an email sent with MailApp but you might find other uses for this solution. Click through to the source link for all the details…

Source: How to Preserve Formatting of Spreadsheet Cells in Mail Merge – Digital Inspiration

Dashboards in your inbox – Revisting tips on emailing inline Google Sheet chart images with Google Apps Script

Back in 2015 I shared a post on Tips on emailing inline Google Charts from Sheets using Apps Script, which looked at how you can email charts from Google Sheets. This solution is one I use in my work on a daily basis and remains largely unchanged. More recently I was faced with the problem that I couldn’t include a Combo Chart. In this post I revisit this problem and share a solution for including copies of your Google Sheet charts in your email reports.

Whilst this solution focuses on extract Google Sheets chart images for the purpose of emailing, the technique might be of interest for other situations where you need to use a chart image.

Source: Dashboards in your inbox – Revisting tips on emailing inline Google Sheet chart images with Google Apps Script

Use the Google Cloud Identity API for Google Groups with some Google Apps Script helper functions

Use the new Google Cloud Identity API to manage your Google Groups on your G Suite domain. Find in this article some REST and Apps Script code to query the Cloud Identity API.

Stéphane Giron summaries some helpful Google Apps Script code for interacting with the Google Cloud Identity API via REST. In this post you’ll find functions for listing both Google Groups in your domain and the members of each of those groups.

Source: Use the Google Cloud Identity API for Google Groups

Workbook Statistics – a Google Sheets Add-on built using Google Apps Script (lessons in Add-on publication)

Get stats for your current active sheet & the entire spreadsheet in one place using workbook statistics – a g suite editor add-on built using google apps script.

A handy Google Sheets add-on from Sourabh Choraria that can give you an Excel like summary of the Google Sheet you are working on that can display information like the number of: filled cells, formulas, charts and more. This post is also worth reading if you are interested in tips for the Add-on publication processes, highlighting some of the pitfalls you can avoid. The code for the Add-on is also open source making it possible to reuse in your own Apps Script projects.

Source: workbook statistics – a google sheets add-on built using apps script

Google Apps Script video tutorials from @saperis_io

It’s always nice to see members of the community contribute new resources. The latest comes from a growing list of videos produced by Chanel Greco Founder & CEO of saperis. These videos are designed to show how repetitive tasks in G Suite can be automated using Google Apps Script. Chanel has lots of other G Suite problem solving solutions posted on the saperis YouTube channel.

Converting Range in Google Spreadsheet as Image using Google Apps Script · tanaike

This is a sample script for converting a range in Google Spreadsheet as an image data using Google Apps Script. Unfortunately, there are no methods for directly converting the range in Google Spreadsheet as an image data in the built-in functions. So in this case, as a workaround, Charts Service is used.

Source: Converting Range in Google Spreadsheet as Image using Google Apps Script · tanaike

Google Developers Blog: Building G Suite Add-ons with your favorite tech stack

Let’s talk about the basics of G Suite Add-ons. G Suite Add-ons simplify how users get things done in G Suite by bringing in functionality from other applications where you need them. They provide a persistent sidebar for quick access, and they are context-aware — meaning they can react to what you’re doing in context. … Up until recently, G Suite Add-ons leaned on Apps Script to build Add-ons, but choice is always a good thing, and in some cases you may want to use another scripting language.. So let’s talk about how to build Add-ons using additional runtimes.

Google recently announced the ability to develop G Suite Add-ons using other frameworks other than Google Apps Script. This post on the Google Developers Blog introduces how you can develop G Suite Add-ons with something other than Google Apps Script.

Source: Google Developers Blog: Building G Suite Add-ons with your favorite tech stack

Measure Core Web Vitals of your Websites with Google Sheets – Digital Inspiration

Core Web Vitals are a set of metrics defined by Google to help webmasters understand the performance of their websites. You can automate the measurement and tracking of core vitals with Google Sheets.

Another incredibly rich resource from Amit Agarwal containing useful guidance on not only performance of websites and potential impact on search ranking, but also a very concise coding pattern for reading and writing data in Google Sheets.

Source: Measure Core Web Vitals of your Websites with Google Sheets – Digital Inspiration

This YouTube Video Has n Views – How the Video Title Updates Itself – Digital Inspiration

How to automatically update the title of your YouTube video to accurately reflect the views and comment count in the title.

Amit Agarwal has a great eye for these little tweaks. The source post has all the code you need (one note to keep in mind is you might get into authentication loops if using other Google Apps Script services with this script solution)

Source: This YouTube Video Has n Views – How the Video Title Updates Itself – Digital Inspiration

Automatically backup Google Apps Script projects using Github Actions

Image: Copyright 2020 RavSam

Google Apps Scripts are amazing. Without setting any servers, we can do a lot of things like collecting form responses, email marketing campaigns, etc. But as a developer, we like our code to be on Version Control System like Github. In this blog, we will discuss how can you setup Github Actions to automatically backup your Google Apps Scripts to Github.

For Google Apps Script developers who use clasp this is a great post on how you can setup Github Actions as part of your dev flow. Click through to the source for all the details.

Source: Backup Google Apps Scripts using Github Actions

Google Maps Formulas for Google Sheets – Digital Inspiration

You can bring the power of Google Maps to your Google Sheets using simple formulas with no coding. You don’t need to sign-up for the Google Maps API and all results from Google Maps are cached in the sheet so you are unlikely to hit any quota limits.

Great post from Amit Agarwal using the Maps Service for Google Sheets custom functions.

Use Google Maps formulas inside Google Sheets to calculate distances, travel time, get driving directions, look up postal codes with reverse geocoding and more!

The post includes all the source code and has some great examples using the V8 syntax.

Source: Google Maps Formulas for Google Sheets – Digital Inspiration

Build Apps Powered by Language with Semantic ML with the new Semantic Reactor Google Sheets Add-on

In this post, I’ll show you how to use beginner-friendly ML tools–Semantic Reactor and TensorFlow.js–to build an app that’s powered by natural language.

NEW: Semantic Reactor has been officially released! Add it to Google Sheets here.

We’ve previously highlighted how TensorFlow.js can be used in Google Apps Script. In this latest example the new Semantic Reactor Google Sheets Add-on published by Google Research is highlighted. Semantic Reactor is designed to make it easier to start exploring Natural Language Understanding (NLU) and with this tutorial you can learn how you can deploy your model to code.

Source: Build Apps Powered by Language with Semantic ML

Google Apps Script: Automated PDF Certificate Creator That Is Emailed to the Attendee – Yagisanatode

Use Google Apps Script, Google Slides and Google Sheets to quickly automate creating a Certificate of Attendance and send it to attendees.

Nice example using Google Apps Script to generate and share .pdf documents via email. The source has all the code you need to get going on this.

Source: Google Apps Script: Automated PDF Certificated Creator That Is Emailed to the Attendee – Yagisanatode

Pen-based Interaction with Google Sheets in Mobile Virtual Reality

I’m sure for many pro Google Sheets users when you look at a Google Sheet what you see on screen is different for what you ‘see’ in your mind. Researchers from Coburg University, Microsoft Research and the University of Cambridge have potentially bridged this gap showing what Google Sheets can look like virtual reality (VR).

Whilst the video embedded above is not explicitly about Google Apps Script, I think it’s always worth keeping an eye on the horizon to see what the future might bring (you might want to skip through to 05:12 to see what I mean). You can also read the full research paper, in which the researchers explain how they used the Google Sheets API to build the experimental interface in the Unity game engine.

For Google Apps Script developers I’m sure you’ll be able to see how this solution could also benefited from the built-in SpreadsheetApp methods like getCurrentCell() and activate(), rather than using the the Sheet API, which reported as a limitation that haas reported in the research paper:

Since the Google Sheets API exposes no functionality to track client-side interactions, operations of users with the web page were tracked inside Unity. In particular, tracking of cell selection was implemented by constructing virtual-cells in the Unity space using oriented bounding boxes, and spatially position them in their corresponding places to fit the spreadsheet texture. Tracking of the pen and the Unity collision detection mechanism is used to detect whether the pen tip lies inside a certain cell.

Gesslein et al. (2020)

How to build a Google Analytics Dashboard with Apps Script and Google Sites – Sheets to Apps

Using Google Analytics and looking for a new way to aggregate, store, and efficiently organize the data from your website in a Google Sheet? In this episode of Sheets to Apps, we show you how to combine the Google Analytics add-on with Apps Script, resulting in the automation of cohesive data summaries that are compatible with Google Sites.

In this latest episode Alexandrina Garcia-Verdin demonstrates how the Google Analytics Add-on can be combined with macros to automate regular reporting. The video description has links to all the resources you need to set this up.

Whilst ‘Sheets to Apps’ videos are targeted at low/no coders as an Apps Script Developer I always find it useful to have a look at the code to see how it is done, as more often than not there will be a technique or method I’ve not come across. In the case of this example my new discovery was the .autoFill() and after browsing the documentation, .autoFillToNeighbor() methods in SpreadsheetApp. These methods allow you to replicate the auto-fill functionality users have in Google Sheets.

Another discovery was the various .setOption() calls when building the charts. I’ve used .setOption() in projects in the past and the issue I’ve had is navigating the long list of options you can use for various chart types. Using the macro recorder seems like a great way to capture all the options you want to add to your script project.

Subscribe to Apps Script Pulse...