Skip to content

Commit b68121d

Browse files
authored
Google Docs - add support for tabs content to get-document (#17501)
* add support for tabs content * pnpm-lock.yaml * add optional true * versions
1 parent 36b8610 commit b68121d

File tree

12 files changed

+24
-14
lines changed

12 files changed

+24
-14
lines changed

components/google_docs/actions/append-image/append-image.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_docs-append-image",
55
name: "Append Image to Document",
66
description: "Appends an image to the end of a document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/request#InsertInlineImageRequest)",
7-
version: "0.0.6",
7+
version: "0.0.7",
88
type: "action",
99
props: {
1010
googleDocs,

components/google_docs/actions/append-text/append-text.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_docs-append-text",
55
name: "Append Text",
66
description: "Append text to an existing document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/request#InsertTextRequest)",
7-
version: "0.1.5",
7+
version: "0.1.6",
88
type: "action",
99
props: {
1010
googleDocs,

components/google_docs/actions/create-document-from-template/create-document-from-template.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313
...others,
1414
key: "google_docs-create-document-from-template",
1515
name: "Create New Document From Template",
16-
version: "0.0.1",
16+
version: "0.0.2",
1717
description,
1818
type,
1919
props: {

components/google_docs/actions/create-document/create-document.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_docs-create-document",
55
name: "Create a New Document",
66
description: "Create a new document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/create)",
7-
version: "0.1.5",
7+
version: "0.1.6",
88
type: "action",
99
props: {
1010
googleDocs,

components/google_docs/actions/find-document/find-document.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default {
1414
...others,
1515
key: "google_docs-find-document",
1616
name: "Find Document",
17-
version: "0.0.1",
17+
version: "0.0.2",
1818
description,
1919
type,
2020
props: {

components/google_docs/actions/get-document/get-document.mjs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_docs-get-document",
55
name: "Get Document",
66
description: "Get the contents of the latest version of a document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/get)",
7-
version: "0.1.4",
7+
version: "0.1.5",
88
type: "action",
99
props: {
1010
googleDocs,
@@ -14,9 +14,16 @@ export default {
1414
"docId",
1515
],
1616
},
17+
includeTabsContent: {
18+
type: "boolean",
19+
label: "Include Tabs Content",
20+
description: "Whether to populate the `Document.tabs` field instead of the text content fields like `body` and `documentStyle` on `Document`",
21+
optional: true,
22+
default: false,
23+
},
1724
},
1825
async run({ $ }) {
19-
const response = await this.googleDocs.getDocument(this.docId);
26+
const response = await this.googleDocs.getDocument(this.docId, this.includeTabsContent);
2027

2128
$.export("$summary", `Successfully retrieved document with ID: ${this.docId}`);
2229

components/google_docs/actions/replace-image/replace-image.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_docs-replace-image",
55
name: "Replace Image",
66
description: "Replace image in a existing document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/request#ReplaceImageRequest)",
7-
version: "0.0.6",
7+
version: "0.0.7",
88
type: "action",
99
props: {
1010
googleDocs,

components/google_docs/actions/replace-text/replace-text.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_docs-replace-text",
55
name: "Replace Text",
66
description: "Replace all instances of matched text in an existing document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/request#ReplaceAllTextRequest)",
7-
version: "0.0.6",
7+
version: "0.0.7",
88
type: "action",
99
props: {
1010
googleDocs,

components/google_docs/google_docs.app.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,14 @@ export default {
102102
},
103103
});
104104
},
105-
async getDocument(documentId) {
105+
async getDocument(documentId, includeTabsContent = false) {
106106
const { data } = await this.docs().documents.get({
107107
documentId,
108+
includeTabsContent,
108109
});
109-
const doc = utils.addTextContentToDocument(data);
110+
const doc = includeTabsContent
111+
? data
112+
: utils.addTextContentToDocument(data);
110113
return doc;
111114
},
112115
async createEmptyDoc(title) {

components/google_docs/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_docs",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"description": "Pipedream Google_docs Components",
55
"main": "google_docs.app.mjs",
66
"keywords": [

0 commit comments

Comments
 (0)