Categories
Code

Google Pub/Sub Cron Job using Google Apps Script

This is a simple example of how you could use a Trigger in Google App Script (GAS) to launch (i.e. publish) a Pub/Sub message.

We cover the following:

  1. Create a new Google App Script
  2. Setup OAuth2
  3. Create a Service Account to use with the OAuth2
  4. Create a the REST call to Pub/Sub
  5. Setup the Trigger