Great tip from Amit Agarwal for improving the performance of data heavy functions. Follow the link to the source post to find out more and a code sample to get started that finds a particular value in a CSV file.
Source: Improve Performance of Google Apps Script with Memoization – Digital Inspiration
How to use Google Sheets to generate Stripe payment links and request payments in any currency from customers anywhere in the world!
We’ve previously featured Amit Agarwal’s Razorpay and Google Sheets payment solution. This latest example from Amit highlights how to integrate Stripe payments with Google Sheets. The source post contains the code you’ll need, how to setup and also automation options.
Source: How to Request Payments with Stripe Checkout and Google Sheets – Digital Inspiration
How to use Google Sheets to generate Razorpay payment links and easily accept payments from customers anywhere in the world!
Razorpay is a popular payment gateway in India that allows you to accept online payments from customers anywhere in the world. Your customers can pay with credit cards, debit cards, Google Pay, Walmart’s PhonePe and other UPI apps.
A great solution from Amit Agarwal for creating payment links in Google Sheets for Razorpay. The source post provides more details of how this works and setup required. The post also outlines how you can combine this with a mail merge to sort all your invoicing needs.
Source: How to Request Payments with Razorpay and Google Sheets – Digital Inspiration
With Google Apps Script, you can easily convert any HTML content into a PDF file. The converted PDF file can be either saved to a folder in your Google Drive, you can email the file as an attachment or the use the UrlFetchApp service of Apps Script to post the PDF file to an external service like Amazon S3 or Dropbox.
Source: How to Convert HTML to PDF with Google Script – Digital Inspiration
Learn how to create your own Telegram bot with Google Apps Script and post notification messages from Google Sheets, Forms and other Google apps.
We’ve a couple of Telegram bot posts already shared in Pulse. The latest come from Amit Agarwal who shares his insight, highlighting some particularly useful functionality and use cases. More details in the source link.
Source: How to Create a Telegram Bot for Sending Notifications using Google Apps Script – Digital Inspiration
It is easy to search and replace text in Google Documents with the DocumentApp service of Google Apps Script. You can use use findText method with simple regular expressions to find text elements in the document that match a pattern and replace them with the specified text. All well and good but in some cases, this simple search and replace function may fail if the search text does not transform into a valid regular expression.
Some more regex goodness this time from Amit Agarwal who provides some very useful tips on escaping characters when using the
method. Click through to the source link for more details.
Source: How to Find and Replace Text in Google Docs with RegEx Search Patterns – Digital Inspiration
Learn how to sort your data in a Google Sheet in randomized order using Excel formulas and Google Apps Script.
Nice little snippet from Amit Agarwal which includes some Google Apps Script code for randomising the order of rows in Google Sheets. The code has some clever use of
Source: Sort by Random – How to Randomize the Order of Rows in Google Sheets – Digital Inspiration
In a conversation with YourStory, top tech blogger Amit Agarwal shares the secrets to building a global content business from Bharat.
Many of you will no doubt seen and used Amit’s Google Apps Script contributions published on labnol.org. This interview with Amit is an opportunity to hear/read more about his background and motivations.
Source: Top tech blogger Amit Agarwal on building a global content business for over 15 years
How to change the font family and font styles of multiple Word documents in your Google Drive with Apps Script. This example show how to replace the font family of your Google Documents of specific sections – the heading titles are rendered in a different font while the tables, list items, body and table of contents are formatted with a separate font.
Source: How to Change the Font in your Google Documents with Apps Script – Digital Inspiration
This Apps Script sample shows how you can programmatically schedule video meetings inside Google Meet with one or more participants using the Google Calendar API. It can be useful for teachers who wish to schedule regular meetings with their students but instead of manually creating meeting invites, they can easily automate the whole process for the entire class.
Source: How to Schedule a Google Meeting with Google Calendar and 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
Monitor the availability of Covid-19 Vaccines in your city and get email alerts when vaccine doses are available for people above 18 years of age.
It is very concerning to see the current situation in India in relation to the COVID-19 epidemic. Amit Agarwal has shared a solution using Google Apps Script which will let you receive an email notification of current vaccination slots in your city or zip area.
Source: Get Email Alerts When COVID-19 Vaccines Become Available Near You – Digital Inspiration
The printStackTrace method of Java is useful for handling exceptions and errors during development. It tells you the exact line number in your source code and the file name where the problem occurred.
A better alternative is that you parse the stack property of the Error object. This contains the entire stack trace along with line numbers, column position and the function names.
Great debugging tip from Amit that you can use in Google Apps Script for parsing the entire stack trace along with line numbers, column position and the function names. Check the source link below for example code and usage.
Christian Heilmann’s tweet – Feature request for Gmail: automatically find and follow the unsubscribe link in all highlighted emails – prompted me to build an automated system for unsubscribing your Gmail address from the bulk senders. Here’s how it looks…
This is an older example from Amit Labnol that recently pinged my Google Alerts from this Best Unroll.me Alternatives post. The source post from Amit has some nice details about how marketing emails are marked up and the code shared might be a nice starter for your own solution.
Source: How to Unsubscribe from Mailing Lists and Junk Newsletters in Gmail – Digital Inspiration
Learn how to setup email alerts for YouTube videos and get daily automatically notification when new videos are uploaded that match your search topics.
Very slick example from Amit Agarwal and for the more advanced Google Apps Script developer well worth checking out the source code to see how Amit handles setting up and managing script triggers.
Source: YouTube Email Alerts – Monitor Videos around your favorite Topics – Digital Inspiration
This Google Script will help you download your email messages from Gmail to your Google Drive in the EML format.
Nice little snippet from Amit Agarwal for generating .eml files from Gmail messages using Google Apps Script. The post has all the code you need for this.
Source: Download Gmail Messages as EML Files in Google Drive – Digital Inspiration
Your documents and files in Google Drive can be modified by anyone who has edit access to the file. Learn how to freeze a document and prevent anyone from editing your files.
Handy little snippet from Amit Agarwal that highlights the Google Drive Locking API to restrict edits on files. The post includes all the code and instructions on how this worked (also shared with a MIT license for reuse).
Source: How to Make your Documents Read-only in Google Drive – Digital Inspiration
The File Upload feature of Google Forms lets you receive files from form respondents directly in your Google Drive. You may add the File Upload question in your Google Form to receive PDF assignments from students, résumé applications, portfolio images from contestants, and so on.
When a respondent uploads a file through Google Forms, the file are stored in a fixed folder of your Google Drive. All files are uploaded in the same folder and, thus looking at the file in your Google Drive, it is difficult to determine which respondent has uploaded which set of files.
Learn how to organize file uploads and attachments from Google Forms and move files to a specific folder in Google Drive.
Source: How to Move Files Uploads from Google Forms to a Specific Folder in Google Drive – Digital Inspiration
The Properties Service of Google Apps Script is used by developers to store app configuration and user specific settings. The properties data is scoped to a specific user, or a specific project, and cannot be shared between different projects. … In some specific cases, we may want to give access to our store data to another user so they may build upon the existing configuration rather than having to build everything from scratch.
Amit Agarwal shares a useful snippet for letting users export and import data from
Source: How to Share User Properties between Google Apps Script Projects – Digital Inspiration
You can use Google Script to create JSON Web Tokens (JWT) that can be provided to secure routes so that only authenticated requests that contain a valid token can connect to the APIs (e.g., the Zoom API)
Nice little snippet from Amit Agarwal for both creating and decoding JSON Web Tokens (JWT).
Source: How to Create JSON Web Token (JWT) with Google Apps Script – Digital Inspiration
Monitor your Google Drive automatically and get email alerts when important files and folders are deleted from your Google Drive. You can also watch file activity in Shared Drives
Source: Google Drive Monitor – Get Email Alerts When Files are Deleted in your Drive – Digital Inspiration
Your documents and files in Google Drive can be modified by anyone who has edit access to the file. You can always remove external collaborators from your documents to prevent them from editing your files but how do you prevent yourself (the owner) from accidentally editing your own files in Google Drive? Google Drive doesn’t have a simple button (yet) for locking files so here’s a little Google Script that can help you make any file in your Google Drive read-only.
Nice post from Amit Agarwal showing how the new Google Drive Locking API can be used with Google Apps Script. The post contains all the code and instructions you need to get started.
Source: How to Make your Documents Read-only in Google Drive – 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
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
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
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
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
How to use the Zoom API to automatically create and schedule Zoom meetings with Google Apps Script
Great little snippet from Amit Agarwal showing how you can interact with the Zoom API using Google Apps Script. This post is also a great example if you are also looking for a code pattern for interacting with APIs using JSON Web Token (JWT). As Amit mentions it’s worth noting that:
We can build Zoom apps with the OAuth2 library as well but since this app is only for internal use and will not be publish to the Zoom marketplace, the JWT approach is easier.
Source: How to Create Zoom Meetings with Google Script – Digital Inspiration
With Creator Studio, you can easily convert your Google Slides presentation into animated GIFs and video slideshows. The add-on can also extract speaker notes from your slides and export them as a text file in Google Drive. Internally, the app uses Google Apps Script to export Speaker Notes from your Google presentation and writes them to a text file inside Google Drive.
In this post Amit Agarwal share some very clean code for iterating across each slide in Google Slides and export the speaker notes into a single file. Click through to the post for the source code.
Source: How to Download Speaker Notes in Google Slides – Digital Inspiration