AppsScriptPulse

Find out who has access to your Google Drive files using Google Apps Script

In this blog we are going to find out who exactly has access to my Google Drive files, be it a Google Sheet, Google Doc, Form and more. To do this we are going to be using the DriveApp and Google Apps Script.

Recently Aryan Irani shared this post which shows how you can get the file permissions on a Google Drive file using DriveApp. This uses the DriveApp methods for .getEditors() and .getViewers(), which left me wondering about commenters???

The answer is file commenters are included in the .getViewers() response and as pointed out by TheMaster you can filter out commenters with .getAccess().

Another approach is to use the Advanced Drive Service:

The advanced Drive service lets you use the Google Drive API in Apps Script. Much like Apps Script’s built-in Drive service, this API allows scripts to create, find, and modify files and folders in Google Drive. In most cases, the built-in service is easier to use, but this advanced service provides a few extra features, including access to custom file properties as well as revisions for files and folders.

Learning about the Advanced Drive Service can be useful as it open up more opportunities to interact with Google Drive content and can also help you get file properties.

In the case of permissions there is a dedicated Permissions Resource that allows access to all the file permissions. For example, if I wanted to see what accounts had access to a file in MyDrive you can use:

// Requires Drive Advanced Service v3
const fileP = Drive.Permissions.list(fileId, {
  fields: "*" // all fields
});

fileP.permissions.map(perm => {
  console.log(`${perm.role} - ${perm.emailAddress}`)
});

Using the Advanced Drive Service does require a step up in understanding how to call the Drive API and the response you get but once you begin understanding it can come with huge benefits with more efficient code.

Source: Find out who has access to your Google Drive Files using Google Apps Script

Let Bard answer your questions in Google Sheets with the PaLM API and Google Apps Script

 

Discover the magic of combining Palm API’s extraordinary capabilities with the limitless potential of Google Apps Script. In this blog we will be taking a look at how we use the PaLM API and Google Apps Script inside of a Google Sheet. We will be passing prompts from a Google Sheet and getting back a response. 

Learn how to integrate Google Bard responses inside of Google Sheets using the PaLM API and a little bit of Google Apps Script. Using Google’s MakerSuite it is easy to create an API key which you can use with a custom function in Google Sheets. Whilst the solution focuses on creating a custom function which would automatically refresh, using it programmatically to store responses could be a quick way to collaboratively experimenting with LLM text prompts.

Source: Let Bard Answer Your Questions from Google Sheets with the PaLM API and Google Apps Script

Extend the capabilities of PaLM API with Google Apps Script

 

Discover the magic of combining Palm API’s extraordinary capabilities with the limitless potential of Google Apps Script. In this blog we will be taking a look at how we use the PaLM API and Google Apps Script. We will be passing basic prompts and getting the appropriate responses using Google Apps Script.

Yesterday’s Pulse contribution from Aryan Irani there was an overview on getting started with Google’s Gen AI PaLM 2 Large Language Model accessed using MakerSuite. In a follow-up post Aryan continues dives deeper into how the PaLM API can be called from Google Apps Script. The post includes instructions and sample code to help you get started. Aryan will be continuing exploring and sharing what can be done with the PaLM API and Google Workspace tools such as Google Sheets, Google Docs and more in future tutorials.

Source: Extend the capabilities of PaLM API with Google Apps Script

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

Create instant summaries in Google Docs: A step-by-step guide with OpenAI API and Google Apps Script

In today’s fast-paced digital world, effectively condensing lengthy content has become a necessity. Whether you’re a student grappling with research papers or a professional striving to stay ahead, generating concise summaries can save time and boost productivity. Luckily, the powerful combination of OpenAI APIs and Google Apps Script provides a seamless solution for effortlessly summarising paragraphs within Google Docs

Learn how to generate instant summaries in Google Docs using a step-by-step guide that combines the OpenAI API and Google Apps in this informative blog post on Medium. Discover the power of automated summarisation to enhance your document creation process.

Source: Create Instant Summaries in Google Docs: A Step-by-Step Guide with OpenAI API and Google Apps Script

Automating Blog Summarisation with Google Apps Script, ChatGPT, and Open AI API

Are you someone who loves reading blogs but finds it difficult to make time for them? Or, are you a blogger looking to make your content more accessible to readers? You’re in luck! I discovered an incredible combination of tools that can help automate the summarisation of blog posts.

Learn how to automate blog summarisation with Google Apps Script, ChatGPT, and OpenAI API. This blog post by Aryan Irani guides you through the process, enabling you to enhance your content creation efficiency. Simplify summarisation and maximize productivity in just a few steps.

Source: Automating Blog Summarisation with Google Apps Script, ChatGPT, and Open AI API

From Point A to Point B: How to Use Google Apps Script to calculate distance and time in Google Sheets

 

Imagine you’re responsible for transporting materials from one location to another for a logistics company. Accurately calculating the distance and time between two points is crucial for efficient logistics management, and having this information readily available can save time, money, and effort. However, doing it manually can seem like a daunting task. But don’t worry, there’s a solution!

Discover how to automate distance and time calculations between two points in Google Sheets using Google Apps Script. This blog provides a step-by-step guide on setting up the integration and shows you how to use it to save time and increase productivity.

Source: From Point A to Point B: How to Use Google Apps Script to Calculate Distance and Time in Google Sheets

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

 

Combining Google Apps Script with Google AppSheet

Combining Google Apps Script and AppSheet

In this blog I am going to show you how to combine Google Apps Script with Google AppSheet to make automation even more powerful.

Whilst Google AppSheet is marketed as a ‘no-code’ development platform for coders there have been a number of ways to add some customisations to AppSheet apps. Previously webhooks were the main way you could do this, but the recent Apps Script connector for AppSheet makes it possible to call and if required pass parameters from AppSheet into custom Apps Script functions.

If this is something you would like to learn more about Aryan Irani has continued his AppSheet tutorial series on Medium with this post which goes through the step-by-step process for setting up and using Apps Script code in AppSheet. Click through the source link to find out more.

Source: Combining Google Apps Script with Google AppSheet

Developing robust applications with Google AppSheet: A bundle of tutorials and resources

Recently, I got the chance of giving a training on Google AppSheet at O’Reilly Media, Inc. … This was a three hour long training where I talked about the basics of Google AppSheet and how to create apps on Google AppSheet.

Aryan Irani has shared a really helpful post with highlights from an O’Reilly Media hosted course he led focusing on ‘Developing Robust Applications with Google AppSheet’. The post links to a number of other tutorials Aryan has published on how to create various AppSheet based applications including an Expense Tracking App, Vehicle Inspection App, Inventory Management App and more. Aryan touches on how Google Apps Script can be used in combination with AppSheet. If this is a topic you are interested in Chanel Greco recently highlighted a Google I/O session on the topic.

Source: My First Online Training: Developing Robust Applications with Google AppSheet