Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
key: "google_drive-create-file-from-template",
name: "Create New File From Template",
description: "Create a new Google Docs file from a template. Optionally include placeholders in the template document that will get replaced from this action. [See documentation](https://www.npmjs.com/package/google-docs-mustaches)",
version: "0.1.17",
version: "0.1.18",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand All @@ -23,6 +23,7 @@ export default {
googleDrive,
"watchedDrive",
],
label: "Drive Containing Template",
optional: true,
},
templateId: {
Expand All @@ -36,12 +37,20 @@ export default {
description:
"Select the template document you'd like to use as the template, or use a custom expression to reference a document ID from a previous step. Template documents should contain placeholders in the format `{{xyz}}`.",
},
destinationDrive: {
propDefinition: [
googleDrive,
"watchedDrive",
],
label: "Destination Drive",
optional: true,
},
folderId: {
propDefinition: [
googleDrive,
"folderId",
(c) => ({
drive: c.drive,
drive: c.destinationDrive,
}),
],
description:
Expand Down Expand Up @@ -79,7 +88,7 @@ export default {
mode: this.mode,
};

const isSharedDrive = this.drive && this.drive !== "My Drive";
const isSharedDrive = this.destinationDrive && this.destinationDrive !== "My Drive";

const client = new Mustaches.default({
token: () => this.googleDrive.$auth.oauth_access_token,
Expand Down Expand Up @@ -147,7 +156,7 @@ export default {
await this.googleDrive.updateFile(googleDocId, {
fields: "*",
removeParents: file.parents.join(","),
addParents: this.folderId || this.drive,
addParents: this.folderId || this.destinationDrive,
supportsAllDrives: true,
});
}
Expand All @@ -157,7 +166,7 @@ export default {
await this.googleDrive.updateFile(pdfId, {
fields: "*",
removeParents: pdf.parents.join(","),
addParents: this.folderId || this.drive,
addParents: this.folderId || this.destinationDrive,
supportsAllDrives: true,
});
}
Expand Down
2 changes: 1 addition & 1 deletion components/google_drive/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/google_drive",
"version": "1.4.0",
"version": "1.4.1",
"description": "Pipedream Google_drive Components",
"main": "google_drive.app.mjs",
"keywords": [
Expand Down
Loading