Google Drive plugin does not search across all drive types (My Drive, Shared Drives, “Shared with me”) #306

Closed
opened 2026-02-16 10:18:55 -05:00 by yindo · 6 comments
Owner

Originally created by @bolinzzz on GitHub (May 22, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues Dify issues & Dify Official Plugins, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.4.0

Plugin version

0.0.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Issue:

The current implementation of the Google Drive plugin does not search all available drive types. Specifically, files and folders from Shared Drives and the "Shared with me" section are not included in search results, even when supportsAllDrives=True is specified.

Steps to Reproduce:

  1. Create a Google Cloud service account with access to the Google Drive API.
  2. Create a Shared Drive and grant the service account access.
  3. Generate a key for the service account and download the credentials.json file.

Example Code (based on plugin behavior):

import google.oauth2.credentials
from googleapiclient.discovery import build

# Load credentials
credentials = google.oauth2.credentials.Credentials.from_service_account_file(
    "credentials.json"
)

# Initialize the Drive API service
drive_service = build("drive", "v3", credentials=credentials)

# Search files (taken from plugin source code)
result = drive_service.files().list(
    q="trashed = false",
    spaces='drive',
    fields='files(id, name, mimeType, parents)',
    supportsAllDrives=True
).execute()

Expected Result:

Files from My Drive, Shared Drives, and “Shared with me” should be included in the results.

Actual Result:

result only includes files from My Drive. Shared Drive files are not returned, even with supportsAllDrives=True.

Request for Help:

I’d like to submit a PR to address this issue, but I’m having trouble locating the source code for the Google Drive and Google Sheets plugins within the repository.

Could someone please point me to the relevant directory or files?

Thank you!

✔️ Error log

No response

Originally created by @bolinzzz on GitHub (May 22, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.4.0 ### Plugin version 0.0.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ### Issue: The current implementation of the Google Drive plugin does not search all available drive types. Specifically, files and folders from **Shared Drives** and the **"Shared with me"** section are not included in search results, even when `supportsAllDrives=True` is specified. ### Steps to Reproduce: 1. Create a Google Cloud service account with access to the Google Drive API. 2. Create a Shared Drive and grant the service account access. 3. Generate a key for the service account and download the `credentials.json` file. ### Example Code (based on plugin behavior): ```python import google.oauth2.credentials from googleapiclient.discovery import build # Load credentials credentials = google.oauth2.credentials.Credentials.from_service_account_file( "credentials.json" ) # Initialize the Drive API service drive_service = build("drive", "v3", credentials=credentials) # Search files (taken from plugin source code) result = drive_service.files().list( q="trashed = false", spaces='drive', fields='files(id, name, mimeType, parents)', supportsAllDrives=True ).execute() ``` ### Expected Result: Files from My Drive, Shared Drives, and “Shared with me” should be included in the results. ### Actual Result: result only includes files from My Drive. Shared Drive files are not returned, even with supportsAllDrives=True. # Request for Help: I’d like to submit a PR to address this issue, but I’m having trouble locating the source code for the **Google Drive** and **Google Sheets** plugins within the repository. Could someone please point me to the relevant directory or files? Thank you! ### ✔️ Error log _No response_
yindo added the bug label 2026-02-16 10:18:55 -05:00
yindo closed this issue 2026-02-16 10:18:55 -05:00
Author
Owner

@bolinzzz commented on GitHub (May 22, 2025):

Doc from the marketplace: https://marketplace.dify.ai/plugins/yoshiki-0428/google_drive?theme=system

@bolinzzz commented on GitHub (May 22, 2025): Doc from the marketplace: https://marketplace.dify.ai/plugins/yoshiki-0428/google_drive?theme=system
Author
Owner

@bolinzzz commented on GitHub (May 22, 2025):

The function signature should be structured as follows to ensure all drive types are included:

result = drive_service.files().list(
    q="trashed = false",
    corpora="allDrives",
    includeItemsFromAllDrives=True,
    supportsAllDrives=True,
    fields="nextPageToken, files(id, name, parents, driveId)"
).execute()
@bolinzzz commented on GitHub (May 22, 2025): The function signature should be structured as follows to ensure all drive types are included: ```python result = drive_service.files().list( q="trashed = false", corpora="allDrives", includeItemsFromAllDrives=True, supportsAllDrives=True, fields="nextPageToken, files(id, name, parents, driveId)" ).execute() ```
Author
Owner

@moxgeek commented on GitHub (Aug 8, 2025):

@yoshiki-0428, any updates please ?

@moxgeek commented on GitHub (Aug 8, 2025): @yoshiki-0428, any updates please ?
Author
Owner

@dosubot[bot] commented on GitHub (Aug 24, 2025):

Hi, @bolinzzz. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that the Google Drive plugin version 1.4.0 only returns files from "My Drive" despite using supportsAllDrives=True.
  • You provided documentation and a recommended function signature to enable searching across all drives using corpora="allDrives" and related parameters.
  • Another user requested an update from the maintainer, but there has been no response or resolution yet.
  • The issue remains unresolved, with users expecting full drive coverage in search results.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here.
  • If I do not hear back within 5 days, I will automatically close this issue.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 24, 2025): Hi, @bolinzzz. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that the Google Drive plugin version 1.4.0 only returns files from "My Drive" despite using supportsAllDrives=True. - You provided documentation and a recommended function signature to enable searching across all drives using corpora="allDrives" and related parameters. - Another user requested an update from the maintainer, but there has been no response or resolution yet. - The issue remains unresolved, with users expecting full drive coverage in search results. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here. - If I do not hear back within 5 days, I will automatically close this issue. Thank you for your understanding and contribution!
Author
Owner

@moxgeek commented on GitHub (Aug 25, 2025):

Hi, @bolinzzz. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that the Google Drive plugin version 1.4.0 only returns files from "My Drive" despite using supportsAllDrives=True.
  • You provided documentation and a recommended function signature to enable searching across all drives using corpora="allDrives" and related parameters.
  • Another user requested an update from the maintainer, but there has been no response or resolution yet.
  • The issue remains unresolved, with users expecting full drive coverage in search results.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here.
  • If I do not hear back within 5 days, I will automatically close this issue.

Thank you for your understanding and contribution!

yes, the issue need to stay open.

@moxgeek commented on GitHub (Aug 25, 2025): > Hi, [@bolinzzz](https://github.com/bolinzzz). I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. > > **Issue Summary:** > > * You reported that the Google Drive plugin version 1.4.0 only returns files from "My Drive" despite using supportsAllDrives=True. > * You provided documentation and a recommended function signature to enable searching across all drives using corpora="allDrives" and related parameters. > * Another user requested an update from the maintainer, but there has been no response or resolution yet. > * The issue remains unresolved, with users expecting full drive coverage in search results. > > **Next Steps:** > > * Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here. > * If I do not hear back within 5 days, I will automatically close this issue. > > Thank you for your understanding and contribution! yes, the issue need to stay open.
Author
Owner

@dosubot[bot] commented on GitHub (Aug 25, 2025):

@crazywoola The user has confirmed that the issue with the Google Drive plugin not returning files beyond "My Drive" despite supportsAllDrives=True is still relevant and needs attention. Could you please assist with this?

@dosubot[bot] commented on GitHub (Aug 25, 2025): @crazywoola The user has confirmed that the issue with the Google Drive plugin not returning files beyond "My Drive" despite supportsAllDrives=True is still relevant and needs attention. Could you please assist with this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#306