From 3e7a4d3b2cc12fcb1b011fccd0773bb807986884 Mon Sep 17 00:00:00 2001 From: Elias Meire Date: Fri, 6 Oct 2023 19:59:33 +0200 Subject: [PATCH] fix(Google Drive Trigger Node): Add Shared Drives support (#7369) Github issue / Community forum post (link here to close automatically): https://community.n8n.io/t/google-drive-node-cant-access-google-shared-drives/8760 --- .../nodes/Google/Drive/GoogleDriveTrigger.node.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/nodes-base/nodes/Google/Drive/GoogleDriveTrigger.node.ts b/packages/nodes-base/nodes/Google/Drive/GoogleDriveTrigger.node.ts index 37e820cfc5690..17835dbc0c127 100644 --- a/packages/nodes-base/nodes/Google/Drive/GoogleDriveTrigger.node.ts +++ b/packages/nodes-base/nodes/Google/Drive/GoogleDriveTrigger.node.ts @@ -12,8 +12,8 @@ import { NodeApiError } from 'n8n-workflow'; import { extractId, googleApiRequest, googleApiRequestAllItems } from './v1/GenericFunctions'; import moment from 'moment'; -import { fileSearch, folderSearch } from './v1/SearchFunctions'; import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../constants'; +import { fileSearch, folderSearch } from './v2/methods/listSearch'; export class GoogleDriveTrigger implements INodeType { description: INodeTypeDescription = { @@ -429,7 +429,12 @@ export class GoogleDriveTrigger implements INodeType { const event = this.getNodeParameter('event') as string; const webhookData = this.getWorkflowStaticData('node'); const options = this.getNodeParameter('options', {}) as IDataObject; - const qs: IDataObject = {}; + const qs: IDataObject = { + includeItemsFromAllDrives: true, + supportsAllDrives: true, + spaces: 'appDataFolder, drive', + corpora: 'allDrives', + }; const now = moment().utc().format();