From ae0a98b1d17f19193db226e2094ad623b77f829f Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Thu, 1 May 2025 04:30:25 -0300 Subject: [PATCH 1/4] Package/version bumps --- components/gmail/actions/create-draft/create-draft.mjs | 2 +- components/gmail/package.json | 2 +- pnpm-lock.yaml | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/components/gmail/actions/create-draft/create-draft.mjs b/components/gmail/actions/create-draft/create-draft.mjs index f49f472d96a22..bfeb00cf4f172 100644 --- a/components/gmail/actions/create-draft/create-draft.mjs +++ b/components/gmail/actions/create-draft/create-draft.mjs @@ -6,7 +6,7 @@ export default { key: "gmail-create-draft", name: "Create Draft", description: "Create a draft from your Google Workspace email account. [See the documentation](https://developers.google.com/gmail/api/reference/rest/v1/users.drafts/create)", - version: "0.0.5", + version: "0.1.0", type: "action", props: { gmail, diff --git a/components/gmail/package.json b/components/gmail/package.json index 5db6e3f772f94..f2507ae772f5e 100644 --- a/components/gmail/package.json +++ b/components/gmail/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/gmail", - "version": "0.3.0", + "version": "0.3.1", "description": "Pipedream Gmail Components", "main": "gmail.app.mjs", "keywords": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4b5b5497385c6..172ca08fbe63f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3176,8 +3176,7 @@ importers: components/danny_test_app: {} - components/dappier: - specifiers: {} + components/dappier: {} components/darksky_api: dependencies: From 4eb19b43518421b2201320839cf852f3ebb090ce Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Thu, 1 May 2025 18:18:52 -0300 Subject: [PATCH 2/4] Adding 'fromEmail' and 'signature' props --- .../gmail/actions/create-draft/create-draft.mjs | 12 ++++++++++++ components/gmail/gmail.app.mjs | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/components/gmail/actions/create-draft/create-draft.mjs b/components/gmail/actions/create-draft/create-draft.mjs index bfeb00cf4f172..7b1d4c0f41407 100644 --- a/components/gmail/actions/create-draft/create-draft.mjs +++ b/components/gmail/actions/create-draft/create-draft.mjs @@ -73,6 +73,18 @@ export default { "mimeType", ], }, + fromEmail: { + propDefinition: [ + gmail, + "fromEmail", + ], + }, + signature: { + propDefinition: [ + gmail, + "signature", + ], + }, }, async run({ $ }) { this.attachmentFilenames = utils.parseArray(this.attachmentFilenames); diff --git a/components/gmail/gmail.app.mjs b/components/gmail/gmail.app.mjs index a313d79147730..30c552b5d3c35 100644 --- a/components/gmail/gmail.app.mjs +++ b/components/gmail/gmail.app.mjs @@ -318,6 +318,10 @@ export default { } } + if (props.signature) { + props.body += props.signature; + } + if (props.bodyType === constants.BODY_TYPES.HTML) { opts.html = props.body; } else { From 788a79b5c2148c5ae68100a509a058620390075f Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Thu, 1 May 2025 20:02:37 -0300 Subject: [PATCH 3/4] Adjusting signature addition --- components/gmail/gmail.app.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/gmail/gmail.app.mjs b/components/gmail/gmail.app.mjs index 30c552b5d3c35..694d809a562ca 100644 --- a/components/gmail/gmail.app.mjs +++ b/components/gmail/gmail.app.mjs @@ -318,11 +318,11 @@ export default { } } - if (props.signature) { - props.body += props.signature; - } - if (props.bodyType === constants.BODY_TYPES.HTML) { + if (props.signature) { + props.body += props.signature; + } + opts.html = props.body; } else { opts.text = props.body; From 75b533c1a6bbe475862a17a36a315071640da7ca Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Thu, 1 May 2025 20:35:04 -0300 Subject: [PATCH 4/4] Clarifying description --- components/gmail/gmail.app.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/gmail/gmail.app.mjs b/components/gmail/gmail.app.mjs index 694d809a562ca..73b3e7baee7e7 100644 --- a/components/gmail/gmail.app.mjs +++ b/components/gmail/gmail.app.mjs @@ -118,7 +118,7 @@ export default { signature: { type: "string", label: "Signature", - description: "An HTML signature composed in the Gmail Web UI that will be included in the message", + description: "An HTML signature composed in the Gmail Web UI that will be included in the message. Only works with the `HTML` body type.", optional: true, async options() { const { sendAs } = await this.listSignatures();