Skip to content

Commit 5637c92

Browse files
authored
Gmail 'Create Draft' improvement (#16536)
* Package/version bumps * Adding 'fromEmail' and 'signature' props * Adjusting signature addition * Clarifying description
1 parent ae9bcaf commit 5637c92

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

components/gmail/actions/create-draft/create-draft.mjs

+13-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "gmail-create-draft",
77
name: "Create Draft",
88
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)",
9-
version: "0.0.5",
9+
version: "0.1.0",
1010
type: "action",
1111
props: {
1212
gmail,
@@ -73,6 +73,18 @@ export default {
7373
"mimeType",
7474
],
7575
},
76+
fromEmail: {
77+
propDefinition: [
78+
gmail,
79+
"fromEmail",
80+
],
81+
},
82+
signature: {
83+
propDefinition: [
84+
gmail,
85+
"signature",
86+
],
87+
},
7688
},
7789
async run({ $ }) {
7890
this.attachmentFilenames = utils.parseArray(this.attachmentFilenames);

components/gmail/gmail.app.mjs

+5-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export default {
118118
signature: {
119119
type: "string",
120120
label: "Signature",
121-
description: "An HTML signature composed in the Gmail Web UI that will be included in the message",
121+
description: "An HTML signature composed in the Gmail Web UI that will be included in the message. Only works with the `HTML` body type.",
122122
optional: true,
123123
async options() {
124124
const { sendAs } = await this.listSignatures();
@@ -319,6 +319,10 @@ export default {
319319
}
320320

321321
if (props.bodyType === constants.BODY_TYPES.HTML) {
322+
if (props.signature) {
323+
props.body += props.signature;
324+
}
325+
322326
opts.html = props.body;
323327
} else {
324328
opts.text = props.body;

components/gmail/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/gmail",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"description": "Pipedream Gmail Components",
55
"main": "gmail.app.mjs",
66
"keywords": [

0 commit comments

Comments
 (0)