Gists
Abstract This report presents a Google Apps Script for generating visualized cooking recipes with text and images using the Gemini API, leveraging its image generation capabilities.
Introduction Recently, image generation was supported in the Gemini API using Gemini 2.0 Flash Experimental and Imagen 3. I have already reported a simple sample script for generating images using the Gemini API with Google Apps Script. Ref Google Apps Script seamlessly integrates with Google Docs, Sheets, and Slides.
Gists
Description Recently, image generation was supported in the Gemini API using Gemini 2.0 Flash Experimental and Imagen 3. This report introduces simple sample scripts for generating images using the Gemini API with Google Apps Script. When images can be created using the Gemini API with Google Apps Script, Google Apps Script, which seamlessly integrates with Google Docs, Sheets, and Slides, becomes a powerful tool for creating and managing them, and the applications are infinite.
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.
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.