Skip to content

Instantly share code, notes, and snippets.

View tanaikech's full-sized avatar

Kanshi TANAIKE tanaikech

View GitHub Profile
@tanaikech
tanaikech / submit.md
Last active May 18, 2025 11:53
Create Visualized Recipe Instructions with Gemini using Google Apps Script

Create Visualized Recipe Instructions with Gemini using Google Apps Script

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

@tanaikech
tanaikech / submit.md
Created March 15, 2025 06:33
Generate Images with Gemini API using Google Apps Script

Generate Images with Gemini API using Google Apps Script

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.

Usage

@tanaikech
tanaikech / submit.md
Last active May 18, 2025 11:54
Workaround: Smart Chips with Google Apps Script

Workaround: Smart Chips with Google Apps Script

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.

Workaround

The flow of workaround in this report is as follows.

@tanaikech
tanaikech / submit.md
Created March 12, 2025 05:16
Creating Tree Structure from Headings in Google Documents using Google Apps Script

Creating Tree Structure from Headings in Google Documents using Google Apps Script

Description

This is a Google Apps Script for creating the tree structure from headings in Google Documents.

Usage

@tanaikech
tanaikech / submit.md
Created March 10, 2025 05:19
Technique for Changing Glyph Colors of Bullets in Google Documents Using Google Apps Script

Technique for Changing Glyph Colors of Bullets in Google Documents Using Google Apps Script

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

@tanaikech
tanaikech / submit.md
Created March 9, 2025 07:04
Trend of google-apps-script Tag on Stackoverflow 2025

Trend of google-apps-script Tag on Stackoverflow 2025

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.

@tanaikech
tanaikech / submit.md
Created December 12, 2024 03:07
Workaround: Export web-published Google Docs as PDFs using Google Apps Script

Workaround: Export web-published Google Docs as PDFs using Google Apps Script

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

@tanaikech
tanaikech / submit.md
Last active May 18, 2025 11:55
Streamlining Gmail Processing Including Attachment Files Using Gemini with Google Apps Script

Streamlining Gmail Processing Including Attachment Files Using Gemini with Google Apps Script

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

@tanaikech
tanaikech / submit.md
Created December 4, 2024 05:52
MimeTypeApp: Flexible MimeType Converter with Google Apps Script

MimeTypeApp: Flexible MimeType Converter with Google Apps Script

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

@tanaikech
tanaikech / submit.md
Created November 6, 2024 00:20
Exporting Google Sheets Tables as PDFs using Google Apps Script

Exporting Google Sheets Tables as PDFs using Google Apps Script

Description

Recently, I reported on a workaround for effectively working with Google Sheets tables using Google Apps Script: Ref. This approach addressed limitations in directly retrieving table data and ranges within Apps Script. In this follow-up report, I'm excited to provide a sample script that leverages this workaround to export your valuable Google Sheets tables directly as PDF files. This functionality empowers you to easily share and distribute your data in a clear and universally accessible format.

Sample tables on a Google Spreadsheet