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
43 changes: 43 additions & 0 deletions components/google_drive/actions/add-comment/add-comment.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import googleDrive from "../../google_drive.app.mjs";

export default {
key: "google_drive-add-comment",
name: "Add Comment",
description: "Add an unanchored comment to a Google Doc (general feedback, no text highlighting). [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/comments/create)",
version: "0.0.1",
type: "action",
props: {
googleDrive,
drive: {
propDefinition: [
googleDrive,
"watchedDrive",
],
optional: false,
},
fileId: {
propDefinition: [
googleDrive,
"fileId",
(c) => ({
drive: c.drive,
}),
],
description: "The file to add a comment to.",
},
content: {
type: "string",
label: "Comment Content",
description: "The text content of the comment to add",
},
},
async run({ $ }) {
const response = await this.googleDrive.createComment(
this.content,
this.fileId,
);

$.export("$summary", `Successfully added comment with ID ${response.data.id}`);
return response.data;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
name: "Share File or Folder",
description:
"Add a [sharing permission](https://support.google.com/drive/answer/7166529) to the sharing preferences of a file or folder and provide a sharing URL. [See the documentation](https://developers.google.com/drive/api/v3/reference/permissions/create)",
version: "0.2.4",
version: "0.2.5",
type: "action",
props: {
googleDrive,
Expand Down
2 changes: 1 addition & 1 deletion components/google_drive/actions/copy-file/copy-file.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "google_drive-copy-file",
name: "Copy File",
description: "Create a copy of the specified file. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/copy) for more information",
version: "0.1.11",
version: "0.1.12",
type: "action",
props: {
googleDrive,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import googleDrive from "../../google_drive.app.mjs";
import Mustaches from "google-docs-mustaches";
import googleDrive from "../../google_drive.app.mjs";

const MODE_GOOGLE_DOC = "Google Doc";
const MODE_PDF = "Pdf";
Expand All @@ -8,7 +8,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.11",
version: "0.1.12",
type: "action",
props: {
googleDrive,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import googleDrive from "../../google_drive.app.mjs";
import { Readable } from "stream";
import googleDrive from "../../google_drive.app.mjs";

export default {
key: "google_drive-create-file-from-text",
name: "Create New File From Text",
description: "Create a new file from plain text. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/create) for more information",
version: "0.2.4",
version: "0.2.5",
type: "action",
props: {
googleDrive,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
key: "google_drive-create-folder",
name: "Create Folder",
description: "Create a new empty folder. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/create) for more information",
version: "0.1.12",
version: "0.1.13",
type: "action",
props: {
googleDrive,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "google_drive-create-shared-drive",
name: "Create Shared Drive",
description: "Create a new shared drive. [See the documentation](https://developers.google.com/drive/api/v3/reference/drives/create) for more information",
version: "0.1.12",
version: "0.1.13",
type: "action",
props: {
googleDrive,
Expand Down
47 changes: 47 additions & 0 deletions components/google_drive/actions/delete-comment/delete-comment.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import googleDrive from "../../google_drive.app.mjs";

export default {
key: "google_drive-delete-comment",
name: "Delete Comment",
description: "Delete a specific comment (Requires ownership or permissions). [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/comments/delete)",
version: "0.0.1",
type: "action",
props: {
googleDrive,
drive: {
propDefinition: [
googleDrive,
"watchedDrive",
],
optional: false,
},
fileId: {
propDefinition: [
googleDrive,
"fileId",
(c) => ({
drive: c.drive,
}),
],
description: "The file containing the comment to delete.",
},
commentId: {
propDefinition: [
googleDrive,
"commentId",
(c) => ({
fileId: c.fileId,
}),
],
},
},
async run({ $ }) {
const response = await this.googleDrive.deleteComment(
this.commentId,
this.fileId,
);

$.export("$summary", `Successfully deleted comment ${this.commentId} from file ${this.fileId}`);
return response.data;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
name: "Delete File",
description:
"Permanently delete a file or folder without moving it to the trash. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/delete) for more information",
version: "0.1.12",
version: "0.1.13",
type: "action",
props: {
googleDrive,
infoAlert: {

Check warning on line 12 in components/google_drive/actions/delete-file/delete-file.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop infoAlert must have a description. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 12 in components/google_drive/actions/delete-file/delete-file.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop infoAlert must have a label. See https://pipedream.com/docs/components/guidelines/#props
type: "alert",
alertType: "warning",
content: "This action will **permanently** delete a file. If you want to move it to the trash instead, use the **[Move File to Trash](https://pipedream.com/apps/google-drive/actions/move-file-to-trash)** action.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "google_drive-delete-shared-drive",
name: "Delete Shared Drive",
description: "Delete a shared drive without any content. [See the documentation](https://developers.google.com/drive/api/v3/reference/drives/delete) for more information",
version: "0.1.11",
version: "0.1.12",
type: "action",
props: {
googleDrive,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
key: "google_drive-download-file",
name: "Download File",
description: "Download a file. [See the documentation](https://developers.google.com/drive/api/v3/manage-downloads) for more information",
version: "0.1.14",
version: "0.1.15",
type: "action",
props: {
googleDrive,
Expand Down
2 changes: 1 addition & 1 deletion components/google_drive/actions/find-file/find-file.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "google_drive-find-file",
name: "Find File",
description: "Search for a specific file by name. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
version: "0.1.11",
version: "0.1.12",
type: "action",
props: {
googleDrive,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
key: "google_drive-find-folder",
name: "Find Folder",
description: "Search for a specific folder by name. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
version: "0.1.11",
version: "0.1.12",
type: "action",
props: {
googleDrive,
Expand Down
2 changes: 1 addition & 1 deletion components/google_drive/actions/find-forms/find-forms.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
key: "google_drive-find-forms",
name: "Find Forms",
description: "List Google Form documents or search for a Form by name. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
version: "0.0.12",
version: "0.0.13",
type: "action",
props: {
googleDrive,
Expand All @@ -29,13 +29,13 @@
description: "The ID of the parent folder which contains the file. If not specified, it will list files from the drive's top-level folder.",
optional: true,
},
queryAlert: {

Check warning on line 32 in components/google_drive/actions/find-forms/find-forms.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop queryAlert must have a description. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 32 in components/google_drive/actions/find-forms/find-forms.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop queryAlert must have a label. See https://pipedream.com/docs/components/guidelines/#props
type: "alert",
alertType: "info",
content: "If no query or search name is specified, all forms in the selected drive/folder will be returned.",
},
...commonSearchQuery.props,
searchQuery: {

Check warning on line 38 in components/google_drive/actions/find-forms/find-forms.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop searchQuery must have a label. See https://pipedream.com/docs/components/guidelines/#props
...commonSearchQuery.props.searchQuery,
description:
"Search for a file with a query. [See the documentation](https://developers.google.com/drive/api/guides/ref-search-terms) for more information. If specified, `Search Name` and `Parent Folder` will be ignored.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
key: "google_drive-find-spreadsheets",
name: "Find Spreadsheets",
description: "Search for a specific spreadsheet by name. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
version: "0.1.11",
version: "0.1.12",
type: "action",
props: {
googleDrive,
Expand All @@ -29,13 +29,13 @@
description: "The ID of the parent folder which contains the file. If not specified, it will list files from the drive's top-level folder.",
optional: true,
},
queryAlert: {

Check warning on line 32 in components/google_drive/actions/find-spreadsheets/find-spreadsheets.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop queryAlert must have a description. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 32 in components/google_drive/actions/find-spreadsheets/find-spreadsheets.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop queryAlert must have a label. See https://pipedream.com/docs/components/guidelines/#props
type: "alert",
alertType: "info",
content: "If no query or search name is specified, all spreadsheets in the selected drive/folder will be returned.",
},
...commonSearchQuery.props,
searchQuery: {

Check warning on line 38 in components/google_drive/actions/find-spreadsheets/find-spreadsheets.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop searchQuery must have a label. See https://pipedream.com/docs/components/guidelines/#props
...commonSearchQuery.props.searchQuery,
description:
"Search for a file with a query. [See the documentation](https://developers.google.com/drive/api/guides/ref-search-terms) for more information. If specified, `Search Name` and `Parent Folder` will be ignored.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
key: "google_drive-get-file-by-id",
name: "Get File By ID",
description: "Get info on a specific file. [See the documentation](https://developers.google.com/drive/api/reference/rest/v3/files/get) for more information",
version: "0.0.8",
version: "0.0.9",
type: "action",
props: {
googleDrive,
Expand All @@ -16,7 +16,7 @@
],
optional: true,
},
fileIdTip: {

Check warning on line 19 in components/google_drive/actions/get-file-by-id/get-file-by-id.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop fileIdTip must have a description. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 19 in components/google_drive/actions/get-file-by-id/get-file-by-id.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop fileIdTip must have a label. See https://pipedream.com/docs/components/guidelines/#props
type: "alert",
alertType: "info",
content: "You can use actions such as **Find File** or **List Files** to obtain a file ID, and use its value here.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
key: "google_drive-get-folder-id-for-path",
name: "Get Folder ID for a Path",
description: "Retrieve a folderId for a path. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
version: "0.1.13",
version: "0.1.14",
type: "action",
props: {
googleDrive,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "google_drive-get-shared-drive",
name: "Get Shared Drive",
description: "Get metadata for one or all shared drives. [See the documentation](https://developers.google.com/drive/api/v3/reference/drives/get) for more information",
version: "0.1.11",
version: "0.1.12",
type: "action",
props: {
googleDrive,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "google_drive-list-access-proposals",
name: "List Access Proposals",
description: "List access proposals for a file or folder. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/accessproposals/list)",
version: "0.0.4",
version: "0.0.5",
type: "action",
props: {
googleDrive,
Expand Down
38 changes: 38 additions & 0 deletions components/google_drive/actions/list-comments/list-comments.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import googleDrive from "../../google_drive.app.mjs";

export default {
key: "google_drive-list-comments",
name: "List Comments",
description: "List all comments on a file. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/comments/list)",
version: "0.0.1",
type: "action",
props: {
googleDrive,
drive: {
propDefinition: [
googleDrive,
"watchedDrive",
],
optional: false,
},
fileId: {
propDefinition: [
googleDrive,
"fileId",
(c) => ({
drive: c.drive,
}),
],
description: "The file to list comments for.",
},
},
async run({ $ }) {
const response = await this.googleDrive.listSyncComments(
this.driveId,
this.fileId,
);

$.export("$summary", `Successfully found ${response.data.comments.length} comment(s) for file ${this.fileId}`);
return response.data.comments;
},
};
2 changes: 1 addition & 1 deletion components/google_drive/actions/list-files/list-files.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "google_drive-list-files",
name: "List Files",
description: "List files from a specific folder. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/list) for more information",
version: "0.1.15",
version: "0.1.16",
type: "action",
props: {
googleDrive,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "google_drive-move-file-to-trash",
name: "Move File to Trash",
description: "Move a file or folder to trash. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/update) for more information",
version: "0.1.11",
version: "0.1.12",
type: "action",
props: {
googleDrive,
Expand Down
2 changes: 1 addition & 1 deletion components/google_drive/actions/move-file/move-file.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "google_drive-move-file",
name: "Move File",
description: "Move a file from one folder to another. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/update) for more information",
version: "0.1.11",
version: "0.1.12",
type: "action",
props: {
googleDrive,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import googleDrive from "../../google_drive.app.mjs";

export default {
key: "google_drive-reply-to-comment",
name: "Reply to Comment",
description: "Add a reply to an existing comment. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/replies/create)",
version: "0.0.1",
type: "action",
props: {
googleDrive,
drive: {
propDefinition: [
googleDrive,
"watchedDrive",
],
optional: false,
},
fileId: {
propDefinition: [
googleDrive,
"fileId",
(c) => ({
drive: c.drive,
}),
],
description: "The file containing the comment to reply to.",
},
commentId: {
propDefinition: [
googleDrive,
"commentId",
(c) => ({
fileId: c.fileId,
}),
],
description: "The ID of the comment to reply to.",
},
content: {
type: "string",
label: "Reply Content",
description: "The text content of the reply to add",
},
},
async run({ $ }) {
const response = await this.googleDrive.createCommentReply(
this.fileId,
this.commentId,
{
content: this.content,
},
);

$.export("$summary", `Successfully added reply to comment ${this.commentId}`);
return response.data;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "google_drive-resolve-access-proposal",
name: "Resolve Access Proposals",
description: "Accept or deny a request for access to a file or folder in Google Drive. [See the documentation](https://developers.google.com/workspace/drive/api/reference/rest/v3/accessproposals/resolve)",
version: "0.0.4",
version: "0.0.5",
type: "action",
props: {
googleDrive,
Expand Down
Loading
Loading