AppsScriptPulse

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

Visually display status when looping through Google Sheets data with Google Apps Script

show a processing status in a cell when looping through rows in google sheets using google apps script.

When working with small batches of data it can be useful to show the user that the data is being processed. Here is an example script from Sourabh Choraria which use SpreadsheetApp.flush() to force write updates to a Google Sheet. As this method relies on .setValue() instead of .setValues() it’s worth keeping in mind for bigger data sets that using HTMLService and a custom dialog or Speadsheet.toast()

If the .setValue() / .flush() Al from coda has provided this gist

Source: visually display status when looping through google sheets data

Format specific word inside a Google Sheet cell using Google Apps Script

Format (bold) a single word or a group of words automatically in sheets, using google apps script.

This example from Sourabh Choraria is a nice example of how you can apply text formatting to parts of Google Sheet cell values. Reading Sourabh post got me thinking if having an Add-on or built in feature that used basic markdown for cell formatting would be useful? e.g. typing `I just love **bold text**` would result in the cell being displayed as `I just love bold text`.

Source: format specific word inside a google sheet cell using apps script

Workspace Devs Directory – a new community initiative to help Google Workspace and Apps Script developers connect

Directory | Workspace Devs

A directory of Google Workspace and Apps Script Developers.

This space is to help bridge that gap within the Google Workspace (previously, G Suite) Developers community and mostly geared towards users who work within the Apps Script ecosystem.

Sourabh Choraria has created a new initiative to help Google Workspace and Apps Script developers connect. Anyone can submit their profile to be included in the directory.

Source: Directory | Workspace Devs

Sending data from a webcaptioner.com channel webhook to Google Sheets with Google Apps Script

push data from web captioner to google sheets via webhooks built using apps script.

the problem – playing with webcaptioner.com which lets you specify a webhook url. i was experimenting with adding captions to a google doc in realtime but apps script couldn’t keep up dropping ~20% of the captions sent via the hook

Sourabh Choraria kindly helped me solve an issue I was having passing data from webcaptioner.com to Google Sheets. Click through to the source link for the full explanation from Sourabh, but in essence the problem was I was losing data because I wasn’t using the LockService .

In the meantime webcaptioner.com have also updated there channel webhooks so you can set a data chuck size so if you are looking to capture a transcript in Google Docs you can use the following published as a container bound web app:

// @OnlyCurrentDoc
function doPost(e) {
const params = JSON.parse(e.postData.contents);
DocumentApp.getActiveDocument()
.getBody()
.appendParagraph(Utilities.formatDate(new Date(), "GMT", "HH:mm:ss")+': ' + params.transcript);
}

Source: web captioner, webhooks and google apps script

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

Reliable, Secure & Scalable use of Google Apps Script | Google Developers Experts

Most conversations around solutions or automations created using Apps Script eventually get to a point where being able to address concerns around its reliability, security and scalability becomes a challenge — more so if compared to having similar applications being built on other platforms (say: AWS, GCP, Firebase etc.).

In this post, we’ll see how to navigate our way through said constructs by addressing parts of these problems and also explore ways in which we can bake some solutions right from the get-go!

In this post Sourabh Choraria provides some very useful answers for common questions organisations have when using Google Apps Script as part of their infrastructure. Points covered in this post include: managing concurrent executions; being able to securely store, access & manage API keys, tokens; and considerations around quotas.

Source: Reliable, Secure & Scalable use of Apps Script | Google Developers Experts

Integrate Google sign-in using Firebase authentication on your Google Apps Script web app

make use of firebase’s pre-built ui to authenticate users on our google apps script web app

Sometimes with Google Apps Script web apps you need a way to authenticate the user whilst also publishing the web app to run under a specific account. Sourabh Choraria details how Firebase can be setup allowing you to authenticate users with their Google account.

Source: integrate google sign-in using firebase auth on your google apps script web app

Using Google Apps Script to capture who sends email from your delegated gmail account

Trigger automated meeting invite reminders using Google Apps Script

send a follow-up email to all undecided participants of a meeting that you’ve scheduled via google calendar using apps script.

here’s a piece of code that you could schedule for every morning (preferably before your official work hours start) to be triggered, such that the script could iterate through every single meeting event that you’ve scheduled (i.e. where you’re the “organiser”) for the day and send an email to all those invitees who’ve neither accepted nor declined (even excluding the maybe’d ones too) to said invites.

Nice post from Sourabh Choraria which covers interacting and using data from your Google Calendar.

Source: trigger automated meeting invite reminders using apps script

conversational stats – a way to talk to your data

leverage the power of dialogflow & connect your data sources with simple apps script functions to experience the next-gen approach towards consuming data and shaping insights.

Nice proof of concept from AppsScriptPulse Contributor (and now Editor :)
Sourabh Choraria of the results of a recent hackathon to use Google Sheets as a data source for a Dialogflow agent/bot.

Source: conversational stats – a way to talk to your data

iterate ~80x faster through spreadsheet using map function in apps script

use array map method instead of “for” loops to iterate faster through 2-dimensional spreadsheet data.

Sourabh Choraria shares his experience of using Array.map to find values in a Google Sheet and the performance benefit of using this approach.

Source: iterate ~80x faster through spreadsheet using map function in apps script

Improving your omnichannel customer experience – personalised problem solving (custom Exotel workflows with Google Apps Script)

With everyone talking about omnichannel communication,
@schoraria911 tells you how you create a smooth information flow between your helpdesk and phone system (@Exotel) to ensure a seamless customer experience

Always nice to see other companies promote the use of Google Apps Script with their service. In this post regular Pulse contributor Sourabh Choraria demonstrates how Apps Script can be used to configure the Exotel communications service.

Source: Improving your omnichannel customer experience – personalised problem solving – Global

SphygmoBot – A Telegram human heartbeat bot built using Google Apps Script

launching sphygmobot – a human “heartbeat” checker telegram bot that pings you every 24 hours to see if you’re alive and notifies someone in case your response fails.

Another really interesting post from Sourabh Choraria this time looking at making a Telegram bot using Google Apps Script. You can also find SphygmoBot on ProductHunt and also browse the source code on GitHub.

Source: build a telegram bot using apps script

Subscribe to Apps Script Pulse...