Skip to content

Instantly share code, notes, and snippets.

View Max-Makhrov's full-sized avatar
🇺🇦

Max Makhrov Max-Makhrov

🇺🇦
View GitHub Profile
@tanaikech
tanaikech / submit.md
Created October 17, 2024 00:08
Unlocking Power: Leverage the Google Docs API Beyond Apps Script's Document Service

Unlocking Power: Leverage the Google Docs API Beyond Apps Script's Document Service

Abstract

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.

Introduction

@tanaikech
tanaikech / submit.md
Last active February 1, 2025 14:53
A Versatile Approach to Uploading Files with Node.js: Integrating Gemini, Drive, YouTube, and Other APIs

A Versatile Approach to Uploading Files with Node.js: Integrating Gemini, Drive, YouTube, and Other APIs

Abstract

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.

Description

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

@tanaikech
tanaikech / submit.md
Last active June 24, 2024 05:05
Analyzing Folder Structures with Google Apps Script

Analyzing Folder Structures with Google Apps Script

Abstract

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.

Introduction

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.

@tanaikech
tanaikech / submit.md
Last active June 12, 2024 06:57
Move Folder including Files and Folders in Google Drive using Google Apps Script

Move Folder including Files and Folders in Google Drive using Google Apps Script

Abstract

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.

Introduction

@tanaikech
tanaikech / submit.md
Created May 8, 2024 05:27
Leveraging Gemini 1.5 API for Automated Test Case Generation in Google Apps Script Reverse Engineering

Leveraging Gemini 1.5 API for Automated Test Case Generation in Google Apps Script Reverse Engineering

Abstract

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.

Introduction

@tanaikech
tanaikech / submit.md
Last active January 5, 2025 05:30
Gemini API with JSON schema

Gemini API with JSON schema

Overview

These are sample scripts in Python and Node.js for controlling the output format of the Gemini API using JSON schemas.

Description

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.

@tanaikech
tanaikech / submit.md
Last active May 3, 2024 08:08
Inserting Animated GIFs over Cells on Google Sheets using Google Apps Script

Inserting Animated GIFs over Cells on Google Sheets using Google Apps Script

Overview

This script demonstrates how to insert an animated GIF over cells in a Google Sheet using Google Apps Script.

Description

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.

@tanaikech
tanaikech / submit.md
Last active April 16, 2024 13:00
Consolidate Scattered A1Notations into Continuous Ranges on Google Spreadsheet using Google Apps Script

Consolidate Scattered A1Notations into Continuous Ranges on Google Spreadsheet using Google Apps Script

Abstract

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.

Introduction

@tanaikech
tanaikech / submit.md
Created April 10, 2024 01:17
Identifying Colored Cell Regions in Google Sheets with Google Apps Script

Identifying Colored Cell Regions in Google Sheets with Google Apps Script

Overview

This Google Apps Script helps identify and analyze regions of colored cells in a Google Sheet.

Description

@tanaikech
tanaikech / submit.md
Created March 15, 2024 11:54
Copying Sheet Including Charts from Google Spreadsheet to Another Google Spreadsheet using Google Apps Script

Copying Sheet Including Charts from Google Spreadsheet to Another Google Spreadsheet using Google Apps Script

Abstract

This report presents a workaround for copying a sheet, including its charts, from Google Spreadsheet "A" to Google Spreadsheet "B" using Google Apps Script.

Description

In this report, I would like to introduce a workaround for the following goal: