GeminiWithFiles was updated to v2.0.4
-
v2.0.4 (March 15, 2025)
- Property
generationConfig was added to the method geminiWithFiles. By this, you can use all properties for generationConfig. Ref You can see the sample scripts at “Use googleSearch for grounding” and “Generate image”.
You can see the detail information here https://github.com/tanaikech/GeminiWithFiles
Gists
Description
Now, Google Docs and Google Sheets can insert smart chips. Smart chips are very useful for easily inserting information like users, maps, files, and so on. However, unfortunately, at the current stage, smart chips cannot be directly managed using Google Apps Script. Specifically, the information within smart chips cannot be directly retrieved by Google Apps Script. Although I believe this will be resolved in a future update, there might be cases where you want to retrieve information from smart chips using Google Apps Script. This report introduces a workaround for achieving this.
Gists
Description
This is a Google Apps Script for creating the tree structure from headings in Google Documents.

Usage
In order to test this script, please do the following steps.
1. Sample Document
Create a sample Document as follows.

2. Sample script
Open the script editor and copy and paste the following script.
In this script, Document service (DocumentApp) is used.
function sample1() {
const headTypes = [
"TITLE",
"HEADING1",
"HEADING2",
"HEADING3",
"HEADING4",
"HEADING5",
"HEADING6",
];
const body = DocumentApp.getActiveDocument().getBody();
const res = body
.getParagraphs()
.reduce((ar, p) => {
const idx = headTypes.indexOf(p.getHeading().toString());
if (idx > -1) {
ar.push(Array(idx).fill(" ").join("") + p.getText());
}
return ar;
}, [])
.join("\n");
console.log(res);
}
As another approach, the following script uses Docs API. Please enable Docs API at Advanced Google services. Ref
Gists

Description
This report introduces a sample script for changing the glyph colors of bullets in lists on Google Documents using Google Apps Script. Currently, there are no built-in methods for achieving this using either the Document service (DocumentApp) or the Docs API. However, this can be accomplished through a specific process. This report will introduce that process using Google Apps Script.
Principle
When the foreground color of the text within a list is changed using the Google Document service (DocumentApp), the bullet glyphs are not affected. However, when the foreground color of all text within a list is changed using the Google Docs API, the bullet glyphs are changed. This script leverages this behavior. The detailed process is as follows:
Gists
Published: March 9, 2025
Kanshi Tanaike
Introduction
On Stack Overflow, numerous users post questions and answers daily across various tags. These discussions, spanning a wide range of topics, provide valuable information and are highly beneficial. One such tag is “google-apps-script,” where I occasionally participate in discussions. Observing these threads over time, it’s evident that they evolve alongside updates to Google Apps Script, the technology at the core of the tag. This report aims to analyze this evolution as a trend within the “google-apps-script” tag. This trend encompasses changes in the number of questions, questioners, answerers, and associated tags. The evolution of the “google-apps-script” tag is closely linked to the development of Google Apps Script and its diverse applications.
URL: https://stackoverflow.com/users/7108653/tanaike?tab=answers&sort=newest
This is the statistics of my activities from 2024-01-01 - 2024-12-31 on Stackoverflow.
Total view counts: 186,104
Gists
Abstract
This report outlines a Google Apps Script solution for directly exporting web-published Google Docs to PDF. By circumventing limitations in published URLs, the script enables convenient PDF generation without manual intervention.
Introduction
Google Sheets and Google Docs offer the convenient feature of web publishing, providing readily accessible URLs for sharing. Ref
- Google Sheets:
https://docs.google.com/spreadsheets/d/e/2PACX-###/pubhtml
- Google Docs:
https://docs.google.com/document/d/e/2PACX-###/pub
These URLs utilize a unique ID (###) for each document. While Google Sheets supports direct PDF export by modifying the URL to https://docs.google.com/spreadsheets/d/e/2PACX-###/pub?output=pdf, a similar direct method for Google Docs is currently unavailable.
Gists

Abstract
A new library, MimeTypeApp, simplifies using Gmail messages and attachments with the Gemini API for tasks like text analysis. It converts unsupported formats for seamless integration with Google Apps Script and Gemini.
Introduction
Recently, I published MimeTypeApp, a Google Apps Script library that simplifies parsing Gmail messages, including attachments, for use with the Gemini API. Ref This library addresses a key challenge: Gmail attachments come in various MIME types, while the Gemini API currently only accepts a limited set for processing. MimeTypeApp bridges this gap by providing functions to convert unsupported MIME types to formats compatible with Gemini. With MimeTypeApp, you can streamline your workflows that involve parsing Gmail messages and their attachments for tasks like text extraction, summarization, or sentiment analysis using the Gemini API. This report introduces a sample script that demonstrates how to leverage MimeTypeApp to achieve this functionality. By leveraging Google Apps Script’s integration capabilities, MimeTypeApp allows you to create powerful applications that seamlessly connect Gmail, Spreadsheets (for storing results or extracted data), and the Gemini API.
Gists

Abstract
This is a Google Apps Script library for converting files from various MIME types to a specified target MIME type. The library accepts both file IDs and blobs as input values.
Introduction
Recently, I encountered a scenario where I needed to convert files of various MIME types to a specific target MIME type. While converting files with known source MIME types is relatively straightforward, the process becomes more complex when the source MIME type is unknown. To simplify this task, I developed a Google Apps Script solution that can effectively convert files of diverse MIME types to a desired target MIME type. The script can accept both file IDs and blobs as input values.
GeminiWithFiles was updated to v2.0.3
You can see the detail information here https://github.com/tanaikech/GeminiWithFiles