@pipedream/slack_v2 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/actions/add-emoji-reaction/add-emoji-reaction.mjs +5 -2
  2. package/actions/add-reaction/add-reaction.mjs +8 -5
  3. package/actions/archive-channel/archive-channel.mjs +5 -2
  4. package/actions/browse-files/browse-files.mjs +8 -5
  5. package/actions/create-channel/create-channel.mjs +1 -1
  6. package/actions/create-reminder/create-reminder.mjs +1 -1
  7. package/actions/delete-file/delete-file.mjs +1 -1
  8. package/actions/delete-message/delete-message.mjs +4 -2
  9. package/actions/edit-message/edit-message.mjs +4 -3
  10. package/actions/find-message/find-message.mjs +1 -1
  11. package/actions/find-user-by-email/find-user-by-email.mjs +1 -1
  12. package/actions/find-user-by-id/find-user-by-id.mjs +1 -1
  13. package/actions/get-channel-details/get-channel-details.mjs +3 -3
  14. package/actions/get-channel-history/get-channel-history.mjs +5 -3
  15. package/actions/get-current-user/get-current-user.mjs +1 -1
  16. package/actions/get-file/get-file.mjs +1 -1
  17. package/actions/get-thread-replies/get-thread-replies.mjs +7 -3
  18. package/actions/get-user-details/get-user-details.mjs +1 -1
  19. package/actions/invite-user-to-channel/invite-user-to-channel.mjs +2 -2
  20. package/actions/kick-user/kick-user.mjs +6 -3
  21. package/actions/list-channels/list-channels.mjs +1 -1
  22. package/actions/list-emojis/list-emojis.mjs +1 -1
  23. package/actions/list-files/list-files.mjs +1 -1
  24. package/actions/list-group-conversations/list-group-conversations.mjs +1 -1
  25. package/actions/list-group-members/list-group-members.mjs +1 -1
  26. package/actions/list-icon-emoji-options/list-icon-emoji-options.mjs +1 -1
  27. package/actions/list-members-in-channel/list-members-in-channel.mjs +2 -2
  28. package/actions/list-messages/list-messages.mjs +1 -1
  29. package/actions/list-reminder-options/list-reminder-options.mjs +1 -1
  30. package/actions/list-replies/list-replies.mjs +5 -2
  31. package/actions/list-teams/list-teams.mjs +1 -1
  32. package/actions/list-user-group-options/list-user-group-options.mjs +1 -1
  33. package/actions/list-users/list-users.mjs +1 -1
  34. package/actions/post-message/post-message.mjs +1 -1
  35. package/actions/reply-to-a-message/reply-to-a-message.mjs +1 -1
  36. package/actions/search/search.mjs +1 -1
  37. package/actions/send-block-kit-message/send-block-kit-message.mjs +1 -1
  38. package/actions/send-large-message/send-large-message.mjs +1 -1
  39. package/actions/send-message/send-message.mjs +1 -1
  40. package/actions/send-message-advanced/send-message-advanced.mjs +1 -1
  41. package/actions/send-message-to-channel/send-message-to-channel.mjs +1 -1
  42. package/actions/send-message-to-user-or-group/send-message-to-user-or-group.mjs +1 -1
  43. package/actions/set-channel-description/set-channel-description.mjs +6 -3
  44. package/actions/set-channel-topic/set-channel-topic.mjs +2 -2
  45. package/actions/set-status/set-status.mjs +1 -1
  46. package/actions/update-group-members/update-group-members.mjs +1 -1
  47. package/actions/update-message/update-message.mjs +1 -1
  48. package/actions/update-profile/update-profile.mjs +1 -1
  49. package/actions/upload-file/upload-file.mjs +1 -1
  50. package/actions/verify-slack-signature/verify-slack-signature.mjs +1 -1
  51. package/common/constants.mjs +6 -0
  52. package/package.json +1 -1
  53. package/slack_v2.app.mjs +21 -5
  54. package/sources/new-channel-created/new-channel-created.mjs +1 -1
  55. package/sources/new-interaction-event-received/new-interaction-event-received.mjs +1 -1
  56. package/sources/new-keyword-mention/new-keyword-mention.mjs +1 -1
  57. package/sources/new-message-in-channels/new-message-in-channels.mjs +1 -1
  58. package/sources/new-private-channel-created/new-private-channel-created.mjs +1 -1
  59. package/sources/new-reaction-added/new-reaction-added.mjs +1 -1
  60. package/sources/new-saved-message/new-saved-message.mjs +1 -1
  61. package/sources/new-user-added/new-user-added.mjs +1 -1
  62. package/sources/new-user-mention/new-user-mention.mjs +1 -1
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-add-emoji-reaction",
5
5
  name: "Add Emoji Reaction",
6
6
  description: "Add an emoji reaction to a message. [See the documentation](https://api.slack.com/methods/reactions.add)",
7
- version: "0.0.27",
7
+ version: "0.0.28",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -37,8 +37,11 @@ export default {
37
37
  },
38
38
  },
