Skip to content

Instantly share code, notes, and snippets.

@basezen
basezen / gsheetpdf.js
Last active July 6, 2026 12:40
NodeJS demonstration of Google's new (July, 2026) internal API for exporting / downloading Google Sheets as PDFs programmatically. Server-side, no Apps Script. Headless and automatable.
/*
gsheetpdf.js
Author: Daniel Bromberg daniel@basezen.com Copyright 2026
License: MIT https://opensource.org/license/mit
Part of Gist: Demonstration of Google's new (July, 2026) internal API for downloading Google Sheets as PDFs
programmatically.
DISCUSSION: Rather than the /export endpoint, which now generates 500 (for my use case),