tanaike

The Thinker

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

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.

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

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: Flexible MimeType Converter with Google Apps Script

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.

Updated: GAS Library - GeminiWithFiles

GeminiWithFiles was updated to v2.0.3 v2.0.3 (November 19, 2024) I modified the specification of setFileIdsOrUrlsWithResumableUpload. From v2.0.3, when you use this method, please include propertiesService: PropertiesService.getScriptProperties() into the initial object as follows. Because, when PropertiesService.getScriptProperties() is used in the library, the values are put into the library. When I created Ref and Ref, I supposed that the script is used by copying and pasting instead of the library.

Exporting Google Sheets Tables as PDFs using Google Apps Script

Gists 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.