Skip to content

Commit 20c4e2b

Browse files
[Google Drive] fix create folder action (#14269)
* search for user corpora with parentId in query * bump versions
1 parent 6f3b71c commit 20c4e2b

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

components/google_drive/actions/create-folder/create-folder.mjs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313
key: "google_drive-create-folder",
1414
name: "Create Folder",
1515
description: "Create a new empty folder. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/create) for more information",
16-
version: "0.1.7",
16+
version: "0.1.8",
1717
type: "action",
1818
props: {
1919
googleDrive,
@@ -78,9 +78,17 @@ export default {
7878
} else {
7979
q += ` and '${driveId}' in parents`;
8080
}
81-
const folders = (await this.googleDrive.listFilesInPage(null, getListFilesOpts(drive, {
81+
82+
const opts = getListFilesOpts(driveId, {
83+
// Used for querying 'shared with me' folders that the user does not have direct access to
84+
// within a shared drive (e.g., when the user can't select the driveId of the shared drive).
85+
corpora: "user",
86+
includeItemsFromAllDrives: true,
87+
supportsAllDrives: true,
8288
q,
83-
}))).files;
89+
});
90+
91+
const folders = (await this.googleDrive.listFilesInPage(null, opts)).files;
8492

8593
if (folders.length) {
8694
$.export("$summary", "Found existing folder, therefore not creating folder. Returning found folder.");

components/google_drive/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/google_drive",
3-
"version": "0.8.5",
3+
"version": "0.8.6",
44
"description": "Pipedream Google_drive Components",
55
"main": "google_drive.app.mjs",
66
"keywords": [

0 commit comments

Comments
 (0)