Repository navigation
feat(google_docs): new Google Docs tool plugin with OAuth and Each user signs in (1.0.0) - #4183
Closed
ForeignKeyCN wants to merge 1 commit into
Closed
ForeignKeyCN wants to merge 1 commit into
ForeignKeyCN wants to merge 1 commit into
Conversation
…er signs in (1.0.0)
3 of 5 tasks
Contributor
Author
|
Moved into #4186 together with the other change. |
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 Docs tool plugin (
tools/google_docs). It reads, creates and edits documents from workflows and agents. Content goes in and comes out as Markdown, so an agent can write a formatted document and read it back. It is built like the other Google plugins: Calendar (#4173), Gmail (#4180), Drive (#4181) and Sheets (#4182).Auth
GET /google_docs/callback) that only stores the one-time code.?start=<id>), which redirects to Google. Agents retype links, and a long randomstatedoes not always survive that.client_id | Dify user ID, and never appear in tool output.invalid_grantor a 401 leads to a new sign-in.google_docs_sign_outforgets the sign-in.documents: read and write documents.drive.metadata.readonly: only to find documents by name.Tools (prefixed
google_docs_: the new Agent rejects duplicate tool names across plugins)google_docs_find_documentsgoogle_docs_get_documentgoogle_docs_create_documentgoogle_docs_append_contentgoogle_docs_replace_textgoogle_docs_insert_tableMarkdown written:
#/##/###headings;-/*bullets and1.numbered lists;**bold**,*italic*and[text](https://link).Everything else becomes normal paragraphs.
Writing: one
batchUpdateper call. The inserted text is reset to normal style first, so it doesn't inherit the style around it.Tables: cells are filled bottom-up, so earlier indexes stay valid (limit 2000 cells).
Document IDs: tools accept an ID or a URL.
Output variables: every tool returns typed output variables (
success/errorplus its fields).Release Notes
Change Type
Screenshots / Videos
None yet; the README describes the setup and what users see.
Testing
pytest tests). They cover:google_docs_sign_outand OAuth mode (unit tests only).Checklist