AppsScriptPulse

Using Google Apps Script as a Webhook

Google Apps Script projects can be published as web apps …. This is helpful if you’re building a tool with a simple UI (using HTMLService), but they can also be used as webhooks to do work within a user account.

Google provides the option of service accounts, so why use webhooks?

For my project, it was because I needed to send calendar invites to other people. Service accounts are generally the way to handle those kinds of jobs, but it needed to have full account delegation, which means it can act on behalf of any user in the domain. That wasn’t an option in this case, so a webhook became the next best option.

Brian Bennett highlights the benefits of using ContentService and Web Apps as a way to let you interface other services.

Source: Using Google Apps Script as a Webhook

Track Customer Subscriptions with Google Spreadsheet & App Script by sending an Email Automatically

Do you still spend time every day monitoring your sales report, identifying which customer subscription is going to expire soon, and manually draft an email to send out to your customer? Would it be better if this manual task can be automated every day for you? If that’s the case, this article can be a great help for you!

Following on from some recent Google Sheet payment solutions here’s a tutorial that highlights how you can use Sheets and Apps Script as a payment reminder tool. Combine with Stripe or Razorpay and you have a complete subscription management solution.

Source: Track Customer Subscriptions with Google Spreadsheet & App Script by sending an Email Automatically

How to Create Automated Snapshots of your Google Sheet using Google Apps Script

In this video, we’ll show you how to automate snapshots of your Google Sheets and have those logs stored in a separate Google Drive folder so that you can keep your logs nicely organized for future reference. To do this, we’ll be using Google Apps Script to create a script that references the SpreadsheetApp library and the DriveApp library.

There seems to be an increasing number of YouTube channels dedicating content to highlight Google Apps Script solutions. Here’s the latest one we’ve come across from aguycalledjoe at bootstrapping.tools

Bulk convert Google Docs to PDFs

Bulk convert all the Google Docs within a given folder to PDFs and optionally delete the Docs afterwards. Specify the destination folder for the PDFs.

Bulk convert Google Docs to PDFs using Apps Script

Bulk convert Google Docs to PDFs using Apps Script

The following Google Apps Script tool is designed to bulk convert all Google Docs within a given Google Drive folder into PDFs. You can choose the destination folder for the PDFs to be put into and also whether you want the original Docs to be deleted. This tool does work on Shared drives.

Source: The Gift of Script: Bulk convert Google Docs to PDFs

Google Apps Script for Android Translation – Saravana Thiyagaraj

Normally we get strings.xml files from our translation team, but today was one of those days, where (due to time constraints) we got the source Google Sheet file. We had to generate strings.xml files out of these. This gave me the perfect opportunity to explore Google Apps Script which you could run on your Google Sheet.

This post highlights how Google Apps Script can quickly solve those little problems, in this case how to generate language .xml files used in Android. Follow the link to the source post for an explanation and code.

Source: Google Apps Script for Android Translation

Google Apps Script Basics – Variables and getting & setting values

Image: Baz Roberts

In this post, we’re going look at how variables are set up and how they can store various pieces of information. We’re also going to look at reading and writing data from a spreadsheet, which is one of the most common tasks when working with one.

We offer a wide range of community contributions here on AppsScriptPulse. This one might be useful if you are just learning to code and want to understand some of the fundamentals or if you’ve been using Apps Script for a while learn about variable types available in the V8 runtime.

Source: Apps Script Basics – Variables and getting & setting values

Google Apps Script Tutorial: Letterhead in Google Docs

In this Google Apps Script tutorial you will learn how to automatically create a letterhead in Google Docs.

This is a nice short video tutorial from Chanel Greco highlighting how you can manipulate a Google Doc header using Google Apps Script.

Get the redirect location of a URL using Google Apps Script

Have a list of shortened urls and need their final destination? Use this custom function in google sheets to extract them all at once.

Handy little snippet that can make testing redirects on URLs a lot easier, which can be useful for expanding short links from social media sites like Twitter.

Source: get the redirect location of a url using google apps script

How to Convert HTML to PDF with Google Script – 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

How to Build Custom Functions in Google Sheets with Google Apps Script

Build your own functions in Google Sheets that do anything you need them to in a few lines of code.

This is a great tutorial if you are interested in finding out more about developing custom functions in Google Sheets. The post includes everything you need to get started from handling single cell and range inputs, to documenting your function so that users see inline help.

Source: How to Build Custom Functions in Google Sheets with Google Apps Script