mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
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:
@@ -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();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user