M using google drive nodes, and wantlist of perticular folder only but i am getting complete list of files and folder which are on my drive

I am using google drive node, where m filierting out one particular folder, and in that folder want list of files, but m getting all the files and folder which are in my googledrive

getting complete list instead of a particular folder

{

“nodes”: [
{
“parameters”: {},
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [
-500,
-40
],
“id”: “85b0feba-ef51-4779-945c-d5e09d8337d9”,
“name”: “When clicking ‘Test workflow’”
},
{
“parameters”: {
“resource”: “fileFolder”,
“queryString”: “Daily data”,
“returnAll”: true,
“filter”: {},
“options”: {}
},
“type”: “n8n-nodes-base.googleDrive”,
“typeVersion”: 3,
“position”: [
-200,
-40
],
“id”: “b98066a5-e7ae-460c-8057-82518e1e21a6”,
“name”: “Google Drive”,
“credentials”: {
“googleDriveOAuth2Api”: {
“id”: “tPO8EExytJVvW1MW”,
“name”: “Google Drive account”
}
}
},
{
“parameters”: {
“jsCode”: “const today = new Date();\nconst formattedDate = today.toISOString().slice(0, 10);\nconst parentId = ‘1HZUtpeeR7XDjr57Z3b_1BbCKrcfC-6mN’; // ID of "Daily data" folder\nconst query = name='${formattedDate}' and '${parentId}' in parents and mimeType='application/vnd.google-apps.folder';\nreturn { query: query };\n”
},
“type”: “n8n-nodes-base.code”,
“typeVersion”: 2,
“position”: [
20,
-40
],
“id”: “3b4978c5-2478-431a-a501-4043141203dd”,
“name”: “Code”
},
{
“parameters”: {
“resource”: “fileFolder”,
“searchMethod”: “query”,
“queryString”: “={{$json.query}}”,
“returnAll”: true,
“filter”: {},
“options”: {}
},
“type”: “n8n-nodes-base.googleDrive”,
“typeVersion”: 3,
“position”: [
220,
-40
],
“id”: “b995126b-3697-47e4-8ebc-bcaae74138ee”,
“name”: “Google Drive1”,
“credentials”: {
“googleDriveOAuth2Api”: {
“id”: “tPO8EExytJVvW1MW”,
“name”: “Google Drive account”
}
}
},
{
“parameters”: {
“operation”: “list”,
“useQueryString”: “={{ $json.id }}”,
“options”: {}
},
“id”: “69828703-b024-48c2-92a7-4c85644526bb”,
“name”: “Google Drive3”,
“type”: “n8n-nodes-base.googleDrive”,
“typeVersion”: 2,
“position”: [
460,
-140
],
“credentials”: {
“googleDriveOAuth2Api”: {
“id”: “tPO8EExytJVvW1MW”,
“name”: “Google Drive account”
}
}
}
],
“connections”: {
“When clicking ‘Test workflow’”: {
“main”: [
[
{
“node”: “Google Drive”,
“type”: “main”,
“index”: 0
}
]
]
},
“Google Drive”: {
“main”: [
[
{
“node”: “Code”,
“type”: “main”,
“index”: 0
}
]
]
},
“Code”: {
“main”: [
[
{
“node”: “Google Drive1”,
“type”: “main”,
“index”: 0
}
]
]
},
“Google Drive1”: {
“main”: [
[
{
“node”: “Google Drive3”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “56618ac74fc1653fa13a004decd583a5fc421e12ac60e59c391259dc6bd565ce”
}
}

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: version 1
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): DOcker
  • Operating system: Windows

You can either use the Filter / Folder
or the Search Query

1 Like