Skip to content

feat: add include tabs content option for Google Docs get actions#5883

Open
RenzoMXD wants to merge 3 commits intoFlowiseAI:mainfrom
RenzoMXD:feat/add-google-docs-include-tabs-content-5851
Open

feat: add include tabs content option for Google Docs get actions#5883
RenzoMXD wants to merge 3 commits intoFlowiseAI:mainfrom
RenzoMXD:feat/add-google-docs-include-tabs-content-5851

Conversation

@RenzoMXD
Copy link

@RenzoMXD RenzoMXD commented Mar 3, 2026

feat: add include tabs content option for Google Docs get actions

  • Add 'Include Tabs Content' boolean toggle for Get Document and Get Text Content actions
  • Pass includeTabsContent query parameter to Google Docs API when enabled
  • Extract text from all tabs including child tabs in GetTextContentTool

Closes #5851

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant enhancement to the Google Docs integration by providing users with the ability to control whether content from all document tabs is included when retrieving document or text content. This new functionality allows for more comprehensive data extraction from multi-tab Google Docs, improving the flexibility and utility of the Google Docs tools.

Highlights

  • New Option for Google Docs Actions: Added an 'Include Tabs Content' boolean toggle for the 'Get Document' and 'Get Text Content' actions in Google Docs tools.
  • API Parameter Integration: Implemented the passing of the includeTabsContent query parameter to the Google Docs API when the new option is enabled.
  • Comprehensive Text Extraction: Enhanced the GetTextContentTool to recursively extract text from all document tabs, including child tabs, based on the new option.
Changelog
  • packages/components/nodes/tools/GoogleDocs/GoogleDocs.ts
    • Introduced a new includeTabsContent boolean input parameter for the getDocument and getTextContent actions, allowing users to specify whether to retrieve content from all tabs.
    • Ensured the includeTabsContent parameter is correctly passed from nodeData to nodeInputs.
  • packages/components/nodes/tools/GoogleDocs/core.ts
    • Modified GetDocumentTool to append ?includeTabsContent=true to the API endpoint when the includeTabsContent parameter is enabled, requesting all tab content from the Google Docs API.
    • Modified GetTextContentTool to similarly append ?includeTabsContent=true to the API endpoint.
    • Refactored GetTextContentTool's text extraction logic to include a recursive function (extractFromTabs) that iterates through all document tabs and their child tabs, extracting text content from each, if includeTabsContent is true. Otherwise, it defaults to extracting from the main document body.
Activity
  • No human activity has occurred on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new 'Include Tabs Content' option for the 'Get Document' and 'Get Text Content' actions in the Google Docs tool. The implementation is well-structured, adding the new UI parameter and correctly passing it to the Google Docs API. The logic to handle the new API response structure with tabs is also sound. I've included a couple of suggestions to improve how the API query parameters are constructed, which will make the code more robust and easier to maintain for future enhancements.

Comment on lines +287 to +290
let endpoint = `documents/${encodeURIComponent(params.documentId)}`
if (params.includeTabsContent) {
endpoint += '?includeTabsContent=true'
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve maintainability and make the code more robust for handling potential future query parameters, I suggest using URLSearchParams to build the query string. This approach avoids manual string concatenation and correctly handles the ? separator.

Suggested change
let endpoint = `documents/${encodeURIComponent(params.documentId)}`
if (params.includeTabsContent) {
endpoint += '?includeTabsContent=true'
}
const queryParams = new URLSearchParams()
if (params.includeTabsContent) {
queryParams.set('includeTabsContent', 'true')
}
const endpoint = `documents/${encodeURIComponent(params.documentId)}` + (queryParams.size > 0 ? `?${queryParams.toString()}` : '')

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed 26530ae

Comment on lines +568 to +571
let endpoint = `documents/${encodeURIComponent(params.documentId)}`
if (params.includeTabsContent) {
endpoint += '?includeTabsContent=true'
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve maintainability and make the code more robust for handling potential future query parameters, I suggest using URLSearchParams to build the query string. This approach avoids manual string concatenation and correctly handles the ? separator.

Suggested change
let endpoint = `documents/${encodeURIComponent(params.documentId)}`
if (params.includeTabsContent) {
endpoint += '?includeTabsContent=true'
}
const queryParams = new URLSearchParams()
if (params.includeTabsContent) {
queryParams.set('includeTabsContent', 'true')
}
const endpoint = `documents/${encodeURIComponent(params.documentId)}` + (queryParams.size > 0 ? `?${queryParams.toString()}` : '')

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed 26530ae

@HenryHengZJ
Copy link
Contributor

thank you! do you have a screenshot or recordings?

@RenzoMXD
Copy link
Author

RenzoMXD commented Mar 6, 2026

thank you! do you have a screenshot or recordings?

Is this screen enough?

Screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Google Docs: Include tabs content

2 participants