Skip to content
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
23 changes: 21 additions & 2 deletions components/gmail/actions/approve-workflow/approve-workflow.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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:<br />${resume_url}<br /><br />Cancel here:<br />${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}<br /><br />${approvalText}`
: `${approvalText}`,
});
const response = await this.gmail.sendEmail(opts);
$.export("$summary", `Successfully sent email to ${this.to}`);
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.2.0",
"version": "0.2.1",
"description": "Pipedream Gmail Components",
"main": "gmail.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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({ $ }) {
Expand All @@ -63,6 +63,7 @@ export default {
type: "plain_text",
text: "Approve",
},
style: "primary",
url: resume_url,
},
{
Expand All @@ -71,6 +72,7 @@ export default {
type: "plain_text",
text: "Cancel",
},
style: "danger",
url: cancel_url,
},
],
Expand Down
2 changes: 1 addition & 1 deletion components/slack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/slack",
"version": "0.9.0",
"version": "0.9.1",
"description": "Pipedream Slack Components",
"main": "slack.app.mjs",
"keywords": [
Expand Down
6 changes: 2 additions & 4 deletions pnpm-lock.yaml

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

Loading