Google Apps Script offers Document service for basic document tasks and Google Docs API for advanced control, requiring more technical expertise. This report bridges the gap with sample scripts to unlock the API's potential.
A Versatile Approach to Uploading Files with Node.js: Integrating Gemini, Drive, YouTube, and Other APIs
A script using resumable upload with file streams is proposed to enhance file handling within the Gemini Generative AI API for Node.js. This script allows uploading from web URLs and local storage, efficiently handles large files, and offers potential reusability with other Google APIs.
The @google/generative-ai
library provides a powerful way to interact with the Gemini Generative AI API using Node.js. This enables developers to programmatically generate creative text formats, translate languages, write different kinds of creative content, and answer your questions in an informative way, all powered by Gemini's advanced AI models. Ref
This report provides a Google Apps Script to retrieve all files, including those within subfolders, for a designated folder. It addresses the challenges of retrieving files within deeply nested folder structures and obtaining complete file paths.
Google Apps Script empowers developers to interact with Google Drive data programmatically, unlocking a wide range of functionalities. A core component of this interaction is the Drive service (DriveApp) and Drive API. These services provide programmatic control over files and folders within your Drive.
This script automates moving a folder including files and folders between Google Drives (personal or shared) by recreating the folder structure and transferring files, overcoming limitations for shared drives.
Leveraging Gemini 1.5 API for Automated Test Case Generation in Google Apps Script Reverse Engineering
This report examines leveraging Gemini 1.5 API with Google Apps Script to automate sample input creation during script reverse engineering. Traditionally, this process is manual and time-consuming, especially for functions with numerous test cases. Gemini 1.5 API's potential to streamline development by automating input generation is explored through applying reverse engineering techniques to Google Apps Script samples.
These are sample scripts in Python and Node.js for controlling the output format of the Gemini API using JSON schemas.
In a previous report, "Taming the Wild Output: Effective Control of Gemini API Response Formats with response_mime_type," I presented sample scripts created with Google Apps Script. Ref Following its publication, I received requests for sample scripts using Python and Node.js. This report addresses those requests by providing sample scripts in both languages.
This script demonstrates how to insert an animated GIF over cells in a Google Sheet using Google Apps Script.
I recently received a request to create a Google Apps Script for inserting animated GIFs into cells on a Google Sheet. I previously published a sample script on my blog on June 6, 2017. Ref In that script, the animation GIF was inserted using a public link. This new script leverages data URLs, which simplifies the process for using GIFs stored in Google Drive. Since this approach might be helpful to others, I'm sharing it here.
Consolidate Scattered A1Notations into Continuous Ranges on Google Spreadsheet using Google Apps Script
Consolidate scattered cell references (A1Notation) in Google Sheets for efficiency. This script helps select cells by background color or update values/formats, overcoming limitations of large range lists.
Copying Sheet Including Charts from Google Spreadsheet to Another Google Spreadsheet using Google Apps Script
This report presents a workaround for copying a sheet, including its charts, from Google Spreadsheet "A" to Google Spreadsheet "B" using Google Apps Script.
In this report, I would like to introduce a workaround for the following goal: