Repository navigation
Add a Google Sheets template generated from Google's API description - #325
Merged
tnkuehne merged 2 commits intoNov 23, 2026
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | ae757f8 | Nov 23 2026, 10:35 AM |
tnkuehne
force-pushed
the
feat/google-sheets-template
branch
from
November 23, 2026 00:46
4509ada to
b3f8369
Compare
tnkuehne
force-pushed
the
feat/google-sheets-template
branch
2 times, most recently
from
November 23, 2026 01:08
90bd42a to
52a5295
Compare
tnkuehne
force-pushed
the
feat/google-sheets-template
branch
from
November 23, 2026 01:20
52a5295 to
96908a9
Compare
tnkuehne
force-pushed
the
feat/google-sheets-template
branch
from
November 23, 2026 01:31
96908a9 to
cc46f15
Compare
tnkuehne
force-pushed
the
feat/google-sheets-template
branch
from
November 23, 2026 01:43
cc46f15 to
f8615b6
Compare
tnkuehne
force-pushed
the
feat/google-sheets-template
branch
from
November 23, 2026 02:01
f8615b6 to
884c780
Compare
tnkuehne
force-pushed
the
feat/google-sheets-template
branch
2 times, most recently
from
November 23, 2026 08:32
6ec6f98 to
c4e410f
Compare
tnkuehne
force-pushed
the
feat/google-sheets-template
branch
from
November 23, 2026 09:16
c4e410f to
00f7f71
Compare
tnkuehne
force-pushed
the
feat/google-sheets-template
branch
from
November 23, 2026 09:24
00f7f71 to
72bc4af
Compare
tnkuehne
force-pushed
the
feat/google-sheets-template
branch
from
November 23, 2026 09:33
72bc4af to
26c8ea2
Compare
tnkuehne
force-pushed
the
feat/google-sheets-template
branch
from
November 23, 2026 10:05
26c8ea2 to
0668d85
Compare
tnkuehne
force-pushed
the
feat/google-sheets-template
branch
from
November 23, 2026 10:16
0668d85 to
8f7d340
Compare
The new template offers every method of the Google Sheets API as a typed method with field selections, generated like the Gmail and Calendar templates: cell values, spreadsheets, sheets, formatting and developer metadata. Writing, appending and clearing cells and batchUpdate ask for approval by each user's level; creating a spreadsheet runs at once. Discovery rules can name the scopes to request: every Sheets method also accepts Drive's scopes, and the smallest covering set would have chosen full Drive access. Generated API files may use the provider's field names, such as shape.
The Sheets template calls sheets.googleapis.com, which its network list left out, so every request would have been blocked. A test now checks that each template allows the origins it calls and documents the same list. Discovery rules can require parameters that a description leaves optional: Sheets writes need valueInputOption, which the runtime checks before sending.
tnkuehne
force-pushed
the
feat/google-sheets-template
branch
from
November 23, 2026 10:33
8f7d340 to
ae757f8
Compare
tnkuehne
added a commit
that referenced
this pull request
Nov 23, 2026
#324) ## Why Google Calendar is one of the most requested integrations, and none of the templates covers it yet. Google publishes a Discovery document for it, which the generator from #319 already reads. A calendar template therefore needs only its rules and the template code around the generated API. ## What changes **Google Calendar template** (`templates/google-calendar`) - **Methods:** all 38 methods of the Google Calendar API as typed methods with field selections: events and recurring instances, calendars, the calendar list, sharing (ACL), settings, colors, free/busy times, and push notification channels. None is left out. - **Approvals:** each user's approval level decides when a method asks, as in the other templates. - `eventsInsert` is `send`: it adds the event to its guests' calendars and, with `sendUpdates`, emails them. - Quick-add, imported private copies and new calendars are `create`. - Changing, moving, sharing, clearing and deleting are updates or deletions. - **Scope:** `https://www.googleapis.com/auth/calendar`, which covers every method. An account connected with fewer scopes gets `permission_required`. - **OAuth:** the organization's own Google OAuth client only (`GOOGLE_CLIENT_ID`/`GOOGLE_CLIENT_SECRET`), like Gmail. The scope is sensitive, so a managed client would need Google's verification. - **Results:** `calendar_error` carries Google's message, status and reasons. Rate limits, missing scopes, revoked tokens and responses over 8 MiB are handled as in Gmail. - **Icon:** a plain calendar icon, not Google's logo. - `template.md` describes setup, method names, selections, approvals, results and how to regenerate. **Generator** - **`read` rule:** discovery rules accept `read` for methods that only read through a POST, such as `freebusy.query`. Those methods never ask. **Catalog tests** - **Template list:** the catalog tests compare against the template directories in the repository instead of a fixed list of four, so adding a template doesn't change them. ## Connection page New page, connected state, with the same approval form as the other templates. | 1280 px | 390 px | | --- | --- | | <img src="https://gist.githubusercontent.com/tnkuehne/2e857c8b70cfc0a62168609f2702355e/raw/90e74caf0ea6221c430b0094bd0ff5df4120a8f7/calendar-after-1280.png" width="400"> | <img src="https://gist.githubusercontent.com/tnkuehne/2e857c8b70cfc0a62168609f2702355e/raw/90e74caf0ea6221c430b0094bd0ff5df4120a8f7/calendar-after-390.png" width="200"> | ## Testing - `pnpm check` - **Generator:** a test for the `read` rule. - **Calendar template against a mocked Google:** - typed requests with `fields` URLs and `undefined` arguments left out; - invitations asking as `send`; - quick-add running at once by default and asking at `all_changes`; - `freebusyQuery` never asking; - each approval level; - Google errors, rate limits and missing scopes; - oversized responses; - token refresh, outages and callback checks. - **Type tests:** the README example compiles; unknown fields, missing selections, a missing calendar and wrong choices don't. - **Catalog and template install tests:** pass with the new template. - Not tested against a live Google account. <!-- greptile_comment --> <!-- greptile_summary --> <h2><a href="https://app.greptile.com/api/retrigger?id=116075280&sig=ae468be2d6b8b06c9cb9abfa21e52632275c8828c174e4745950025fe3243aad"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a><a href="https://app.greptile.com/-/switch-tenant?tenant=mendra&next=%2Fwidefleet%2Fwidefleet%2Fpull%2F324&utm_source=greptile_review&utm_medium=github&utm_campaign=view_in_greptile"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img alt="View in Greptile" src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2" align="right"></picture></a>Confidence Score: 5/5 <sup><img alt="Tier: apex" title="Review tier: apex" src="https://greptile-static-assets.s3.amazonaws.com/badges/effort-apex.svg?v=3" height="12"></sup></h2> <!-- greptile-impact-verdict --> The PR appears safe to merge with the required query-argument checks from dependent PR #325. <details open><summary><h3>Summary</h3></summary> Adds a personal Google Calendar template with 38 typed methods, field selections and per-user approvals. - Apps can connect a user's Google account and call typed Calendar methods. - The generator can include read-only methods that use POST. </details> <details open><summary><h3>Diagram</h3></summary> ```mermaid %%{init: {'theme': 'neutral'}}%% flowchart TD A["Calendar method"] --> B["Build request and field selection"] B --> C{"Changes data?"} C -- No --> F["Send with the user's Google token"] C -- Yes --> D{"Approval needed?"} D -- No --> F D -- Yes --> E["Ask the user"] E -- Accepted --> F E -- Declined --> G["Return declined"] F --> H["Return selected data or an error"] ``` </details> <!-- greptile_confidence_score:5 --> <sub>Reviews (15) · Last reviewed commit: ["Add a Google Calendar template generated..."](615a3e6) · [Reviewed by Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub> <!-- /greptile_comment -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Spreadsheets are a common source and target for internal apps, and no template covers Google Sheets yet. Like Calendar, it only needs rules on top of the discovery generator.
What changes
Google Sheets template (
templates/google-sheets)get,createandbatchUpdatefor spreadsheets,valuesGet/valuesUpdate/valuesAppend/valuesClearand their batch and data-filter variants,sheetsCopyTo, and developer metadata. None is left out.batchUpdate, which can change or delete sheets, ask at the default level.valuesAppendcounts as an update: withinsertDataOption: "OVERWRITE", the default, it can overwrite cells below a table.developerMetadataSearchread through a POST and never ask.https://www.googleapis.com/auth/spreadsheets, not Drive. An account connected with fewer scopes getspermission_required.sheets_errorcarries Google's message, status and reasons. Rate limits, missing scopes, revoked tokens and responses over 8 MiB are handled like in the other Google templates.template.mddescribes setup, A1 ranges, selections, approvals, results and how to regenerate.Generator
Scopes in the rules: discovery rules can name the scopes to request. Every Sheets method also accepts Drive's scopes, and on a tie the smallest covering set chose
drive, which is full Drive access. The generator checks that every offered method accepts one of the named scopes.Required parameters: discovery rules can require parameters that a description leaves optional. Sheets requires
valueInputOptionforvaluesUpdateandvaluesAppend, and the runtime rejects a missing required query parameter before sending.Template checks
template.md. It found that the Sheets template left outhttps://sheets.googleapis.com, which is now declared.Lint
api.tsfiles:no-shape-in-symbol-namesis off for them. They must keep the provider's field names, such as Sheets'shape.Connection page
New page, connected state, with the same approval form as the other templates.
Testing
pnpm checkfieldsURLs, encoded ranges andundefinedarguments left out;all_changes;

Confidence Score: 5/5 
The PR appears safe to merge; no new blocking issue was found.Summary
Adds a Google Sheets template with 17 typed methods, personal Google connections and per-user approvals.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A["Typed Sheets method"] --> B["Check arguments and selected fields"] B --> C{"Does this change need approval?"} C -->|Yes| D["Ask or check the user's answer"] D -->|Accepted| E["Load the current user's token"] D -->|Declined| F["Return declined"] C -->|No| E E --> G["Call Google Sheets"] G --> H["Limit response size and return the result"]Reviews (15) · Last reviewed commit: "Allow the Sheets API origin and require ..." · Reviewed by Greptile