AppsScriptPulse

Getting started with Google’s Gen AI (PaLM 2) in Google Apps Script

At the Google I/O ’23, various announcements were made with respect to different AI and ML advancements Google is making as we speak. While listening to the session, I stumbled on PaLM 2. It was really interesting as to what capabilities it has with respect to generative models and machine learning.

This tutorial series will introduce you to PaLM 2, the API, MakerSuite, and Google Apps Script. We will combine these tools to do something interesting with prompts.

Editor: There are a couple of ways you can access Google’s Gen AI language models. Bard is the consumer version but for developers you might want to start exploring API access to one of the underlying foundation language model, PaLM 2, using Google’s MakerSuite. There is a waitlist for MakerSuite, but worth putting your name down if you are interested in an easy way to programmatically start prototyping applications with the PaLM using a basic API key. This video series from Aryan Irani covers everything you need to get started, particularly if you are interested in using PaLM with Google Apps Script.

If you prefer to get started straight away, you can also access the PaLM API in Vertex AI today from a Google Cloud project (more information about this on the MakerSuite site).

Source: Getting started with PaLM 2

Creating your own Google Calendar Assistant with Google Apps Script and the Google Speech to Text, ChatGPT and Google Chat APIs

 

Image credit: Stéphane Giron

Have you ever wished for a personal assistant who could give you a quick summary of your day’s events while you’re busy getting ready in the morning? I worked on a Google Apps Script that does just that! By collecting events from in Google Calendar, generating a summary using ChatGPT, and creating a voice file with Google Text to Speech, the script will send a daily summary straight to their Google Chat Spaces.

Not surprising given the current interest in generative AI to see more examples emerging from the Google Workspace developer community. This latest example comes from Stéphane Giron who shares how he is able to recreate some Google Assistant functionality with Google Apps Script and calls to the ChatGPT and Google Cloud Text to Speech services. All the main code snippets from this project are available in the source post link.

Source: How I created a Calendar Assistant with Google Apps Script that automates a daily voice summary…

Integrating AI in Google Sheets with Google Apps Script: How to Pass Prompts to ChatGPT and Get a Response

Have you heard about ChatGPT? It’s the latest buzz in the world of AI and everyone’s eager to unleash its true powers. As I delved deeper, I wondered — is it possible to integrate ChatGPT with Google Sheets? Can we pass prompts from Google Sheets and get a response from ChatGPT?

After some research, I discovered that it’s indeed possible to integrate ChatGPT with Google Sheets using the Open AI API. In this blog, we’ll be exploring how to bring AI to your spreadsheets using the Open AI API and Google Apps Script.

This blog post discusses how to integrate AI in Google Sheets using Google Apps Script by passing prompts to ChatGPT, a large language model. It provides step-by-step instructions on how to set up the integration and use it to generate responses to prompts.

Source: Integrating AI in Google Sheets with Google Apps Script: How to Pass Prompts to ChatGPT and Get a Response

 

Automate invoice management in Gmail with Document AI and Google Apps Script

Image credit: Full diagram of invoice automation in Gmail with Document AI and Apps Script –
Stéphane Giron

Tired of manually managing your invoices in Gmail? Say goodbye to the hassle and hello to efficiency with Document AI and Apps Script.

There is a lot of buzz around generative AI, but it’s also worth remembering Google have a well established service offer in other forms of AI, the Document AI being one example of this. This post from Stéphane Giron highlight an Apps Script based workflow for analysing invoices attached to Gmail messages using the Document AI. There is a bit to setup in a Cloud project to get this working and as a paid for service costs to consider. Further information on this and all the code you need to get started are included in the source post.

Source: Automate invoice management in Gmail with Document AI and Google Apps Script