AppsScriptPulse

Accelerate Google Workspace Add-on and chat bot development with the Card Builder tool | Demo

Take a quick tour through the new Card Builder tool for Google Workspace Add-ons and see how it helps you quickly design and generate code for card-based interfaces.

We’ve mentioned the Card Builder tool in a couple of episodes of Totally Unscripted but if you’ve got come across it yet Steve Bazyl provides a quick overview. This tool can be used to help developing Workspace Add-ons that use the Card Service (https://gw-card-builder.web.app/) and also Google Chat bots (https://gw-card-builder.web.app/chat).

Make your own Office Desk Booking with Apps Script

In this new era post Covid, to come back to work we have to maintain a certain quota of people at the office. At Devoteam G Cloud we had this needs and to be able to manage people at office we build a web app with Apps Script to manage team and people presence on site.

A great example from Stéphane Giron using Google Apps Script to rapidly develop and deploy an office management solution. The post highlights the utility of PropertiesService to store data in the web app. This solution falls into the category of minimum viable product, but given the nature of Apps Script could be a great project to build on with integration with other Google services.

Source: Make your own Office Desk Booking with Apps Script

Random and fake test data in Sheets with Google Apps Script – Desktop Liberation

Image credit: Bruce Mcpherson

Image credit: Bruce Mcpherson

Sometimes you need to generate some fake data for a spreadsheet. In this post I’ll cover a few utilities in 2 separate libraries that can help with this.

Bruce Mcpherson has put together a Google Apps Script library which is a port of Faker.js and elements of d3.js to make it easier to generate random data in your projects. You can see the full list of Faker.js methods which includes a wide range from names/addresses to dates to just lorem text. The library can also generate various fake datasets, strings and selectors.

Source: Random and fake test data in Sheets with Google Apps Script – Desktop Liberation

Telegram Bot with Inline Keyboard in Google Sheets [and Google Apps Script]

Questa funzionalità permette di visualizzare, insieme al messaggio del bot, una tastiera virtuale con una serie di bottoni dove gli basterà cliccare su uno di essi per scegliere la sua risposta

[Google Translate: This feature allows you to view, together with the message of the bot, a virtual keyboard with a series of buttons where it will be enough to click on one of them to choose its response]

The accompanying video and post for this solution are in Italian and Google Translate might be required. This is a great resource and another example of a high quality video produced by the Apps Script community. The solution provides an overview of how you can display an inline keyboard within a Telegram Bot using a single Google Apps Script project.

Source: Telegram Bot with Inline Keyboard in Google Sheets

Apps Script – How to track library and script usage – Desktop Liberation

You’ve written a great Apps Script library and you want to know how many people are using it, and perhaps even which parts of the library they are using, and how often. Perhaps you have a new version out, and need to know whether anybody is still using the old version. You may also have a set of libraries and you want to know whether users have flipped to the new version. All these things are important to know, but impossible to find out using the Apps script platform as is.

Bruce Mcpherson provides a detailed solution for tracking Google Apps Script library usage using the Properties Service. The source post contains everything you need to integrate this solution into your existing libraries as well as a quick way to chart usage.

Source: Apps Script – How to track library and script usage – Desktop Liberation

Google Apps Script powered extensions, add-ons, and customizations for the Habitica self-improvement web app

Habitica is a self-improvement web application with game mechanics overlaid in order to help the player keep track of and remain motivated to achieve their goals.

The game is laid out in the form of an RPG, in which the player collects items such as gold and armor to become more powerful. Rewards are achieved through maintaining real-life goals, in the form of Habits, Dailies, and To-Dos.

Wikipedia

Can’t say that I’ve come across the self-improvement web app Habitica before, but good to know there is a long list of Google Apps Script powered extensions, add-ons, and customizations.

Source: Extensions, Add-Ons, and Customizations – Habitica Wiki

How to Use Notion with Gmail and Google Sheets using Apps Script – Digital Inspiration

How to use the Notion API with Google Apps Script to connect Gmail, Google Forms, and Google Sheets with your Notion workspace.

Notion, my absolute favorite tool for storing all sorts of things from web pages to code snippets to recipes, just got better. They’ve released a public API and thus it will be a lot easier for developers to read and write to their Notion workspace from external apps.

For note keeping fans of Notion Amit Agarwal shares some basic code to interact with the Notion API. Amit also has wrapped this into a new private beta Gmail Add-on that you can see in the post with a link to request early access.

Source: How to Use Notion with Gmail and Google Sheets using Apps Script – Digital Inspiration

Using UrlFetchApp.fetch vs. fetchAll in Google Apps Script

Make multiple, asynchronous API calls simultaneously using UrlFetchApp.fetchAll in Apps Script. mostly when running through a list of resources against which an API call needs to be triggered, we end up using the UrlFetchApp‘s fetch service; however, in case if the list is well-defined and needs to be consumed as a whole, you could make use of the fetchall service instead.

In this post sourabh choraria highlights the benefits of UrlFetchApp.fetchAll()when making asynchronous API calls in Google Apps Script.

Source: using UrlFetchApp.fetch vs. fetchAll in google apps script

Parse 16K URLs and Put the Result to Google Sheet in 3 Minutes

Photo by Joel Mott on Unsplash

Sometimes my best option is to write code on the go rather than using libraries or searching for ready-to-use code. I’ve made a short script for parsing URLs and putting the result into my Google Sheet.

As a developer it is always interesting to see how other people approach problems. This little snippet from Max Makhrov caught my eye because the approach to parsing data in a Google Sheet wasn’t one I’d seen before. Follow the source link to have a look yourself…

Source: Parse 16K URLs and Put the Result to Google Sheet in 3 Minutes

Generating custom travel advice links for Nederlandse Spoorwegen using Google Apps Script

I would like to send clients a travel advice (url) but I don’t know how to do that with the Maps Service. Luckely the website of the ‘Nederlandse Spoorwegen’ offers a possibility to do what I want to do (with some Google Apps Script).

For our fans in the Netherlands a nice little snippet from Mariette Timmer that builds a custom url to use with the Nederlandse Spoorwegen travel advice site. To solve this Mariette uses the Google Maps geocoder to convert an address into lat/long for needed for Nederlandse Spoorwegen.

Source: Travel advice #GoogleAppsScript