39
39
  async run({ $ }) {
40
+ // reactions.add only accepts a channel ID — resolve a name the same way every other
41
+ // AI-optimized tool in this app does.
42
+ const channel = await this.slack.resolveChannelId(this.conversation);
40
43
  const response = await this.slack.addReactions({
41
- channel: this.conversation,
44
+ channel,
42
45
  timestamp: this.timestamp,
43
46
  name: this.icon_emoji,
44
47
  });
@@ -5,11 +5,13 @@ export default {
5
5
  name: "Add Reaction",
6
6
  description:
7
7
  "Add an emoji reaction to a message."
8
- + " Accepts a channel ID or channel name (resolved automatically)."
8
+ + " Accepts a channel ID (preferred — resolves instantly) or channel name (resolved by"
9
+ + " scanning up to 5 pages, ~5,000 channels, of the workspace's channel list — a name beyond"
10
+ + " that bound will not be found)."
9
11
  + " Use **Get Channel History** or **Search** to find the message timestamp."
10
12
  + " Emoji name should be without colons (e.g. `thumbsup`, `fire`, `heart`)."
11
13
  + " [See the documentation](https://api.slack.com/methods/reactions.add)",
12
- version: "0.0.7",
14
+ version: "0.0.8",
13
15
  type: "action",
14
16
  ai: "optimized",
15
17
  annotations: {
@@ -20,9 +22,10 @@ export default {
20
22
  props: {
21
23
  slack,
22
24
  channel: {
23
- type: "string",
24
- label: "Channel",
25
- description: "Channel ID (e.g. `C1234567890`) or channel name (e.g. `general` or `#general`). Resolved automatically.",
25
+ propDefinition: [
26
+ slack,
27
+ "conversation",
28
+ ],
26
29
  },
27
30
  timestamp: {
28
31
  type: "string",
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-archive-channel",
5
5
  name: "Archive Channel",
6
6
  description: "Archive a public or private channel. Direct messages and group DMs can't be archived — pass a channel ID (e.g. `C1234567890`), not a user or group ID. [See the documentation](https://api.slack.com/methods/conversations.archive)",
7
- version: "0.0.35",
7
+ version: "0.0.36",
8
8
  annotations: {
9
9
  destructiveHint: true,
10
10
  openWorldHint: true,
@@ -22,8 +22,11 @@ export default {
22
22
  },
23
23
  },
24
24
  async run({ $ }) {
25
+ // conversations.archive only accepts a channel ID — resolve a name the same way
26
+ // every other AI-optimized tool in this app does.
27
+ const channel = await this.slack.resolveChannelId(this.conversation);
25
28
  const response = await this.slack.archiveConversations({
26
- channel: this.conversation,
29
+ channel,
27
30
  });
28
31
  $.export("$summary", "Successfully archived channel.");
29
32
  return response;
@@ -5,11 +5,13 @@ export default {
5
5
  name: "Browse Files",
6
6
  description:
7
7
  "List files shared in a channel or across the workspace."
8
- + " Accepts a channel ID or channel name (resolved automatically)."
8
+ + " Accepts a channel ID (preferred — resolves instantly) or channel name (resolved by"
9
+ + " scanning up to 5 pages, ~5,000 channels, of the workspace's channel list — a name beyond"
10
+ + " that bound will not be found)."
9
11
  + " Filter by file type (e.g. `images`, `pdfs`, `snippets`)."
10
12
  + " Returns file metadata including name, type, size, and download URL."
11
13
  + " [See the documentation](https://api.slack.com/methods/files.list)",
12
- version: "0.0.7",
14
+ version: "0.0.8",
13
15
  type: "action",
14
16
  ai: "optimized",
15
17
  annotations: {
@@ -20,9 +22,10 @@ export default {
20
22
  props: {
21
23
  slack,
22
24
  channel: {
23
- type: "string",
24
- label: "Channel",
25
- description: "Channel ID (e.g. `C1234567890`) or channel name (e.g. `general` or `#general`). Resolved automatically. If omitted, lists files across the workspace.",
25
+ propDefinition: [
26
+ slack,
27
+ "conversation",
28
+ ],
26
29
  optional: true,
27
30
  },
28
31
  types: {
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-create-channel",
5
5
  name: "Create a Channel",
6
6
  description: "Create a new channel. [See the documentation](https://api.slack.com/methods/conversations.create)",
7
- version: "0.0.35",
7
+ version: "0.0.36",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-create-reminder",
5
5
  name: "Create Reminder",
6
6
  description: "Create a reminder. [See the documentation](https://api.slack.com/methods/reminders.add)",
7
- version: "0.0.36",
7
+ version: "0.0.37",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-delete-file",
5
5
  name: "Delete File",
6
6
  description: "Delete a file. [See the documentation](https://api.slack.com/methods/files.delete)",
7
- version: "0.0.35",
7
+ version: "0.0.36",
8
8
  annotations: {
9
9
  destructiveHint: true,
10
10
  openWorldHint: true,
@@ -8,11 +8,13 @@ export default {
8
8
  + " To delete a specific message (including the most recent one), first call **Get Channel History**"
9
9
  + " to retrieve messages — `messages[0]` is the most recent — then pass its `ts` here."
10
10
  + " Quote the message text back to the user to confirm before deleting."
11
- + " Accepts a channel ID or NAME for the conversation, resolved automatically. Slack only"
11
+ + " Accepts a channel ID (preferred — resolves instantly) or NAME for the conversation;"
12
+ + " a name is resolved by scanning up to 5 pages (~5,000 channels) of the workspace's channel"
13
+ + " list, which can be slow, and a valid channel beyond that bound will not be found. Slack only"
12
14
  + " lets an identity delete its own messages, so this deletes as whichever identity posted:"
13
15
  + " it retries automatically with the other identity if the first attempt returns"
14
16
  + " `cant_delete_message`. [See the documentation](https://api.slack.com/methods/chat.delete)",
15
- version: "0.2.5",
17
+ version: "0.2.6",
16
18
  annotations: {
17
19
  destructiveHint: true,
18
20
  openWorldHint: true,
@@ -6,11 +6,12 @@ export default {
6
6
  name: "Edit Message",
7
7
  description:
8
8
  "Edit an existing message."
9
- + " Accepts a channel ID or channel name (resolved automatically)."
9
+ + " Accepts a channel ID (preferred — resolves instantly) or channel name (resolved by"
10
+ + " scanning the workspace's channel list, which can be slow)."
10
11
  + " Requires the message timestamp (`ts`) from **Get Channel History** or **Post Message**."
11
12
  + " You can only edit messages posted by the same token/user."
12
13
  + " [See the documentation](https://api.slack.com/methods/chat.update)",
13
- version: "0.0.8",
14
+ version: "0.0.9",
14
15
  type: "action",
15
16
  ai: "optimized",
16
17
  annotations: {
@@ -23,7 +24,7 @@ export default {
23
24
  channel: {
24
25
  type: "string",
25
26
  label: "Channel",
26
- description: "Channel ID (e.g. `C1234567890`) or channel name (e.g. `general` or `#general`). Resolved automatically.",
27
+ description: "Prefer a channel ID (e.g. `C1234567890`) — use **List Channels** to look it up; it resolves instantly. A channel name (e.g. `general` or `#general`) is also accepted, but resolving it scans up to 5 pages (~5,000 channels) of the workspace's channel list, which can be slow — and a valid channel beyond that bound will not be found.",
27
28
  },
28
29
  timestamp: {
29
30
  type: "string",
@@ -15,7 +15,7 @@ export default {
15
15
  + " omitted when no mention carried a name."
16
16
  + " Do NOT splice a name back inline: Slack renders `<@U123|Name>` as literal text, not a mention."
17
17
  + " [See the documentation](https://api.slack.com/methods/assistant.search.context)",
18
- version: "0.2.2",
18
+ version: "0.2.3",
19
19
  annotations: {
20
20
  destructiveHint: false,
21
21
  openWorldHint: true,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-find-user-by-email",
5
5
  name: "Find User by Email",
6
6
  description: "Find a user by matching against their email. [See the documentation](https://api.slack.com/methods/users.lookupByEmail)",
7
- version: "0.0.34",
7
+ version: "0.0.35",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-find-user-by-id",
5
5
  name: "Find User by ID",
6
6
  description: "Find a user by their ID — including a specific user you already have the Slack ID for, whether or not it's your own. Returns user profile information including name, email (requires `users:read.email` scope), timezone, and status. If you only have an email address, use **Find User by Email** instead. [See the documentation](https://api.slack.com/methods/users.info)",
7
- version: "0.0.11",
7
+ version: "0.0.12",
8
8
  type: "action",
9
9
  ai: "optimized",
10
10
  annotations: {
@@ -3,8 +3,8 @@ import slack from "../../slack_v2.app.mjs";
3
3
  export default {
4
4
  key: "slack_v2-get-channel-details",
5
5
  name: "Get Channel Details",
6
- description: "Retrieve details for a Slack channel, specified by ID or by name — names are resolved automatically. [See the documentation](https://api.slack.com/methods/conversations.info)",
7
- version: "0.1.5",
6
+ description: "Retrieve details for a Slack channel, specified by ID (preferred — resolves instantly) or by name (resolved by scanning the workspace's channel list, which can be slow). [See the documentation](https://api.slack.com/methods/conversations.info)",
7
+ version: "0.1.6",
8
8
  type: "action",
9
9
  ai: "optimized",
10
10
  annotations: {
@@ -19,7 +19,7 @@ export default {
19
19
  slack,
20
20
  "conversation",
21
21
  ],
22
- description: "A channel ID (e.g. `C1234567890`) or channel name (e.g. `general` or `#general`) — resolved automatically. Use **List Channels** to look up channel IDs.",
22
+ description: "Prefer a channel ID (e.g. `C1234567890`) — use **List Channels** to look it up; it resolves instantly. A channel name (e.g. `general` or `#general`) is also accepted, but resolving it scans up to 5 pages (~5,000 channels) of the workspace's channel list, which can be slow — and a valid channel beyond that bound will not be found.",
23
23
  },
24
24
  includeLocale: {
25
25
  type: "boolean",
@@ -6,7 +6,9 @@ export default {
6
6
  name: "Get Channel History",
7
7
  description:
8
8
  "Read the recent message history from a specific channel or direct message (DM)."
9
- + " Accepts a channel ID or channel name (resolved automatically)."
9
+ + " Accepts a channel ID (preferred — resolves instantly) or channel name (resolved by"
10
+ + " scanning up to 5 pages, ~5,000 channels, of the workspace's channel list — a name beyond"
11
+ + " that bound will not be found, so pass the ID when you have it)."
10
12
  + " To read a DM, pass the other person's **user ID** (e.g. `U1234567890`) as the channel — pass your OWN user ID to read your conversation with yourself."
11
13
  + " Use this when you want to see a channel's or DM's latest messages — unlike **Search** which finds messages by keyword."
12
14
  + " Returns messages with text, timestamps (ts), reactions, and user IDs."
@@ -15,7 +17,7 @@ export default {
15
17
  + " messages carry blocks, attachments and edit metadata, so a busy channel can run to tens"
16
18
  + " of thousands of characters and be truncated before you see any of it."
17
19
  + " [See the documentation](https://api.slack.com/methods/conversations.history)",
18
- version: "0.2.4",
20
+ version: "0.2.5",
19
21
  type: "action",
20
22
  ai: "optimized",
21
23
  annotations: {
@@ -28,7 +30,7 @@ export default {
28
30
  channel: {
29
31
  type: "string",
30
32
  label: "Channel",
31
- description: "Channel ID (e.g. `C1234567890`) or channel name (e.g. `general` or `#general`). For a direct message, pass a user ID (e.g. `U1234567890`) — including your own, to read your self-DM. Resolved automatically.",
33
+ description: "Prefer a channel ID (e.g. `C1234567890`) — use **List Channels** to look it up; it resolves instantly. A channel name (e.g. `general` or `#general`) is also accepted, but resolving it scans up to 5 pages (~5,000 channels) of the workspace's channel list, which can be slow — and a valid channel beyond that bound will not be found. For a direct message, pass a user ID (e.g. `U1234567890`) — including your own, to read your self-DM.",
32
34
  },
33
35
  limit: {
34
36
  type: "integer",
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-get-current-user",
5
5
  name: "Get Current User",
6
6
  description: "Do NOT use for a plain \"who am I\" / \"what's my user ID\" question — call **Get User Details** for that; it answers the same question with a far smaller payload. Do NOT use to look up a DIFFERENT, specifically-identified user (by ID or email) — this only ever describes the authenticated caller; use **Find User by ID** / **Find User by Email** for someone else. Do NOT use to enumerate multiple teams/workspaces (e.g. Enterprise Grid) — use **List Teams** for that; this returns only the caller's own current team. Use this ONLY when you specifically need the full member profile: locale, timezone, presence/status, admin and owner flags, name variants, or workspace domain and enterprise metadata. Combines `auth.test`, `users.info`, `users.profile.get` and `team.info`. [See Slack API docs](https://api.slack.com/methods/auth.test).",
7
- version: "0.0.10",
7
+ version: "0.0.11",
8
8
  type: "action",
9
9
  ai: "optimized",
10
10
  annotations: {
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-get-file",
5
5
  name: "Get File",
6
6
  description: "Return information about a file. [See the documentation](https://api.slack.com/methods/files.info)",
7
- version: "0.1.10",
7
+ version: "0.1.11",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -6,14 +6,18 @@ export default {
6
6
  name: "Get Thread Replies",
7
7
  description:
8
8
  "Retrieve all replies in a message thread."
9
- + " Accepts a channel ID or channel name (resolved automatically)."
9
+ + " Accepts a channel ID (preferred — resolves instantly) or channel name (resolved by"
10
+ + " scanning up to 5 conversations.list pages, ~5,000 active public/private channels — a"
11
+ + " name beyond that limit returns a configuration error)."
12
+ + " To read a thread in a DM, pass the other person's **user ID** (e.g. `U1234567890`) as"
13
+ + " the channel — pass your OWN user ID to read your conversation with yourself."
10
14
  + " Use **Get Channel History** or **Search** to find the parent message's timestamp (thread_ts)."
11
15
  + " Returns the parent message followed by all replies in chronological order."
12
16
  + " **Pass `fields`** (e.g. `text,ts,user`) unless you need full message objects — raw"
13
17
  + " Slack messages carry blocks, attachments and edit metadata, so a long thread can run"
14
18
  + " to tens of thousands of characters and be truncated before you see any of it."
15
19
  + " [See the documentation](https://api.slack.com/methods/conversations.replies)",
16
- version: "0.1.5",
20
+ version: "0.1.6",
17
21
  type: "action",
18
22
  ai: "optimized",
19
23
  annotations: {
@@ -26,7 +30,7 @@ export default {
26
30
  channel: {
27
31
  type: "string",
28
32
  label: "Channel",
29
- description: "Channel ID (e.g. `C1234567890`) or channel name (e.g. `general` or `#general`). Resolved automatically.",
33
+ description: "Prefer a channel ID (e.g. `C1234567890`) — use **List Channels** to look it up; it resolves instantly. A channel name (e.g. `general` or `#general`) is also accepted, but resolving it scans up to 5 pages (~5,000 channels) of the workspace's channel list, which can be slow — and a valid channel beyond that bound will not be found. For a DM thread, pass a user ID (e.g. `U1234567890`) — including your own, to read your self-DM.",
30
34
  },
31
35
  threadTs: {
32
36
  type: "string",
@@ -13,7 +13,7 @@ export default {
13
13
  + " Prefer this over **Get Current User**, which returns a much larger payload and is only"
14
14
  + " needed for full profile detail (locale, status, admin flags)."
15
15
  + " [See the documentation](https://api.slack.com/methods/auth.test)",
16
- version: "0.0.7",
16
+ version: "0.0.8",
17
17
  type: "action",
18
18
  ai: "optimized",
19
19
  annotations: {
@@ -4,8 +4,8 @@ import slack from "../../slack_v2.app.mjs";
4
4
  export default {
5
5
  key: "slack_v2-invite-user-to-channel",
6
6
  name: "Invite User to Channel",
7
- description: "Invite one or more users to an existing channel. Accepts a channel ID or NAME, and a user ID, EMAIL address or display name — all resolved automatically. Pass several users as a comma-separated list. [See the documentation](https://api.slack.com/methods/conversations.invite)",
8
- version: "0.1.5",
7
+ description: "Invite one or more users to an existing channel. Accepts a channel ID (preferred — resolves instantly) or NAME (resolved by scanning up to 5 pages, ~5,000 channels, of the workspace's channel list — a name beyond that bound will not be found), and a user ID, EMAIL address or display name — all resolved automatically. Pass several users as a comma-separated list. [See the documentation](https://api.slack.com/methods/conversations.invite)",
8
+ version: "0.1.6",
9
9
  annotations: {
10
10
  destructiveHint: false,
11
11
  openWorldHint: true,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-kick-user",
5
5
  name: "Kick User",
6
6
  description: "Remove a user from a conversation. [See the documentation](https://api.slack.com/methods/conversations.kick)",
7
- version: "0.0.35",
7
+ version: "0.0.36",
8
8
  annotations: {
9
9
  destructiveHint: true,
10
10
  openWorldHint: true,
@@ -28,12 +28,15 @@ export default {
28
28
  },
29
29
  },
30
30
  async run({ $ }) {
31
+ // conversations.kick only accepts a channel ID — resolve a name (or user ID, for a
32
+ // DM) the same way every other AI-optimized tool in this app does.
33
+ const channel = await this.slack.resolveChannelId(this.conversation);
31
34
  try {
32
35
  const response = await this.slack.kickUserFromConversation({
33
- channel: this.conversation,
36
+ channel,
34
37
  user: this.user,
35
38
  });
36
- $.export("$summary", `Successfully kicked user ${this.user} from channel with ID ${this.conversation}`);
39
+ $.export("$summary", `Successfully kicked user ${this.user} from channel with ID ${channel}`);
37
40
  return response;
38
41
  } catch (error) {
39
42
  if (`${error}`.includes("not_in_channel")) {
@@ -15,7 +15,7 @@ export default {
15
15
  + " fetched — when you see that, raise `numPages` (or pass `cursor`) before answering"
16
16
  + " any 'how many' or 'list every' question, otherwise your answer is silently incomplete."
17
17
  + " [See the documentation](https://api.slack.com/methods/conversations.list)",
18
- version: "0.3.3",
18
+ version: "0.3.4",
19
19
  annotations: {
20
20
  destructiveHint: false,
21
21
  openWorldHint: true,
@@ -5,7 +5,7 @@ export default {
5
5
  name: "List Emojis",
6
6
  description:
7
7
  "List all available emojis in the Slack workspace. Optionally include emoji image URLs. [See the documentation](https://api.slack.com/methods/emoji.list)",
8
- version: "0.0.9",
8
+ version: "0.0.10",
9
9
  annotations: {
10
10
  destructiveHint: false,
11
11
  openWorldHint: true,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-list-files",
5
5
  name: "List Files",
6
6
  description: "Return a list of files within a team. [See the documentation](https://api.slack.com/methods/files.list)",
7
- version: "0.1.10",
7
+ version: "0.1.11",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -10,7 +10,7 @@ export default {
10
10
  + " Returns `has_more: true` and `next_cursor` when more conversations exist than were"
11
11
  + " fetched — raise `numPages` (or pass `cursor`) to see the rest."
12
12
  + " [See the documentation](https://api.slack.com/methods/conversations.list)",
13
- version: "0.0.4",
13
+ version: "0.0.5",
14
14
  annotations: {
15
15
  destructiveHint: false,
16
16
  openWorldHint: true,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-list-group-members",
5
5
  name: "List Group Members",
6
6
  description: "List all users in a User Group. [See the documentation](https://api.slack.com/methods/usergroups.users.list)",
7
- version: "0.0.19",
7
+ version: "0.0.20",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-list-icon-emoji-options",
5
5
  name: "List Icon (emoji) Options",
6
6
  description: "Retrieves available options for the Icon (emoji) field. [See the documentation](https://api.slack.com/methods/emoji.list)",
7
- version: "0.0.7",
7
+ version: "0.0.8",
8
8
  type: "action",
9
9
  ai: "optimized",
10
10
  annotations: {
@@ -3,8 +3,8 @@ import slack from "../../slack_v2.app.mjs";
3
3
  export default {
4
4
  key: "slack_v2-list-members-in-channel",
5
5
  name: "List Members in Channel",
6
- description: "Retrieve members of a channel. Accepts a channel ID or NAME (e.g. general or #general) — names are resolved automatically. [See the documentation](https://api.slack.com/methods/conversations.members)",
7
- version: "0.1.5",
6
+ description: "Retrieve members of a channel. Accepts a channel ID (preferred — resolves instantly) or NAME (e.g. general or #general), resolved by scanning up to 5 pages (~5,000 channels) of the workspace's channel list — a name beyond that bound will not be found. [See the documentation](https://api.slack.com/methods/conversations.members)",
7
+ version: "0.1.6",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -9,7 +9,7 @@ export default {
9
9
  + " selection to keep responses small, and returns the same message data."
10
10
  + " This legacy tool remains only for existing workflows: it accepts a raw conversation ID and"
11
11
  + " returns full, untrimmed message objects. [See the documentation](https://api.slack.com/methods/conversations.history)",
12
- version: "0.0.10",
12
+ version: "0.0.11",
13
13
  annotations: {
14
14
  destructiveHint: false,
15
15
  openWorldHint: true,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-list-reminder-options",
5
5
  name: "List Reminder Options",
6
6
  description: "Retrieves available options for the Reminder field. [See the documentation](https://docs.slack.dev/reference/methods/reminders.list)",
7
- version: "0.0.7",
7
+ version: "0.0.8",
8
8
  type: "action",
9
9
  ai: "optimized",
10
10
  annotations: {
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-list-replies",
5
5
  name: "List Replies",
6
6
  description: "Retrieve a thread of messages posted to a conversation. [See the documentation](https://api.slack.com/methods/conversations.replies)",
7
- version: "0.0.35",
7
+ version: "0.0.36",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -40,9 +40,12 @@ export default {
40
40
  },
41
41
  },
42
42
  async run({ $ }) {
43
+ // conversations.replies only accepts a channel ID — resolve a name the same way
44
+ // every other AI-optimized tool in this app does.
45
+ const channel = await this.slack.resolveChannelId(this.conversation);
43
46
  const replies = [];
44
47
  const params = {
45
- channel: this.conversation,
48
+ channel,
46
49
  ts: this.timestamp,
47
50
  limit: this.pageSize,
48
51
  };
@@ -14,7 +14,7 @@ export default {
14
14
  + " Returns `has_more: true` and `next_cursor` when more teams exist than were"
15
15
  + " fetched — raise `numPages` (or pass `cursor`) to see the rest."
16
16
  + " [See the documentation](https://api.slack.com/methods/auth.teams.list)",
17
- version: "0.0.4",
17
+ version: "0.0.5",
18
18
  annotations: {
19
19
  destructiveHint: false,
20
20
  openWorldHint: true,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-list-user-group-options",
5
5
  name: "List User Group Options",
6
6
  description: "Retrieves available options for the User Group field. [See the documentation](https://docs.slack.dev/reference/methods/usergroups.list)",
7
- version: "0.0.7",
7
+ version: "0.0.8",
8
8
  type: "action",
9
9
  ai: "optimized",
10
10
  annotations: {
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-list-users",
5
5
  name: "List Users",
6
6
  description: "Return a list of all users in a workspace. [See the documentation](https://api.slack.com/methods/users.list)",
7
- version: "0.0.34",
7
+ version: "0.0.35",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -11,7 +11,7 @@ export default {
11
11
  + " To reply to a thread, provide `threadTs` (Slack calls this `thread_ts`) from **Get Channel History**."
12
12
  + " Supports plain text with Slack mrkdwn formatting and Block Kit blocks."
13
13
  + " [See the documentation](https://api.slack.com/methods/chat.postMessage)",
14
- version: "0.0.8",
14
+ version: "0.0.9",
15
15
  type: "action",
16
16
  ai: "optimized",
17
17
  annotations: {
@@ -13,7 +13,7 @@ export default {
13
13
  + " (e.g. `1403051575.000407`); get it from **Get Channel History** or an incoming event's"
14
14
  + " `ts` field. For a plain, non-threaded message use **Post Message** instead."
15
15
  + " [See the documentation](https://api.slack.com/methods/chat.postMessage)",
16
- version: "0.2.10",
16
+ version: "0.2.11",
17
17
  annotations: {
18
18
  destructiveHint: false,
19
19
  openWorldHint: true,
@@ -14,7 +14,7 @@ export default {
14
14
  + " omitted when no mention carried a name."
15
15
  + " Do NOT splice a name back inline: Slack renders `<@U123|Name>` as literal text, not a mention."
16
16
  + " [See the documentation](https://api.slack.com/methods/assistant.search.context)",
17
- version: "0.1.2",
17
+ version: "0.1.3",
18
18
  type: "action",
19
19
  ai: "optimized",
20
20
  annotations: {
@@ -7,7 +7,7 @@ export default {
7
7
  key: "slack_v2-send-block-kit-message",
8
8
  name: "Build and Send a Block Kit Message",
9
9
  description: "Configure custom blocks and send to a channel, group, or user. [See the documentation](https://api.slack.com/tools/block-kit-builder).",
10
- version: "0.5.10",
10
+ version: "0.5.11",
11
11
  annotations: {
12
12
  destructiveHint: false,
13
13
  openWorldHint: true,
@@ -5,7 +5,7 @@ export default {
5
5
  key: "slack_v2-send-large-message",
6
6
  name: "Send a Large Message (3000+ characters)",
7
7
  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",
8
- version: "0.1.10",
8
+ version: "0.1.11",
9
9
  annotations: {
10
10
  destructiveHint: false,
11
11
  openWorldHint: true,
@@ -6,7 +6,7 @@ export default {
6
6
  key: "slack_v2-send-message",
7
7
  name: "Send Message",
8
8
  description: "Send a message to a user, group, private channel or public channel. [See the documentation](https://api.slack.com/methods/chat.postMessage)",
9
- version: "0.2.3",
9
+ version: "0.2.4",
10
10
  annotations: {
11
11
  destructiveHint: false,
12
12
  openWorldHint: true,
@@ -8,7 +8,7 @@ export default {
8
8
  key: "slack_v2-send-message-advanced",
9
9
  name: "Send Message (Advanced)",
10
10
  description: "Customize advanced settings 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",
11
- version: "0.1.10",
11
+ version: "0.1.11",
12
12
  annotations: {
13
13
  destructiveHint: false,
14
14
  openWorldHint: true,
@@ -11,7 +11,7 @@ export default {
11
11
  + " replies and unfurl settings. Use this tool only if a workflow specifically needs to"
12
12
  + " target a channel exclusively, without the user/group support **Post Message** offers."
13
13
  + " [See the documentation](https://api.slack.com/methods/chat.postMessage)",
14
- version: "0.2.3",
14
+ version: "0.2.4",
15
15
  annotations: {
16
16
  destructiveHint: false,
17
17
  openWorldHint: true,
@@ -6,7 +6,7 @@ export default {
6
6
  key: "slack_v2-send-message-to-user-or-group",
7
7
  name: "Send Message to User or Group",
8
8
  description: "Send a message to a user or group. [See the documentation](https://api.slack.com/methods/chat.postMessage)",
9
- version: "0.2.3",
9
+ version: "0.2.4",
10
10
  annotations: {
11
11
  destructiveHint: false,
12
12
  openWorldHint: true,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-set-channel-description",
5
5
  name: "Set Channel Description",
6
6
  description: "Change the description or purpose of a channel. [See the documentation](https://api.slack.com/methods/conversations.setPurpose)",
7
- version: "0.0.20",
7
+ version: "0.0.21",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -28,11 +28,14 @@ export default {
28
28
  },
29
29
  },
30
30
  async run({ $ }) {
31
+ // conversations.setPurpose only accepts a channel ID — resolve a name the same way
32
+ // every other AI-optimized tool in this app does.
33
+ const channel = await this.slack.resolveChannelId(this.conversation);
31
34
  const response = await this.slack.setChannelDescription({
32
- channel: this.conversation,
35
+ channel,
33
36
  purpose: this.purpose,
34
37
  });
35
- $.export("$summary", `Successfully set description for channel with ID ${this.conversation}`);
38
+ $.export("$summary", `Successfully set description for channel with ID ${channel}`);
36
39
  return response;
37
40
  },
38
41
  };
@@ -3,8 +3,8 @@ import slack from "../../slack_v2.app.mjs";
3
3
  export default {
4
4
  key: "slack_v2-set-channel-topic",
5
5
  name: "Set Channel Topic",
6
- description: "Set the topic on a channel, specified by ID or by name — names are resolved automatically. [See the documentation](https://api.slack.com/methods/conversations.setTopic)",
7
- version: "0.1.5",
6
+ description: "Set the topic on a channel, specified by ID (preferred — resolves instantly) or by name (resolved by scanning up to 5 pages, ~5,000 channels, of the workspace's channel list — a name beyond that bound will not be found). [See the documentation](https://api.slack.com/methods/conversations.setTopic)",
7
+ version: "0.1.6",
8
8
  annotations: {
9
9
  destructiveHint: true,
10
10
  openWorldHint: true,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-set-status",
5
5
  name: "Set Status",
6
6
  description: "Set the current status for a user. [See the documentation](https://api.slack.com/methods/users.profile.set)",
7
- version: "0.0.19",
7
+ version: "0.0.20",
8
8
  annotations: {
9
9
  destructiveHint: true,
10
10
  openWorldHint: true,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-update-group-members",
5
5
  name: "Update Group Members",
6
6
  description: "Update the list of users for a User Group. [See the documentation](https://api.slack.com/methods/usergroups.users.update)",
7
- version: "0.0.20",
7
+ version: "0.0.21",
8
8
  annotations: {
9
9
  destructiveHint: true,
10
10
  openWorldHint: true,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack_v2-update-message",
5
5
  name: "Update Message",
6
6
  description: "Update a message. [See the documentation](https://api.slack.com/methods/chat.update)",
7
- version: "0.2.10",
7
+ version: "0.2.11",
8
8
  annotations: {
9
9
  destructiveHint: true,
10
10
  openWorldHint: true,
@@ -5,7 +5,7 @@ export default {
5
5
  key: "slack_v2-update-profile",
6
6
  name: "Update Profile",
7
7
  description: "Update basic profile field such as name or title. [See the documentation](https://api.slack.com/methods/users.profile.set)",
8
- version: "0.0.35",
8
+ version: "0.0.36",
9
9
  annotations: {
10
10
  destructiveHint: true,
11
11
  openWorldHint: true,
@@ -8,7 +8,7 @@ export default {
8
8
  key: "slack_v2-upload-file",
9
9
  name: "Upload File",
10
10
  description: "Upload a file. [See the documentation](https://api.slack.com/messaging/files#uploading_files)",
11
- version: "0.1.14",
11
+ version: "0.1.15",
12
12
  annotations: {
13
13
  destructiveHint: false,
14
14
  openWorldHint: true,
@@ -5,7 +5,7 @@ export default {
5
5
  key: "slack_v2-verify-slack-signature",
6
6
  name: "Verify Slack Signature",
7
7
  description: "Verifying requests from Slack, slack signs its requests using a secret that's unique to your app. `Request Body` must be the raw request body as a string (not a parsed object) — Slack computes its signature over the exact raw bytes it sent, so re-serializing a parsed object will not match. [See the documentation](https://api.slack.com/authentication/verifying-requests-from-slack)",
8
- version: "1.0.3",
8
+ version: "1.0.4",
9
9
  annotations: {
10
10
  destructiveHint: false,
11
11
  openWorldHint: true,
@@ -4,6 +4,11 @@ const LIMIT = 250;
4
4
  // external Slack Connect users) would otherwise force a full directory scan
5
5
  // and exhaust the method's rate limit.
6
6
  const MAX_NAME_LOOKUP_PAGES = 5;
7
+ // Caps `conversations.list` pagination when resolving a channel NAME to an id
8
+ // (at 999/page, 5 pages covers ~5000 channels). Without a cap, a channel name
9
+ // that doesn't exist (typo, wrong workspace) forces a full workspace scan —
10
+ // on a large workspace that alone can exhaust conversations.list's rate limit.
11
+ const MAX_CHANNEL_RESOLVE_PAGES = 5;
7
12
 
8
13
  const CHANNEL_TYPE = {
9
14
  PUBLIC: "public_channel",
@@ -45,6 +50,7 @@ export default {
45
50
  MAX_RESOURCES,
46
51
  LIMIT,
47
52
  MAX_NAME_LOOKUP_PAGES,
53
+ MAX_CHANNEL_RESOLVE_PAGES,
48
54
  CHANNEL_TYPE,
49
55
  CHANNEL_TYPE_OPTIONS,
50
56
  BLOCK_TYPES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/slack_v2",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Pipedream Slack_v2 Components",
5
5
  "main": "slack_v2.app.mjs",
6
6
  "keywords": [
package/slack_v2.app.mjs CHANGED
@@ -32,7 +32,7 @@ export default {
32
32
  conversation: {
33
33
  type: "string",
34
34
  label: "Channel",
35
- description: "A channel ID (e.g. `C1234567890`), or, depending on the action, a user ID (opens a direct message) or a group DM ID. Use **List Channels** to look up channel IDs, **Find User by Email** / **Find User by ID** to resolve a user ID, or **List Group Conversations** for group DM IDs.",
35
+ description: "**Prefer a channel ID** (e.g. `C1234567890`) — use **List Channels** to look it up; it resolves instantly. A channel NAME (e.g. `general` or `#general`) is also accepted, but resolving it scans up to 5 conversations.list pages (~5,000 channels), which is slow and, on large workspaces, can be rate-limited or fail with a ConfigurationError if the channel is beyond that bound — pass the ID whenever you have it. Depending on the action, this may also accept a user ID (opens a direct message) or a group DM ID — use **Find User by Email** / **Find User by ID** to resolve a user ID, or **List Group Conversations** for group DM IDs.",
36
36
  },
37
37
  channelId: {
38
38
  type: "string",
@@ -359,13 +359,13 @@ export default {
359
359
  const statusCode = get(error, "code");
360
360
  if (statusCode === "slack_webapi_rate_limited_error") {
361
361
  if (throwRateLimitError) {
362
- bail(`Rate limit exceeded. ${error}`);
362
+ bail(error);
363
363
  } else {
364
364
  console.log(`Rate limit exceeded. Will retry in ${retryOpts.minTimeout / 1000} seconds`);
365
365
  throw error;
366
366
  }
367
367
  }
368
- bail(`${error}`);
368
+ bail(error);
369
369
  }
370
370
  }, retryOpts);
371
371
  },
@@ -954,7 +954,14 @@ export default {
954
954
  }
955
955
  const name = input.replace(/^#/, "").toLowerCase();
956
956
  let cursor;
957
+ let pages = 0;
957
958
  do {
959
+ // Fail fast on a 429 instead of _withRetries' default backoff (min 30s, up to 3
960
+ // retries) — that backoff, hit mid-scan, is what turns a channel name lookup into
961
+ // a multi-minute stall that looks like a hang to callers with their own timeout
962
+ // budget. Let it (and any other API error — auth, scope, network) propagate with
963
+ // its original status/code; ConfigurationError below is reserved for the genuine
964
+ // user-input problem of a name that doesn't resolve to any channel.
958
965
  const {
959
966
  channels, response_metadata: { next_cursor: nextCursor },
960
967
  } = await this.conversationsList({
@@ -962,12 +969,21 @@ export default {
962
969
  limit: 999,
963
970
  cursor,
964
971
  exclude_archived: true,
972
+ throwRateLimitError: true,
965
973
  });
966
974
  const match = channels.find((c) => c.name === name);
967
975
  if (match) return match.id;
968
976
  cursor = nextCursor;
969
- } while (cursor);
970
- throw new Error(`Channel "${input}" not found. Provide a valid channel ID or name.`);
977
+ // Cap pagination: an unmatched name (typo, wrong workspace) would otherwise force
978
+ // a full workspace scan every time, which on a large workspace can alone exhaust
979
+ // conversations.list's rate limit.
980
+ } while (cursor && ++pages < constants.MAX_CHANNEL_RESOLVE_PAGES);
981
+ throw new ConfigurationError(
982
+ `Channel "${input}" not found${pages >= constants.MAX_CHANNEL_RESOLVE_PAGES
983
+ ? ` after scanning ${constants.MAX_CHANNEL_RESOLVE_PAGES * 999}+ channels (this workspace may have more)`
984
+ : ""
985
+ }. Provide a valid channel ID instead — use List Channels to look it up.`,
986
+ );
971
987
  },
972
988
  },
973
989
  };
@@ -5,7 +5,7 @@ export default {
5
5
  ...common,
6
6
  key: "slack_v2-new-channel-created",
7
7
  name: "New Channel Created (Instant)",
8
- version: "0.0.19",
8
+ version: "0.0.20",
9
9
  description: "Emit new event when a new channel is created.",
10
10
  type: "source",
11
11
  dedupe: "unique",
@@ -3,7 +3,7 @@ import sampleEmit from "./test-event.mjs";
3
3
 
4
4
  export default {
5
5
  name: "New Interaction Events (Instant)",
6
- version: "0.0.30",
6
+ version: "0.0.31",
7
7
  key: "slack_v2-new-interaction-event-received",
8
8
  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).",
9
9
  type: "source",
@@ -7,7 +7,7 @@ export default {
7
7
  ...common,
8
8
  key: "slack_v2-new-keyword-mention",
9
9
  name: "New Keyword Mention (Instant)",
10
- version: "0.1.9",
10
+ version: "0.1.10",
11
11
  description: "Emit new event when a specific keyword is mentioned in a channel",
12
12
  type: "source",
13
13
  dedupe: "unique",
@@ -7,7 +7,7 @@ export default {
7
7
  ...common,
8
8
  key: "slack_v2-new-message-in-channels",
9
9
  name: "New Message In Channels (Instant)",
10
- version: "1.1.9",
10
+ version: "1.1.10",
11
11
  description: "Emit new event when a new message is posted to one or more channels",
12
12
  type: "source",
13
13
  dedupe: "unique",
@@ -4,7 +4,7 @@ export default {
4
4
  ...common,
5
5
  key: "slack_v2-new-private-channel-created",
6
6
  name: "New Private Channel Created",
7
- version: "0.0.9",
7
+ version: "0.0.10",
8
8
  description: "Emit new event when a new private channel is created. [See the documentation](https://api.slack.com/methods/conversations.list)",
9
9
  type: "source",
10
10
  dedupe: "unique",
@@ -5,7 +5,7 @@ export default {
5
5
  ...common,
6
6
  key: "slack_v2-new-reaction-added",
7
7
  name: "New Reaction Added (Instant)",
8
- version: "1.2.9",
8
+ version: "1.2.10",
9
9
  description: "Emit new event when a member has added an emoji reaction to a message",
10
10
  type: "source",
11
11
  dedupe: "unique",
@@ -5,7 +5,7 @@ export default {
5
5
  ...common,
6
6
  key: "slack_v2-new-saved-message",
7
7
  name: "New Saved Message (Instant)",
8
- version: "0.0.15",
8
+ version: "0.0.16",
9
9
  description: "Emit new event when a message is saved. Note: The endpoint is marked as deprecated, and Slack might shut this off at some point down the line.",
10
10
  type: "source",
11
11
  dedupe: "unique",
@@ -5,7 +5,7 @@ export default {
5
5
  ...common,
6
6
  key: "slack_v2-new-user-added",
7
7
  name: "New User Added (Instant)",
8
- version: "0.0.13",
8
+ version: "0.0.14",
9
9
  description: "Emit new event when a new member joins a workspace.",
10
10
  type: "source",
11
11
  dedupe: "unique",
@@ -7,7 +7,7 @@ export default {
7
7
  ...common,
8
8
  key: "slack_v2-new-user-mention",
9
9
  name: "New User Mention (Instant)",
10
- version: "0.1.9",
10
+ version: "0.1.10",
11
11
  description: "Emit new event when a username or specific keyword is mentioned in a channel",
12
12
  type: "source",
13
13
  dedupe: "unique",