diff --git a/components/slack/actions/send-message/send-message.mjs b/components/slack/actions/send-message/send-message.mjs index f88f6426a9ea4..04b721b2ab2c9 100644 --- a/components/slack/actions/send-message/send-message.mjs +++ b/components/slack/actions/send-message/send-message.mjs @@ -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.14", + version: "0.0.15", type: "action", props: { slack: common.props.slack, @@ -21,7 +21,7 @@ export default { conversation: { propDefinition: [ common.props.slack, - "channelId", + "conversation", (c) => ({ types: c.channelType === "Channels" ? [ diff --git a/components/slack/package.json b/components/slack/package.json index 0f0aad584e557..6cd894efe2f81 100644 --- a/components/slack/package.json +++ b/components/slack/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/slack", - "version": "0.6.6", + "version": "0.6.7", "description": "Pipedream Slack Components", "main": "slack.app.mjs", "keywords": [ diff --git a/components/slack_bot/actions/add-emoji-reaction/add-emoji-reaction.mjs b/components/slack_bot/actions/add-emoji-reaction/add-emoji-reaction.mjs index ee10d103eabc3..b2cbd842ef5d8 100644 --- a/components/slack_bot/actions/add-emoji-reaction/add-emoji-reaction.mjs +++ b/components/slack_bot/actions/add-emoji-reaction/add-emoji-reaction.mjs @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-add-emoji-reaction", description: "Add an emoji reaction to a message. [See the documentation](https://api.slack.com/methods/reactions.add)", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/slack_bot/actions/archive-channel/archive-channel.mjs b/components/slack_bot/actions/archive-channel/archive-channel.mjs index e8ac2049cc056..ff30f5dc3f953 100644 --- a/components/slack_bot/actions/archive-channel/archive-channel.mjs +++ b/components/slack_bot/actions/archive-channel/archive-channel.mjs @@ -27,5 +27,5 @@ export default { }), key: "slack_bot-archive-channel", description: "Archive a channel (Bot). [See the documentation](https://api.slack.com/methods/conversations.archive)", - version: "0.0.3", + version: "0.0.4", }; diff --git a/components/slack_bot/actions/create-channel/create-channel.mjs b/components/slack_bot/actions/create-channel/create-channel.mjs index 29e91b78252a0..38e483a573076 100644 --- a/components/slack_bot/actions/create-channel/create-channel.mjs +++ b/components/slack_bot/actions/create-channel/create-channel.mjs @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-create-channel", description: "Create a new channel (Bot). [See the documentation](https://api.slack.com/methods/conversations.create)", - version: "0.0.3", + version: "0.0.4", }; diff --git a/components/slack_bot/actions/delete-file/delete-file.mjs b/components/slack_bot/actions/delete-file/delete-file.mjs index b7598b08e5bdc..f78a6c22c670f 100644 --- a/components/slack_bot/actions/delete-file/delete-file.mjs +++ b/components/slack_bot/actions/delete-file/delete-file.mjs @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-delete-file", description: "Delete a file (Bot). [See the documentation](https://api.slack.com/methods/files.delete)", - version: "0.0.3", + version: "0.0.4", }; diff --git a/components/slack_bot/actions/delete-message/delete-message.mjs b/components/slack_bot/actions/delete-message/delete-message.mjs index 4ea36e7a61c4a..024b0c0bd4bdc 100644 --- a/components/slack_bot/actions/delete-message/delete-message.mjs +++ b/components/slack_bot/actions/delete-message/delete-message.mjs @@ -14,5 +14,5 @@ export default { }), key: "slack_bot-delete-message", description: "Delete a message (Bot). [See the documentation](https://api.slack.com/methods/chat.delete)", - version: "0.0.3", + version: "0.0.4", }; diff --git a/components/slack_bot/actions/find-user-by-email/find-user-by-email.mjs b/components/slack_bot/actions/find-user-by-email/find-user-by-email.mjs index 0f12325a73f2f..7b5ad6006b82b 100644 --- a/components/slack_bot/actions/find-user-by-email/find-user-by-email.mjs +++ b/components/slack_bot/actions/find-user-by-email/find-user-by-email.mjs @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-find-user-by-email", description: "Find a user by matching against their email (Bot). [See the documentation](https://api.slack.com/methods/users.lookupByEmail)", - version: "0.0.3", + version: "0.0.4", }; diff --git a/components/slack_bot/actions/get-file/get-file.mjs b/components/slack_bot/actions/get-file/get-file.mjs index 8b6d118061b25..979416d402537 100644 --- a/components/slack_bot/actions/get-file/get-file.mjs +++ b/components/slack_bot/actions/get-file/get-file.mjs @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-get-file", description: "Return information about a file (Bot). [See the documentation](https://api.slack.com/methods/files.info)", - version: "0.0.3", + version: "0.0.4", }; diff --git a/components/slack_bot/actions/invite-user-to-channel/invite-user-to-channel.mjs b/components/slack_bot/actions/invite-user-to-channel/invite-user-to-channel.mjs index 25e0226dbb7f3..05dde4f7b9c55 100644 --- a/components/slack_bot/actions/invite-user-to-channel/invite-user-to-channel.mjs +++ b/components/slack_bot/actions/invite-user-to-channel/invite-user-to-channel.mjs @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-invite-user-to-channel", description: "Invite a user to an existing channel (Bot). [See the documentation](https://api.slack.com/methods/conversations.invite)", - version: "0.0.3", + version: "0.0.4", }; diff --git a/components/slack_bot/actions/list-channels/list-channels.mjs b/components/slack_bot/actions/list-channels/list-channels.mjs index 1dbcf63167419..adf71170d26cb 100644 --- a/components/slack_bot/actions/list-channels/list-channels.mjs +++ b/components/slack_bot/actions/list-channels/list-channels.mjs @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-list-channels", description: "Return a list of all channels in a workspace (Bot). [See the documentation](https://api.slack.com/methods/conversations.list)", - version: "0.0.3", + version: "0.0.4", }; diff --git a/components/slack_bot/actions/list-files/list-files.mjs b/components/slack_bot/actions/list-files/list-files.mjs index 94a6dc2944192..d016f72012dd6 100644 --- a/components/slack_bot/actions/list-files/list-files.mjs +++ b/components/slack_bot/actions/list-files/list-files.mjs @@ -30,5 +30,5 @@ export default { }), key: "slack_bot-list-files", description: "Return a list of files within a team (Bot). [See the documentation](https://api.slack.com/methods/files.list)", - version: "0.0.3", + version: "0.0.4", }; diff --git a/components/slack_bot/actions/list-group-members/list-group-members.mjs b/components/slack_bot/actions/list-group-members/list-group-members.mjs index a8276e1fc6aab..cf461541c4dd7 100644 --- a/components/slack_bot/actions/list-group-members/list-group-members.mjs +++ b/components/slack_bot/actions/list-group-members/list-group-members.mjs @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-list-group-members", description: "List all users in a User Group (Bot). [See the documentation](https://api.slack.com/methods/usergroups.users.list)", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/slack_bot/actions/list-members-in-channel/list-members-in-channel.mjs b/components/slack_bot/actions/list-members-in-channel/list-members-in-channel.mjs index 0bec580b2fe50..1e0785b59b0ae 100644 --- a/components/slack_bot/actions/list-members-in-channel/list-members-in-channel.mjs +++ b/components/slack_bot/actions/list-members-in-channel/list-members-in-channel.mjs @@ -30,5 +30,5 @@ export default { }), key: "slack_bot-list-members-in-channel", description: "Retrieve members of a channel (Bot). [See the documentation](https://api.slack.com/methods/conversations.members)", - version: "0.0.3", + version: "0.0.4", }; diff --git a/components/slack_bot/actions/list-replies/list-replies.mjs b/components/slack_bot/actions/list-replies/list-replies.mjs index 4dfda97112fee..410be522a946c 100644 --- a/components/slack_bot/actions/list-replies/list-replies.mjs +++ b/components/slack_bot/actions/list-replies/list-replies.mjs @@ -39,5 +39,5 @@ export default { }), key: "slack_bot-list-replies", description: "Retrieve a thread of messages posted to a conversation (Bot). [See the documentation](https://api.slack.com/methods/conversations.replies)", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/list-users/list-users.mjs b/components/slack_bot/actions/list-users/list-users.mjs index 58ec940a426a7..71d7d375a161b 100644 --- a/components/slack_bot/actions/list-users/list-users.mjs +++ b/components/slack_bot/actions/list-users/list-users.mjs @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-list-users", description: "Return a list of all users in a workspace (Bot). [See the documentation](https://api.slack.com/methods/users.list)", - version: "0.0.3", + version: "0.0.4", }; diff --git a/components/slack_bot/actions/reply-to-a-message/reply-to-a-message.mjs b/components/slack_bot/actions/reply-to-a-message/reply-to-a-message.mjs index e6bb725002c45..bd66ae9aa8362 100644 --- a/components/slack_bot/actions/reply-to-a-message/reply-to-a-message.mjs +++ b/components/slack_bot/actions/reply-to-a-message/reply-to-a-message.mjs @@ -14,5 +14,5 @@ export default { }), key: "slack_bot-reply-to-a-message", description: "Send a message as a threaded reply (Bot). See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/send-large-message/send-large-message.mjs b/components/slack_bot/actions/send-large-message/send-large-message.mjs index 264b592c698c9..4465741376ce6 100644 --- a/components/slack_bot/actions/send-large-message/send-large-message.mjs +++ b/components/slack_bot/actions/send-large-message/send-large-message.mjs @@ -14,5 +14,5 @@ export default { }), key: "slack_bot-send-large-message", description: "Send a large message (more than 3000 characters) to a channel, group or user (Bot). See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/send-message-advanced/send-message-advanced.mjs b/components/slack_bot/actions/send-message-advanced/send-message-advanced.mjs index decda437eb473..b58e3cbc9ea85 100644 --- a/components/slack_bot/actions/send-message-advanced/send-message-advanced.mjs +++ b/components/slack_bot/actions/send-message-advanced/send-message-advanced.mjs @@ -14,5 +14,5 @@ export default { }), key: "slack_bot-send-message-advanced", description: "Customize advanced setttings and send a message to a channel, group or user (Bot). See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/actions/send-message/send-message.mjs b/components/slack_bot/actions/send-message/send-message.mjs index de57af6ca782e..8002ecce52d61 100644 --- a/components/slack_bot/actions/send-message/send-message.mjs +++ b/components/slack_bot/actions/send-message/send-message.mjs @@ -14,5 +14,5 @@ export default { }), key: "slack_bot-send-message", description: "Send a message to a user, group, private channel or public channel (Bot). 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", }; diff --git a/components/slack_bot/actions/set-channel-description/set-channel-description.mjs b/components/slack_bot/actions/set-channel-description/set-channel-description.mjs index 170fb66fd8737..ed8f440429ad0 100644 --- a/components/slack_bot/actions/set-channel-description/set-channel-description.mjs +++ b/components/slack_bot/actions/set-channel-description/set-channel-description.mjs @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-set-channel-description", description: "Change the description or purpose of a channel (Bot). [See the documentation](https://api.slack.com/methods/conversations.setPurpose)", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/slack_bot/actions/set-channel-topic/set-channel-topic.mjs b/components/slack_bot/actions/set-channel-topic/set-channel-topic.mjs index 0b32e7432c476..b845b906580c8 100644 --- a/components/slack_bot/actions/set-channel-topic/set-channel-topic.mjs +++ b/components/slack_bot/actions/set-channel-topic/set-channel-topic.mjs @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-set-channel-topic", description: "Set the topic on a selected channel (Bot). [See the documentation](https://api.slack.com/methods/conversations.setTopic)", - version: "0.0.3", + version: "0.0.4", }; diff --git a/components/slack_bot/actions/update-group-members/update-group-members.mjs b/components/slack_bot/actions/update-group-members/update-group-members.mjs index 6d93528428666..d9aedd2658964 100644 --- a/components/slack_bot/actions/update-group-members/update-group-members.mjs +++ b/components/slack_bot/actions/update-group-members/update-group-members.mjs @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-update-group-members", description: "Update the list of users for a User Group (Bot). [See docs here](https://api.slack.com/methods/usergroups.users.update)", - version: "0.0.1", + version: "0.0.2", }; diff --git a/components/slack_bot/actions/update-message/update-message.mjs b/components/slack_bot/actions/update-message/update-message.mjs index cd72ea146fe27..376d9402ee5a7 100644 --- a/components/slack_bot/actions/update-message/update-message.mjs +++ b/components/slack_bot/actions/update-message/update-message.mjs @@ -14,5 +14,5 @@ export default { }), key: "slack_bot-update-message", description: "Update a message (Bot). [See the documentation](https://api.slack.com/methods/chat.update)", - version: "0.0.3", + version: "0.0.4", }; diff --git a/components/slack_bot/actions/upload-file/upload-file.mjs b/components/slack_bot/actions/upload-file/upload-file.mjs index 8633194347bc9..940b8f29e47e8 100644 --- a/components/slack_bot/actions/upload-file/upload-file.mjs +++ b/components/slack_bot/actions/upload-file/upload-file.mjs @@ -11,5 +11,5 @@ export default { }), key: "slack_bot-upload-file", description: "Upload a file (Bot). [See the documentation](https://api.slack.com/methods/files.upload)", - version: "0.0.4", + version: "0.0.5", }; diff --git a/components/slack_bot/common/utils.mjs b/components/slack_bot/common/utils.mjs index 8fd239056e3a8..abcb6846f8830 100644 --- a/components/slack_bot/common/utils.mjs +++ b/components/slack_bot/common/utils.mjs @@ -1,5 +1,7 @@ import app from "../slack_bot.app.mjs"; +const CONVERSATION_PERMISSION_MESSAGE = "In order to list a Slack channel, **your bot must be a member of that channel**, and in order to list private channels, your bot must have the `groups:read` scope in the `OAuth & Permissions` settings in Slack for this bot."; + async function streamIterator(stream) { let resources = []; for await (const resource of stream) { @@ -23,6 +25,12 @@ function buildPropDefinitions({ }; } + if (key === "conversation") { + prop.description = prop.description + ? `${prop.description} ${CONVERSATION_PERMISSION_MESSAGE}` + : `Select a public or private channel, or a user or group. ${CONVERSATION_PERMISSION_MESSAGE}`; + } + const [ , ...propDefinitionItems ] = prop.propDefinition; @@ -87,4 +95,5 @@ function buildAppProps({ export default { streamIterator, buildAppProps, + CONVERSATION_PERMISSION_MESSAGE, }; diff --git a/components/slack_bot/package.json b/components/slack_bot/package.json index 6cab33fb1545a..3d69251679617 100644 --- a/components/slack_bot/package.json +++ b/components/slack_bot/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/slack_bot", - "version": "0.5.4", + "version": "0.5.5", "description": "Pipedream Slack_bot Components", "main": "slack_bot.app.mjs", "keywords": [ diff --git a/components/slack_bot/sources/new-direct-message/new-direct-message.mjs b/components/slack_bot/sources/new-direct-message/new-direct-message.mjs index 2dfc5847f6f76..866dacb30d375 100644 --- a/components/slack_bot/sources/new-direct-message/new-direct-message.mjs +++ b/components/slack_bot/sources/new-direct-message/new-direct-message.mjs @@ -1,11 +1,12 @@ import common from "../common/base.mjs"; import constants from "../../common/constants.mjs"; +import utils from "../../common/utils.mjs"; export default { ...common, key: "slack_bot-new-direct-message", name: "New Direct Message", - version: "0.0.3", + version: "0.0.4", description: "Emit new event when a message is posted in a direct message channel (Bot). To open a conversation, use the Pipedream Action \"Send a Direct Message\" to send a message from the Bot, or enable direct messages to the Bot in your App Settings (Settings->App Home->Show Tabs->Messages Tab), and send a direct message to the Bot.", type: "source", dedupe: "unique", @@ -22,7 +23,7 @@ export default { }), ], label: "User Channel", - description: "Events will only be emitted for direct messages between this user and the Bot.", + description: `Events will only be emitted for direct messages between this user and the Bot. ${utils.CONVERSATION_PERMISSION_MESSAGE}`, }, }, methods: { diff --git a/components/slack_bot/sources/new-message-in-channel/new-message-in-channel.mjs b/components/slack_bot/sources/new-message-in-channel/new-message-in-channel.mjs index 9ba0e3e008ce8..c08ae2aa5c953 100644 --- a/components/slack_bot/sources/new-message-in-channel/new-message-in-channel.mjs +++ b/components/slack_bot/sources/new-message-in-channel/new-message-in-channel.mjs @@ -1,11 +1,12 @@ import common from "../common/base.mjs"; import constants from "../../common/constants.mjs"; +import utils from "../../common/utils.mjs"; export default { ...common, key: "slack_bot-new-message-in-channel", name: "New Message In Channel", - version: "0.0.3", + version: "0.0.4", description: "Emit new event when a new message is posted to a public, private or group channel (Bot)", type: "source", dedupe: "unique", @@ -23,6 +24,7 @@ export default { ], }), ], + description: `Select the channel's ID. ${utils.CONVERSATION_PERMISSION_MESSAGE}`, }, }, methods: {