Repository navigation
feat(google_sheets): new Google Sheets tool plugin with OAuth and Each user signs in (1.0.0) - #4182
Merged
Conversation
…h user signs in (1.0.0)
The agent retypes the sign-in link in its reply, and a long random state does not always survive that: in a real chat one character changed case, so the callback endpoint could not recognize the sign-in. The tool now returns <sign-in endpoint>?start=<12 lowercase characters without look-alikes>, and the endpoint redirects to the sign-in page it stored. The state and PKCE values go to the provider and back without passing through the agent.
This was referenced Nov 2, 2026
Closed
crazywoola
approved these changes
Nov 2, 2026
This branch was successfully deployed
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.
Summary
A new Google Sheets tool plugin (
tools/google_sheets). It reads and writes spreadsheets from workflows and agents. Rows are handled as records keyed by the header row (the way agents and workflows think); cells can also be read and written as raw A1 ranges. It is built like the other Google plugins: Calendar (#4173), Gmail (#4180) and Drive (#4181).Auth
GET /google_sheets/callback) that only stores the one-time code.client_id | Dify user ID, and never appear in tool output.invalid_grantor a 401 leads to a new sign-in.google_sheets_sign_outforgets the sign-in.spreadsheets: read and write.drive.metadata.readonly: only to find spreadsheets by name. File contents are not read.Tools (prefixed
google_sheets_: the new Agent rejects duplicate tool names across plugins)google_sheets_find_spreadsheets(by name, newest first, across shared drives),google_sheets_get_spreadsheet(title, link, sheets with sizes),google_sheets_create_spreadsheet(sheet names and a header row)google_sheets_read_rows: objects keyed by the header row, withrow_number; optional column = value filter; blank rows skippedgoogle_sheets_append_rows: maps keys to the header order; an empty sheet gets the keys as its headergoogle_sheets_update_rows: matches onkey_columnand changes only the given columns.update_all_matchesupdates every match. Never appends; unmatched keys are reportedgoogle_sheets_upsert_rows: updates matches and appends the restgoogle_sheets_delete_rows: by row number or column = value, deleted bottom-upgoogle_sheets_read_range(formatted, raw or formulas),google_sheets_write_range(a JSON grid),google_sheets_clear_range(formatting kept)google_sheets_add_sheet,google_sheets_rename_sheet,google_sheets_delete_sheetadd_missing_columnsadds them to the header row.USER_ENTERED, so numbers, dates and=formulasbehave as in the UI.'Q2 ''final'''), and spreadsheet IDs and ranges are encoded as path segments.success/errorplus its fields).Release Notes
Change Type
Screenshots / Videos
The README includes a chat in which the agent, as the signed-in user:
Testing
pytest tests). They cover:Checklist