Goal
Trying to use the Google Drive node to get the list of files / sub-folders in a specified folder.
Workflow Setup
Based on this I set up the Google Drive node with:
- Resource:
File/Folder
, - Operation:
Search
, - Search Method:
Search File/Folder Name
- Search Query:
saved_docs
- The hint on the search query field is
e.g. My File / My Folder
- The hint on the search query field is
Expected Behavior
I was expecting the output to have the list of files in the saved_docs
folder, but I only get the name/id object for the folder itself. Like this:
[
{
"id": "130LJPSOmIBU7wwwc7HtcT5DwsHp7UUiw",
"name": "saved_docs"
}
]
Other (wrong) Guesses
- Also tried Search Query:
'saved_docs' in parents
according to this but that just got an error. - Also tried Search Query:
saved_docs/*
but that gives the same result assaved_docs
(without the wildcard). - Also tried Search Query:
/saved_docs
but that results in “No output data returned”
Is there some kind of wildcard or query syntax required to get the list of files in a specified folder?
Information on your n8n setup
- n8n version: 1.50.0
- Database (default: SQLite): Postgres 16
- n8n EXECUTIONS_PROCESS setting (default: own, main): own, main
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: Docker Host == Raspberry Pi OS