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
This commit is contained in:
Elias Meire 2023-10-06 19:59:33 +02:00 committed by GitHub
parent b8608cee6d
commit 3e7a4d3b2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,8 +12,8 @@ import { NodeApiError } from 'n8n-workflow';
import { extractId, googleApiRequest, googleApiRequestAllItems } from './v1/GenericFunctions'; import { extractId, googleApiRequest, googleApiRequestAllItems } from './v1/GenericFunctions';
import moment from 'moment'; import moment from 'moment';
import { fileSearch, folderSearch } from './v1/SearchFunctions';
import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../constants'; 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 { export class GoogleDriveTrigger implements INodeType {
description: INodeTypeDescription = { description: INodeTypeDescription = {
@ -429,7 +429,12 @@ export class GoogleDriveTrigger implements INodeType {
const event = this.getNodeParameter('event') as string; const event = this.getNodeParameter('event') as string;
const webhookData = this.getWorkflowStaticData('node'); const webhookData = this.getWorkflowStaticData('node');
const options = this.getNodeParameter('options', {}) as IDataObject; 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(); const now = moment().utc().format();