Skip to content
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

Updating sent via pipedream link to handle connect case #15621

Merged
merged 3 commits into from
Feb 14, 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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-add-emoji-reaction",
name: "Add Emoji Reaction",
description: "Add an emoji reaction to a message. [See the documentation](https://api.slack.com/methods/reactions.add)",
version: "0.0.12",
version: "0.0.13",
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "slack-archive-channel",
name: "Archive Channel",
description: "Archive a channel. [See the documentation](https://api.slack.com/methods/conversations.archive)",
version: "0.0.20",
version: "0.0.21",
type: "action",
props: {
slack,
Expand Down
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
2 changes: 1 addition & 1 deletion components/slack/actions/create-channel/create-channel.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-create-channel",
name: "Create a Channel",
description: "Create a new channel. [See the documentation](https://api.slack.com/methods/conversations.create)",
version: "0.0.21",
version: "0.0.22",
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-create-reminder",
name: "Create Reminder",
description: "Create a reminder. [See the documentation](https://api.slack.com/methods/reminders.add)",
version: "0.0.21",
version: "0.0.22",
type: "action",
props: {
slack,
Expand Down
2 changes: 1 addition & 1 deletion components/slack/actions/delete-file/delete-file.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-delete-file",
name: "Delete File",
description: "Delete a file. [See the documentation](https://api.slack.com/methods/files.delete)",
version: "0.0.20",
version: "0.0.21",
type: "action",
props: {
slack,
Expand Down
2 changes: 1 addition & 1 deletion components/slack/actions/delete-message/delete-message.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-delete-message",
name: "Delete Message",
description: "Delete a message. [See the documentation](https://api.slack.com/methods/chat.delete)",
version: "0.0.20",
version: "0.0.21",
type: "action",
props: {
slack,
Expand Down
2 changes: 1 addition & 1 deletion components/slack/actions/find-message/find-message.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-find-message",
name: "Find Message",
description: "Find a Slack message. [See the documentation](https://api.slack.com/methods/search.messages)",
version: "0.0.20",
version: "0.0.21",
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-find-user-by-email",
name: "Find User by Email",
description: "Find a user by matching against their email. [See the documentation](https://api.slack.com/methods/users.lookupByEmail)",
version: "0.0.20",
version: "0.0.21",
type: "action",
props: {
slack,
Expand Down
2 changes: 1 addition & 1 deletion components/slack/actions/get-file/get-file.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-get-file",
name: "Get File",
description: "Return information about a file. [See the documentation](https://api.slack.com/methods/files.info)",
version: "0.0.20",
version: "0.0.21",
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-invite-user-to-channel",
name: "Invite User to Channel",
description: "Invite a user to an existing channel. [See the documentation](https://api.slack.com/methods/conversations.invite)",
version: "0.0.20",
version: "0.0.21",
type: "action",
props: {
slack,
Expand Down
2 changes: 1 addition & 1 deletion components/slack/actions/kick-user/kick-user.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "slack-kick-user",
name: "Kick User",
description: "Remove a user from a conversation. [See the documentation](https://api.slack.com/methods/conversations.kick)",
version: "0.0.20",
version: "0.0.21",
type: "action",
props: {
slack,
Expand Down
2 changes: 1 addition & 1 deletion components/slack/actions/list-channels/list-channels.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-list-channels",
name: "List Channels",
description: "Return a list of all channels in a workspace. [See the documentation](https://api.slack.com/methods/conversations.list)",
version: "0.0.20",
version: "0.0.21",
type: "action",
props: {
slack,
Expand Down
2 changes: 1 addition & 1 deletion components/slack/actions/list-files/list-files.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-list-files",
name: "List Files",
description: "Return a list of files within a team. [See the documentation](https://api.slack.com/methods/files.list)",
version: "0.0.48",
version: "0.0.49",
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-list-group-members",
name: "List Group Members",
description: "List all users in a User Group. [See the documentation](https://api.slack.com/methods/usergroups.users.list)",
version: "0.0.5",
version: "0.0.6",
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-list-members-in-channel",
name: "List Members in Channel",
description: "Retrieve members of a channel. [See the documentation](https://api.slack.com/methods/conversations.members)",
version: "0.0.20",
version: "0.0.21",
type: "action",
props: {
slack,
Expand Down
2 changes: 1 addition & 1 deletion components/slack/actions/list-replies/list-replies.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-list-replies",
name: "List Replies",
description: "Retrieve a thread of messages posted to a conversation. [See the documentation](https://api.slack.com/methods/conversations.replies)",
version: "0.0.20",
version: "0.0.21",
type: "action",
props: {
slack,
Expand Down
2 changes: 1 addition & 1 deletion components/slack/actions/list-users/list-users.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-list-users",
name: "List Users",
description: "Return a list of all users in a workspace. [See the documentation](https://api.slack.com/methods/users.list)",
version: "0.0.20",
version: "0.0.21",
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
key: "slack-reply-to-a-message",
name: "Reply to a Message Thread",
description: "Send a message as a threaded reply. See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here",
version: "0.1.25",
version: "0.1.26",
type: "action",
props: {
slack: common.props.slack,
Expand All @@ -29,7 +29,7 @@
],
},
...common.props,
replyToThread: {

Check warning on line 32 in components/slack/actions/reply-to-a-message/reply-to-a-message.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop replyToThread must have a label. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 32 in components/slack/actions/reply-to-a-message/reply-to-a-message.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop replyToThread must have a description. See https://pipedream.com/docs/components/guidelines/#props
...common.props.replyToThread,
hidden: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
key: "slack-send-block-kit-message",
name: "Build and Send a Block Kit Message",
description: "Configure custom blocks and send to a channel, group, or user. [See the documentation](https://api.slack.com/tools/block-kit-builder).",
version: "0.4.1",
version: "0.4.2",
type: "action",
props: {
slack: common.props.slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "slack-send-large-message",
name: "Send a Large Message (3000+ characters)",
description: "Send a large message (more than 3000 characters) to a channel, group or user. See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here",
version: "0.0.20",
version: "0.0.21",
type: "action",
props: {
slack: common.props.slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
key: "slack-send-message-advanced",
name: "Send Message (Advanced)",
description: "Customize advanced setttings and send a message to a channel, group or user. See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here",
version: "0.0.3",
version: "0.0.4",
type: "action",
props: {
slack: common.props.slack,
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
key: "slack-send-message-to-user-or-group",
name: "Send Message to User or Group",
description: "Send a message to a user or group. [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/actions/send-message/send-message.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "slack-send-message",
name: "Send Message",
description: "Send a message to a user, group, private channel or public channel. [See the documentation](https://api.slack.com/methods/chat.postMessage)",
version: "0.0.16",
version: "0.0.17",
type: "action",
props: {
slack: common.props.slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-set-channel-description",
name: "Set Channel Description",
description: "Change the description or purpose of a channel. [See the documentation](https://api.slack.com/methods/conversations.setPurpose)",
version: "0.0.5",
version: "0.0.6",
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-set-channel-topic",
name: "Set Channel Topic",
description: "Set the topic on a selected channel. [See the documentation](https://api.slack.com/methods/conversations.setTopic)",
version: "0.0.20",
version: "0.0.21",
type: "action",
props: {
slack,
Expand Down
2 changes: 1 addition & 1 deletion components/slack/actions/set-status/set-status.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-set-status",
name: "Set Status",
description: "Set the current status for a user. [See the documentation](https://api.slack.com/methods/users.profile.set)",
version: "0.0.5",
version: "0.0.6",
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-update-group-members",
name: "Update Groups Members",
description: "Update the list of users for a User Group. [See the documentation](https://api.slack.com/methods/usergroups.users.update)",
version: "0.0.5",
version: "0.0.6",
type: "action",
props: {
slack,
Expand Down
2 changes: 1 addition & 1 deletion components/slack/actions/update-message/update-message.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "slack-update-message",
name: "Update Message",
description: "Update a message. [See the documentation](https://api.slack.com/methods/chat.update)",
version: "0.1.20",
version: "0.1.21",
type: "action",
props: {
slack,
Expand Down
2 changes: 1 addition & 1 deletion components/slack/actions/update-profile/update-profile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "slack-update-profile",
name: "Update Profile",
description: "Update basic profile field such as name or title. [See the documentation](https://api.slack.com/methods/users.profile.set)",
version: "0.0.20",
version: "0.0.21",
type: "action",
props: {
slack,
Expand Down
2 changes: 1 addition & 1 deletion components/slack/actions/upload-file/upload-file.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "slack-upload-file",
name: "Upload File",
description: "Upload a file. [See the documentation](https://api.slack.com/methods/files.upload)",
version: "0.0.24",
version: "0.0.25",
type: "action",
props: {
slack,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "slack-verify-slack-signature",
name: "Verify Slack Signature",
description: "Verifying requests from Slack, slack signs its requests using a secret that's unique to your app. [See the documentation](https://api.slack.com/authentication/verifying-requests-from-slack)",
version: "0.0.13",
version: "0.0.14",
type: "action",
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
12 changes: 6 additions & 6 deletions components/slack/slack.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,15 @@ 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.",
default: true,
description: "Defaults to `false`. Pass `true` to enable unfurling of media content.",
default: false,
optional: true,
},
parse: {
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
...common,
key: "slack-new-channel-created",
name: "New Channel Created (Instant)",
version: "0.0.7",
version: "0.0.8",
description: "Emit new event when a new channel is created.",
type: "source",
dedupe: "unique",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
...common,
key: "slack-new-direct-message",
name: "New Direct Message (Instant)",
version: "1.0.20",
version: "1.0.21",
description: "Emit new event when a message was posted in a direct message channel",
type: "source",
dedupe: "unique",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

export default {
name: "New Interaction Events (Instant)",
version: "0.0.17",
version: "0.0.18",
key: "slack-new-interaction-event-received",
description: "Emit new events on new Slack [interactivity events](https://api.slack.com/interactivity) sourced from [Block Kit interactive elements](https://api.slack.com/interactivity/components), [Slash commands](https://api.slack.com/interactivity/slash-commands), or [Shortcuts](https://api.slack.com/interactivity/shortcuts).",
type: "source",
props: {
...common.props,
alert: {

Check warning on line 12 in components/slack/sources/new-interaction-event-received/new-interaction-event-received.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop alert must have a label. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 12 in components/slack/sources/new-interaction-event-received/new-interaction-event-received.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop alert must have a description. See https://pipedream.com/docs/components/guidelines/#props
type: "alert",
alertType: "info",
content: "Please note that only messages created via Pipedream's [Send Block Kit Message](https://pipedream.com/apps/slack/actions/send-block-kit-message) Action, or via API call from the Pipedream app will emit an interaction event with this trigger. \n\nBlock kit messages sent directly via the Slack's block kit builder will not trigger an interaction event. \n\nSee the [documentation](https://pipedream.com/apps/slack/triggers/new-interaction-event-received) for more details.",
Expand Down
Loading
Loading