feat(google-drive): list shared drives for updated files trigger

This commit is contained in:
Rıdvan Akca
2023-04-06 18:39:22 +03:00
parent 14ba50f061
commit 4296a3b5df
4 changed files with 22 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ export default defineTrigger({
type: 'dropdown' as const,
required: false,
description:
'The drive to use. If nothing is selected, then your personal Google Drive will be used.',
'The Google Drive where your file resides. If nothing is selected, then your personal Google Drive will be used.',
variables: false,
source: {
type: 'query',

View File

@@ -4,9 +4,9 @@ const newFiles = async ($: IGlobalVariable) => {
const params = {
pageToken: undefined as unknown as string,
orderBy: 'createdTime desc',
q: `mimeType!='application/vnd.google-apps.folder'`,
fields: '*',
pageSize: 1000,
q: `mimeType!='application/vnd.google-apps.folder'`,
driveId: $.step.parameters.driveId,
};

View File

@@ -8,6 +8,25 @@ export default defineTrigger({
description:
'Triggers when a file is updated in a specific folder (but not its subfolder).',
arguments: [
{
label: 'Drive',
key: 'driveId',
type: 'dropdown' as const,
required: false,
description:
'The Google Drive where your file resides. If nothing is selected, then your personal Google Drive will be used.',
variables: false,
source: {
type: 'query',
name: 'getDynamicData',
arguments: [
{
name: 'key',
value: 'listDrives',
},
],
},
},
{
label: 'Folder',
key: 'folderId',

View File

@@ -18,6 +18,7 @@ const updatedFiles = async ($: IGlobalVariable) => {
fields: '*',
pageSize: 1000,
q,
driveId: $.step.parameters.driveId,
};
do {