#5063·Flowise

Google Drive Loader: Include Subfolders ON = Bad Request

Author: CaptainValorCreated Aug 13, 2025Updated Jul 30, 2026
Labelsbug

Describe the bug

The Google Drive document loader node works correctly when loading files from a single, specified folder. However, when the "Include Subfolders" option is toggled on, the node fails to load or preview documents. It throws a Failed to list files: Bad Request error, indicating the API request sent to Google is malformed when attempting to search recursively.

The issue is independent of the "File Types" configuration, as the error persists even with valid file types selected. The error only occurs when recursive searching is enabled.

To Reproduce

  1. In Google Drive, create a parent folder and place a document inside it.
  2. Inside the parent folder, create a subfolder and place another document inside it.
  3. In Flowise, create a new chatflow.
  4. Add a Google Drive document loader node.
  5. Configure the node with valid Google API credentials.
  6. Set the "Folder ID" to the ID of the parent folder created in step 1.
  7. Leave "Include Subfolders" turned off. Click "Preview Chunks". Observe that it successfully loads the document from the parent folder.
  8. Now, turn on the "Include Subfolders" option.
  9. Click "Preview Chunks" again.
  10. Observe the error: Failed to list files: Bad Request

Expected behavior

When "Include Subfolders" is enabled, the Google Drive loader should successfully list and load all documents from both the specified parent folder and all of its subfolders without throwing a "Bad Request" error.

Screenshots

Flow

No response

Use Method

Docker

Flowise Version

3.0.5

Operating System

Linux

Browser

Chrome

Additional context

The credentials used are confirmed to be working, as the loader functions correctly when "Include Subfolders" is disabled. The issue seems to be specifically with how the node constructs the recursive file search query for the Google Drive API.