Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
18 changes: 12 additions & 6 deletions components/slack/actions/common/send-message.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export default {
type: "boolean",
optional: true,
default: true,
label: "Include link to workflow",
description: "Defaults to `true`, includes a link to the workflow at the end of your Slack message.",
label: "Include link to Pipedream",
description: "Defaults to `true`, includes a link to Pipedream at the end of your Slack message.",
},
customizeBotSettings: {
type: "boolean",
Expand Down Expand Up @@ -139,15 +139,21 @@ export default {
methods: {
_makeSentViaPipedreamBlock() {
const workflowId = process.env.PIPEDREAM_WORKFLOW_ID;
// The link is a URL without a protocol to prevent link unfurling. See
// https://api.slack.com/reference/messaging/link-unfurling#classic_unfurl
const link = `https://pipedream.com/@/${workflowId}?o=a&a=slack`;
const baseLink = "https://pipedream.com";
const linkText = !workflowId
? "Pipedream Connect"
: "Pipedream";

const link = !workflowId
? `${baseLink}/connect`
: `${baseLink}/@/${workflowId}?o=a&a=slack`;

return {
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": `Sent via <${link}|Pipedream>`,
"text": `Sent via <${link}|${linkText}>`,
},
],
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "slack-send-message-to-channel",
name: "Send Message to Channel",
description: "Send a message to a public or private channel. [See the documentation](https://api.slack.com/methods/chat.postMessage)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
slack: common.props.slack,
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.8.0",
"version": "0.8.1",
"description": "Pipedream Slack Components",
"main": "slack.app.mjs",
"keywords": [
Expand Down
10 changes: 5 additions & 5 deletions components/slack/slack.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,14 @@ export default {
unfurl_links: {
type: "boolean",
label: "Unfurl Links",
description: "`TRUE` by default. Pass `FALSE` to disable unfurling of links.",
default: true,
description: "Default to `false`. Pass `true` to enable unfurling of links.",
default: false,
optional: true,
},
unfurl_media: {
type: "boolean",
label: "Unfurl Media",
description: "`TRUE` by default. Pass `FALSE` to disable unfurling of media content.",
description: "Defaults to `false`. Pass `true` to enable unfurling of media content.",
default: true,
optional: true,
},
Expand All @@ -307,14 +307,14 @@ export default {
as_user: {
type: "boolean",
label: "Send as User",
description: "Optionally pass `TRUE` to post the message as the authenticated user, instead of as a bot. Defaults to `FALSE`.",
description: "Optionally pass `true` to post the message as the authenticated user, instead of as a bot. Defaults to `false`.",
default: false,
optional: true,
},
mrkdwn: {
label: "Send text as Slack mrkdwn",
type: "boolean",
description: "`TRUE` by default. Pass `FALSE` to disable Slack markup parsing. [See docs here](https://api.slack.com/reference/surfaces/formatting)",
description: "`true` by default. Pass `false` to disable Slack markup parsing. [See docs here](https://api.slack.com/reference/surfaces/formatting)",
default: true,
optional: true,
},
Expand Down
18 changes: 6 additions & 12 deletions pnpm-lock.yaml

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

Loading