Skip to content

Gmail 'Create Draft' improvement #16536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 5, 2025
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
14 changes: 13 additions & 1 deletion components/gmail/actions/create-draft/create-draft.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -73,6 +73,18 @@ export default {
"mimeType",
],
},
fromEmail: {
propDefinition: [
gmail,
"fromEmail",
],
},
signature: {
propDefinition: [
gmail,
"signature",
],
},
},
async run({ $ }) {
this.attachmentFilenames = utils.parseArray(this.attachmentFilenames);
Expand Down
6 changes: 5 additions & 1 deletion components/gmail/gmail.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -319,6 +319,10 @@ export default {
}

if (props.bodyType === constants.BODY_TYPES.HTML) {
if (props.signature) {
props.body += props.signature;
}

opts.html = props.body;
} else {
opts.text = props.body;
Expand Down
2 changes: 1 addition & 1 deletion components/gmail/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/gmail",
"version": "0.3.0",
"version": "0.3.1",
"description": "Pipedream Gmail Components",
"main": "gmail.app.mjs",
"keywords": [
Expand Down
3 changes: 1 addition & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading