spreadsheet-orm v1.0.4 is an ORM for Google Spreadsheets that provides a query builder and schema management layer, turning spreadsheets into database-like tables. It offers schema validation, relationship handling (hasOne/hasMany), and a fluent query builder. Actively maintained, it simplifies working with Google Sheets API by abstracting raw API calls. Differentiators include schema definitions, type-safe querying, and built-in data validation, unlike raw google-spreadsheet packages.
npm install spreadsheet-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize ORM with Google credentials, define a schema, and run a query with filters and ordering.
Use 'credentials' object instead of 'auth'
Replace rawQuery with query().raw()
Always use moment objects when setting dates, or format as ISO strings
Register all schemas before defining relationships
Avoid spaces in sheet names
Use named import { SpreadsheetORM }Set GOOGLE_CREDENTIALS environment variable with JSON object containing type, project_id, private_key, client_email
Use import { Schema } from 'spreadsheet-orm'Use import { SpreadsheetORM } from 'spreadsheet-orm' or enable ESM in your projectEnsure spreadsheet has a sheet named exactly as the schema name