mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 12:44:07 -08: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:
parent
b8608cee6d
commit
3e7a4d3b2c
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue