diff --git a/components/gmail/actions/approve-workflow/approve-workflow.mjs b/components/gmail/actions/approve-workflow/approve-workflow.mjs index e18b9a2227ce3..2c0ecf1afcb08 100644 --- a/components/gmail/actions/approve-workflow/approve-workflow.mjs +++ b/components/gmail/actions/approve-workflow/approve-workflow.mjs @@ -4,7 +4,7 @@ export default { key: "gmail-approve-workflow", name: "Approve Workflow", description: "Suspend the workflow until approved by email. [See the documentation](https://pipedream.com/docs/code/nodejs/rerun#flowsuspend)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { gmail, @@ -20,14 +20,33 @@ export default { "subject", ], }, + body: { + propDefinition: [ + gmail, + "body", + ], + description: "Include an email body to send. Supports HTML", + optional: true, + }, + bodyType: { + propDefinition: [ + gmail, + "bodyType", + ], + hidden: true, + default: "html", + }, }, async run({ $ }) { const { resume_url, cancel_url, } = $.flow.suspend(); + const approvalText = `Click here to approve:
${resume_url}

Cancel here:
${cancel_url}`; const opts = await this.gmail.getOptionsToSendEmail($, { - body: `Click here to approve the workflow: ${resume_url}, \nand cancel here: ${cancel_url}`, ...this, + body: this.body + ? `${this.body}

${approvalText}` + : `${approvalText}`, }); const response = await this.gmail.sendEmail(opts); $.export("$summary", `Successfully sent email to ${this.to}`); diff --git a/components/gmail/package.json b/components/gmail/package.json index 88d97cadb1de0..7095b9626eaf5 100644 --- a/components/gmail/package.json +++ b/components/gmail/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/gmail", - "version": "0.2.0", + "version": "0.2.1", "description": "Pipedream Gmail Components", "main": "gmail.app.mjs", "keywords": [ diff --git a/components/slack/actions/approve-workflow/approve-workflow.mjs b/components/slack/actions/approve-workflow/approve-workflow.mjs index ce8daab1ecd91..e61bf187c26e2 100644 --- a/components/slack/actions/approve-workflow/approve-workflow.mjs +++ b/components/slack/actions/approve-workflow/approve-workflow.mjs @@ -4,8 +4,8 @@ import constants from "../../common/constants.mjs"; export default { key: "slack-approve-workflow", name: "Approve Workflow", - description: "Suspend the workflow until approved by a slack message. [See the documentation](https://pipedream.com/docs/code/nodejs/rerun#flowsuspend)", - version: "0.0.1", + description: "Suspend the workflow until approved by a Slack message. [See the documentation](https://pipedream.com/docs/code/nodejs/rerun#flowsuspend)", + version: "0.0.2", type: "action", props: { slack, @@ -36,7 +36,7 @@ export default { message: { type: "string", label: "Message", - description: "A text message to include with the Approve and Cancel Buttons", + description: "Text to include with the Approve and Cancel Buttons", }, }, async run({ $ }) { @@ -63,6 +63,7 @@ export default { type: "plain_text", text: "Approve", }, + style: "primary", url: resume_url, }, { @@ -71,6 +72,7 @@ export default { type: "plain_text", text: "Cancel", }, + style: "danger", url: cancel_url, }, ], diff --git a/components/slack/package.json b/components/slack/package.json index 49c15480797ad..060f3e2262d73 100644 --- a/components/slack/package.json +++ b/components/slack/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/slack", - "version": "0.9.0", + "version": "0.9.1", "description": "Pipedream Slack Components", "main": "slack.app.mjs", "keywords": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 227bc6cf3053f..bb6beb3642cc8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -313,8 +313,7 @@ importers: specifier: ^3.0.0 version: 3.0.3 - components/adobe_photoshop_lightroom: - specifiers: {} + components/adobe_photoshop_lightroom: {} components/adobe_sign: {} @@ -7549,8 +7548,7 @@ importers: specifier: ^0.9.0 version: 0.9.0 - components/opnform: - specifiers: {} + components/opnform: {} components/opsgenie: dependencies: