tanaike - Google Apps Script, Gemini API, and Developer Tips

The Thinker

GAS Library - TableApp

Overview

TableApp is a Google Apps Script library for managing Tables on Google Sheets.

Description

Recently, a new feature “Tables” was introduced to Google Sheets. Tables allow users to group data into structured tables with headers, filtering, and specific data types. While these can be managed via the Google Sheets API (v4), constructing the raw JSON requests for operations like creating, updating, and managing tables can be complex.

This library, TableApp, creates an object-oriented wrapper around the Google Sheets API, making it easy to manage Tables directly within Google Apps Script.

Simplify Google Sheets Tables Management with Google Apps Script

Gists

Abstract

This article introduces “TableApp,” a Google Apps Script library designed to simplify managing Google Sheets Tables. It addresses the complexity of the native Sheets API, providing an intuitive interface for creating, updating, and manipulating tables. Sample scripts and installation guides are included to ensure easy implementation.

Introduction

The introduction of Tables in Google Sheets has significantly enhanced data management capabilities. While these tables can be managed via the Sheets API, the process is often complex and verbose. I previously discussed this in my article, Managing Tables on Google Sheets using Google Apps Script.

From Data Silos to Unified RAG: Gemini CLI Extensions Unify Local and Google Workspace for a Powerful File Search

Gists

Abstract

This article demonstrates how to create a unified file search for Gemini, integrating disconnected local files and Google Workspace data. Using a Google Apps Script-powered extension, users can directly ingest data from Drive, Sheets, and Gmail, enabling a powerful, context-aware RAG system.

Introduction

1. The Challenge of Data Silos

In modern enterprises, data is fragmented. It lives on local machines, in Google Drive, within Google Sheets, and across countless emails. While the Gemini CLI excels at file searches, it traditionally requires manually downloading cloud files to a local environment before they can be used. This workflow is inefficient, error-prone, and creates unnecessary operational overhead, preventing the creation of a truly comprehensive knowledge base for Retrieval-Augmented Generation (RAG).

Gemini CLI Extension: FileSearchStore-extension

Here introduces a new Gemini CLI extension that integrates File Search feature. This tool establishes a fully managed Retrieval-Augmented Generation (RAG) system directly on the command line.

The extension is designed to simplify the use of the Gemini API’s File Search, a powerful new feature that enables RAG grounded in personal or proprietary knowledge bases. While the underlying API requires scripting, this Node.js-built CLI extension allows users to seamlessly manage File Search stores and generate context-aware content grounded in their private documents without having to leave the terminal interface.

Integrating File Search with the Gemini CLI Extension

Gists

Abstract

This article introduces a Gemini CLI extension that integrates File Search feature. This tool provides a fully managed Retrieval-Augmented Generation (RAG) system directly in your command line, enabling content generation grounded in your private documents and data.

Introduction

The Gemini API recently introduced File Search, a powerful feature that enables Retrieval-Augmented Generation (RAG) using your own documents as a knowledge base. This allows you to generate content grounded in personal or proprietary information. While powerful, leveraging this via API calls requires scripting.

Modern Google Apps Script Workflow Building on the Cloud

Gists

Abstract

This article guides you through establishing a modern, cloud-based development workflow for Google Apps Script. Learn to leverage Google Cloud and Firebase Studio with powerful tools like the Gemini CLI and gas-fakes to build, test, and deploy your automations with enhanced efficiency and security.

Introduction

Google Apps Script is primarily designed to be created in a cloud-based script editor and run on the cloud. However, using Google Apps Script on various cloud platforms opens up the possibility of wider application development due to its high compatibility with each platform’s features.

Bridging the Gap: Seamless Integration for Local Google Apps Script Development

Gists

Abstract

This article explores the evolution of Google Apps Script (GAS) development, focusing on the powerful capabilities unlocked by the gas-fakes CLI. Discover how to seamlessly integrate your local development environment with GAS, enabling you to use local files, execute scripts without uploading, and build a more efficient, modern workflow.

Introduction

Google Apps Script is a versatile platform that continues to evolve. A significant leap forward in its development is the ability to work with GAS projects locally, a paradigm shift driven by Bruce McPherson’s gas-fakes. This tool, and the ecosystem it has inspired, are changing how developers approach GAS development.

Next-Level Google Apps Script Development

GitHub

Abstract

This article introduces a powerful method for developing and testing Google Apps Script (GAS) locally. By leveraging the gas-fakes library, you can build a secure, local Model Context Protocol (MCP) server, enabling the creation of AI-powered tools for Google Workspace automation without deploying to the cloud.

Introduction

gas-fakes, developed by Bruce McPherson, is an innovative library that enables Google Apps Script (GAS) code to run directly in a local environment by substituting GAS classes and methods with their corresponding Google APIs.

Secure and Streamlined Google Apps Script Development with gas-fakes CLI and Gemini CLI Extension

Gists

Abstract

This document introduces a powerful integration of the gas-fakes CLI and a Gemini CLI extension, creating a secure and streamlined development workflow for Google Apps Script. This setup enables local testing of AI-generated scripts in a secure sandbox, preventing unintended access to your Google Drive, and provides a seamless transition to cloud deployment.

Introduction

The gas-fakes project by Bruce McPherson is a groundbreaking endeavor that recreates the Google Apps Script (GAS) execution environment on Node.js, enabling local testing and debugging. When Bruce invited me to join the project, I first started by understanding gas-fakes. The project enables local execution by converting GAS service calls (e.g., SpreadsheetApp.create()) into corresponding Google API requests.

Gemini CLI Extension for GAS Development Kit

I created a Gemini CLI extension as a GAS Development Kit. For this, I developed the CLI of gas-fakes.

Repository

https://github.com/tanaikech/gas-development-kit-extension

Installation

1. Install Gemini CLI

First, install the Gemini CLI using npm:

npm install -g @google/gemini-cli

Next, you will need to authorize the CLI. Follow the instructions provided in the official documentation.

2. Install Clasp

Even when Clasp is not installed, when gas-fakes is installed, you can run Google Apps Script in a sandbox using gas-fakes.