Tuesday 13 February 2024

Replace text in a Google Doc with an image

The following Google Apps Script is designed to search the body of a Google Doc for a specific string/pattern (i.e. a keyword) and insert an image in place of it, optionally making it a clickable hyperlink too.


Instructions

In this example the code is designed to sit behind the Google Doc so it is bound to it. There are 4 pieces of information to complete in order to setup the script:

  1. searchText - this is the unique string/pattern in the Doc that you want to replace with an image e.g. "<<keyword>>"

  2. imageURL - this is the direct link to the image in Google Drive that you wish to use in the Doc.

  3. size - a numerical value representing the number of pixels for the image's width/height.

  4. hyperlinkURL - if you want the image to be clickable then provide a link for it.

Tuesday 23 January 2024

Google Add-on: Auto Close Form


What it does

The Add-on allows you to have a Google Form automatically close when a set number of responses has been reached or on a specific date. You define exactly how many responses or the date, per form, and then leave it to run in the background. Once a Form has closed you will receive an automated email informing you.

Example uses:

  • Sign ups to an event/workshop/conference.
  • A limited time offer.
  • Submission deadlines.


Find out more

Auto Close Form Add-on webpage - includes instructions and demo videos.

Tuesday 16 January 2024

Drive API - get file information

The following Google Apps Script is a snippet of code where I was learning how to use the Drive API to query a folder of files, to extract some specific file information. It is designed to work on both My/Shared drives.


Information to Extract

  • Name;
  • Type (e.g. Doc, Sheet);
  • ID;
  • Creation date;
  • Last modified date;
  • Clickable link;
  • Owners


Enable Drive API

Please follow the steps to enable the 'Drive API' Service if you are not working from a copy of the file in this post.

Tuesday 9 January 2024

Google Add-on: Form Calendar Invites


What it does

The Add-on allows you to link a Google Form™ with Google Calendar™ events so that when people complete the Form and select a particular title/date/time from it, they are sent an automated email invite to one of the respective Calendar events.

This allows you to have Calendar events with all guests attached to it such as for conferences, workshops, drop-ins, training sessions, etc. Therefore any changes to an event (description/conferencing, etc) will be reflected for all guests - just like any other event.

Sessions listed in the Form can be selected

Find out more

Form Calendar Invites Add-on webpage - includes instructions and demo videos.