AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
feat(slack): step form (#15472)
Talal Jaberc94bf2f76ccc
diff --git a/packages/pieces/community/slack/package.json b/packages/pieces/community/slack/package.jsonindex 2dabe4da5ad..1576d00a7f0 100644--- a/packages/pieces/community/slack/package.json+++ b/packages/pieces/community/slack/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-slack",- "version": "0.19.0",+ "version": "0.20.0","main": "./dist/src/index.js","types": "./dist/src/index.d.ts","dependencies": {diff --git a/packages/pieces/community/slack/src/i18n/translation.json b/packages/pieces/community/slack/src/i18n/translation.jsonindex 473ea129874..593e2eed965 100644--- a/packages/pieces/community/slack/src/i18n/translation.json+++ b/packages/pieces/community/slack/src/i18n/translation.json@@ -2,25 +2,26 @@"Channel-based messaging platform": "Channel-based messaging platform","Add Reaction to Message": "Add Reaction to Message","Send Message To A User": "Send Message To A User",+ "Send Message To Multiple Users": "Send Message To Multiple Users","Send Message To A Channel": "Send Message To A Channel","Request Approval from A User": "Request Approval from A User","Request Approval in a Channel": "Request Approval in a Channel","Request Action from A User": "Request Action from A User","Request Action in A Channel": "Request Action in A Channel",- "Upload file": "Upload file",+ "Upload File": "Upload File","Get File": "Get File",- "Search messages": "Search messages",+ "Search Messages": "Search Messages","Find User by Email": "Find User by Email","Find User by Handle": "Find User by Handle","Find User by ID": "Find User by ID",- "List users": "List users",- "Update message": "Update message",+ "List Users": "List Users",+ "Update Message": "Update Message","Delete Message": "Delete Message","Create Channel": "Create Channel","Update Profile": "Update Profile",- "Get channel history": "Get channel history",+ "Get Channel History": "Get Channel History","Set User Status": "Set User Status",- "Markdown to Slack format": "Markdown to Slack format",+ "Markdown to Slack Format": "Markdown to Slack Format","Retrieve Thread Messages": "Retrieve Thread Messages","Set Channel Topic": "Set Channel Topic","Get Message by Timestamp": "Get Message by Timestamp",@@ -32,16 +33,12 @@"Schedule Message": "Schedule Message","List Scheduled Messages": "List Scheduled Messages","Delete Scheduled Message": "Delete Scheduled Message",- "Update Message": "Update Message","Send Ephemeral Message": "Send Ephemeral Message","Get Message Permalink": "Get Message Permalink",- "Get Channel History": "Get Channel History","Get Thread Replies": "Get Thread Replies",- "Search Messages": "Search Messages","Search All": "Search All","Mark Conversation Read": "Mark Conversation Read","Get User": "Get User",- "List Users": "List Users","Add Reaction": "Add Reaction","Archive Channel": "Archive Channel","Close Direct Message": "Close Direct Message",@@ -66,30 +63,31 @@"Custom API Call": "Custom API Call","Add an emoji reaction to a message.": "Add an emoji reaction to a message.","Send message to a user": "Send message to a user",+ "Send a direct message to many users at once, in parallel.": "Send a direct message to many users at once, in parallel.","Send message to a channel": "Send message to a channel",- "Send approval message to a user and then wait until the message is approved or disapproved": "Send approval message to a user and then wait until the message is approved or disapproved",- "Send approval message to a channel and then wait until the message is approved or disapproved": "Send approval message to a channel and then wait until the message is approved or disapproved",+ "Sends approve/reject buttons to a user and waits for the answer.": "Sends approve/reject buttons to a user and waits for the answer.",+ "Sends approve/reject buttons to a channel and waits for the answer.": "Sends approve/reject buttons to a channel and waits for the answer.","Send a message to a user and wait until the user selects an action": "Send a message to a user and wait until the user selects an action","Send a message in a channel and wait until an action is selected": "Send a message in a channel and wait until an action is selected",- "Upload file without sharing it to a channel or user": "Upload file without sharing it to a channel or user",+ "Uploads a file, optionally into a channel.": "Uploads a file, optionally into a channel.","Return information about a given file ID.": "Return information about a given file ID.",- "Searches for messages matching a query": "Searches for messages matching a query",+ "Searches messages. Needs a user token.": "Searches messages. Needs a user token.","Finds a user by matching against their email address.": "Finds a user by matching against their email address.","Finds a user by matching against their Slack handle.": "Finds a user by matching against their Slack handle.",- "Finds a user by their ID.": "Finds a user by their ID.",+ "Returns the profile of a user by ID.": "Returns the profile of a user by ID.","List all users of the workspace": "List all users of the workspace","Update an existing message": "Update an existing message",- "Deletes a specific message from a channel using the message's timestamp.": "Deletes a specific message from a channel using the message's timestamp.",+ "Deletes a message. Needs a user token.": "Deletes a message. Needs a user token.","Creates a new channel.": "Creates a new channel.",- "Update basic profile field such as name or title.": "Update basic profile field such as name or title.",- "Retrieve all messages from a specific channel (\"conversation\") between specified timestamps": "Retrieve all messages from a specific channel (\"conversation\") between specified timestamps",- "Sets a user's custom status": "Sets a user's custom status",- "Convert Markdown-formatted text to Slack's pseudo - markdown syntax": "Convert Markdown-formatted text to Slack's pseudo - markdown syntax",+ "Updates name, email or title. Needs a user token.": "Updates name, email or title. Needs a user token.",+ "Lists messages in a channel, newest first, within a time window.": "Lists messages in a channel, newest first, within a time window.",+ "Sets the connected user's status. Needs a user token.": "Sets the connected user's status. Needs a user token.",+ "Converts Markdown text to Slack's mrkdwn syntax.": "Converts Markdown text to Slack's mrkdwn syntax.","Retrieves thread messages by channel and thread timestamp.": "Retrieves thread messages by channel and thread timestamp.","Sets the topic on a selected channel.": "Sets the topic on a selected channel.","Retrieves a specific message from a channel history using the message's timestamp.": "Retrieves a specific message from a channel history using the message's timestamp.","Invites an existing User to an existing channel.": "Invites an existing User to an existing channel.",- "Finds a Slack user group by its handle (e.g., @user-group) and returns its details. To mention this group in a message, map the returned ID using the syntax <!subteam^ID>. Read more: https://api.slack.com/reference/surfaces/formatting#mentioning-groups": "Finds a Slack user group by its handle (e.g., @user-group) and returns its details. To mention this group in a message, map the returned ID using the syntax <!subteam^ID>. Read more: https://api.slack.com/reference/surfaces/formatting#mentioning-groups",+ "Finds a user group by handle and returns its ID.": "Finds a user group by handle and returns its ID.","Add users to or overwrite the member list of a Slack user group.": "Add users to or overwrite the member list of a Slack user group.","Post a message to a Slack channel.": "Post a message to a Slack channel.","Send a direct message (DM) to a single Slack user.": "Send a direct message (DM) to a single Slack user.",@@ -101,7 +99,7 @@"Post a message visible only to one user within a channel.": "Post a message visible only to one user within a channel.","Get a shareable permalink URL for a specific message.": "Get a shareable permalink URL for a specific message.","Retrieve top-level messages from a Slack channel, optionally bounded by timestamps.": "Retrieve top-level messages from a Slack channel, optionally bounded by timestamps.",- "Retrieve all replies in a Slack thread.": "Retrieve all replies in a Slack thread.",+ "Retrieve the replies in a Slack thread.": "Retrieve the replies in a Slack thread.","Search the workspace for messages matching a query.": "Search the workspace for messages matching a query.","Search the workspace for both messages and files.": "Search the workspace for both messages and files.","Move the read cursor in a channel up to a given message.": "Move the read cursor in a channel up to a given message.",@@ -138,57 +136,58 @@"Markdown": "Markdown","Channel": "Channel","Message Timestamp": "Message Timestamp",- "Reaction (emoji) name": "Reaction (emoji) name",- "React as user?": "React as user?",+ "Emoji": "Emoji",+ "React as User": "React as User","User": "User","Message": "Message","Username": "Username","Profile Picture": "Profile Picture","Icon Emoji": "Icon Emoji",- "Mention flow of origin?": "Mention flow of origin?",- "Block Kit blocks": "Block Kit blocks",+ "Mention Origin Flow": "Mention Origin Flow",+ "Block Kit Blocks": "Block Kit Blocks","Unfurl Links": "Unfurl Links",- "Send as a bot?": "Send as a bot?",- "Reply to Thread (Thread Message Link/Timestamp)": "Reply to Thread (Thread Message Link/Timestamp)",+ "Message Mode": "Message Mode",+ "Recipients": "Recipients",+ "Parallel Sends": "Parallel Sends",+ "Send as Bot": "Send as Bot",+ "Reply to Thread": "Reply to Thread","Attachment": "Attachment",- "Broadcast reply to channel": "Broadcast reply to channel",+ "Also Post to Channel": "Also Post to Channel","Action Buttons": "Action Buttons",+ "File": "File","Title": "Title","Filename": "Filename","File ID": "File ID",- "Search query": "Search query",+ "Search Query": "Search Query","Email": "Email","Handle": "Handle",- "ID": "ID",- "Include bots?": "Include bots?",- "Include disabled users?": "Include disabled users?",+ "User ID": "User ID",+ "Include Bots": "Include Bots",+ "Include Deactivated Users": "Include Deactivated Users","Channel Name": "Channel Name",- "Is Private?": "Is Private?",+ "Private Channel": "Private Channel","First Name": "First Name","Last Name": "Last Name","Oldest": "Oldest","Latest": "Latest","Inclusive": "Inclusive",- "Include all metadata": "Include all metadata",- "Text": "Text",- "Emoji": "Emoji",- "Expires at": "Expires at",- "Markdown text": "Markdown text",- "Thread ts": "Thread ts",+ "Include All Metadata": "Include All Metadata",+ "Status Text": "Status Text",+ "Expires At": "Expires At",+ "Markdown Text": "Markdown Text",+ "Thread Timestamp": "Thread Timestamp",+ "Continue From Cursor": "Continue From Cursor","Topic": "Topic","Group Handle": "Group Handle","User IDs": "User IDs",- "Append to existing members?": "Append to existing members?",- "Thread Timestamp": "Thread Timestamp",+ "Append to Existing Members": "Append to Existing Members","Broadcast Reply to Channel": "Broadcast Reply to Channel","Send as User": "Send as User",- "Block Kit Blocks": "Block Kit Blocks",- "User ID": "User ID","Post At (Unix Seconds)": "Post At (Unix Seconds)","Scheduled Message ID": "Scheduled Message ID",- "Search Query": "Search Query","Timestamp": "Timestamp","Conversation": "Conversation",+ "Is Private?": "Is Private?","Exclude Archived": "Exclude Archived","Include Member Count": "Include Member Count","Channel ID": "Channel ID",@@ -200,6 +199,8 @@"Limit": "Limit","Include disabled groups?": "Include disabled groups?","Include members?": "Include members?",+ "Reaction (emoji) name": "Reaction (emoji) name",+ "React as user?": "React as user?","New Name": "New Name","Purpose": "Purpose","Method": "Method",@@ -207,42 +208,61 @@"Query Parameters": "Query Parameters","Body Type": "Body Type","Body": "Body",- "Response is Binary ?": "Response is Binary ?",- "No Error on Failure": "No Error on Failure",- "Timeout (in seconds)": "Timeout (in seconds)",+ "Response is Binary": "Response is Binary",+ "Return Error as Output": "Return Error as Output",+ "Timeout": "Timeout","Follow redirects": "Follow redirects",- "Use user token": "Use user token",- "\n\tPlease make sure add the bot to the channel by following these steps:\n\t 1. Type /invite in the channel's chat.\n\t 2. Click on Add apps to this channel.\n\t 3. Search for and add the bot.\n \n**Note**: If you can't find the channel in the dropdown list (which fetches up to 2000 channels), please click on the **(F)** and type the channel ID directly.\n ": "\n\tPlease make sure add the bot to the channel by following these steps:\n\t 1. Type /invite in the channel's chat.\n\t 2. Click on Add apps to this channel.\n\t 3. Search for and add the bot.\n \n**Note**: If you can't find the channel in the dropdown list (which fetches up to 2000 channels), please click on the **(F)** and type the channel ID directly.\n ",- "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'": "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'",- "Please provide the timestamp of the message you wish to react, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.": "Please provide the timestamp of the message you wish to react, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.",- "e.g.`thumbsup`": "e.g.`thumbsup`",- "If enabled, the reaction will be added as the authenticated user instead of the bot.": "If enabled, the reaction will be added as the authenticated user instead of the bot.",- "The username of the bot": "The username of the bot",- "The profile picture of the bot": "The profile picture of the bot",- "The icon emoji of the bot": "The icon emoji of the bot",- "If checked, adds a mention at the end of the Slack message to indicate which flow sent the notification, with a link to said flow.": "If checked, adds a mention at the end of the Slack message to indicate which flow sent the notification, with a link to said flow.",- "See https://api.slack.com/block-kit for specs": "See https://api.slack.com/block-kit for specs",- "Enable link unfurling for this message": "Enable link unfurling for this message",- "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications.": "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications.",- "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.": "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.",- "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)": "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)",- "You can pass the file ID from the New Message Trigger payload.": "You can pass the file ID from the New Message Trigger payload.",- "User handle (display name), without the leading @": "User handle (display name), without the leading @",- "Please provide the timestamp of the message you wish to update, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.": "Please provide the timestamp of the message you wish to update, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.",- "The updated text of your message": "The updated text of your message",- "Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.": "Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.",- "Changing a user's email address will send an email to both the old and new addresses, and also post a slackbot message to the user informing them of the change.": "Changing a user's email address will send an email to both the old and new addresses, and also post a slackbot message to the user informing them of the change.",- "ID of user to change. This argument may only be specified by admins on paid teams.You can use **Find User by Email** action to retrieve ID.": "ID of user to change. This argument may only be specified by admins on paid teams.You can use **Find User by Email** action to retrieve ID.",- "Only messages after this timestamp will be included in results": "Only messages after this timestamp will be included in results",- "Only messages before this timestamp will be included in results. Default is the current time": "Only messages before this timestamp will be included in results. Default is the current time",- "Include messages with oldest or latest timestamps in results. Ignored unless either timestamp is specified": "Include messages with oldest or latest timestamps in results. Ignored unless either timestamp is specified",- "Return all metadata associated with each message": "Return all metadata associated with each message",- "Emoji shortname (standard or custom), e.g. :tada: or :train:": "Emoji shortname (standard or custom), e.g. :tada: or :train:",- "Unix timestamp - if not set, the status will not expire": "Unix timestamp - if not set, the status will not expire",- "Provide the ts (timestamp) value of the **parent** message to retrieve replies of this message. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.": "Provide the ts (timestamp) value of the **parent** message to retrieve replies of this message. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.",- "Group handle without the leading @": "Group handle without the leading @",- "The list of Slack User IDs to update this group with. Leave empty to clear the group (if not appending).": "The list of Slack User IDs to update this group with. Leave empty to clear the group (if not appending).",- "If checked, these users will be added to the current group. If unchecked, the current group members will be completely replaced by these users.": "If checked, these users will be added to the current group. If unchecked, the current group members will be completely replaced by these users.",+ "Use User Token": "Use User Token",+ "The list shows the first 2000 channels. Can't find yours? Invite the bot: type **/invite** in the channel, choose **Add apps** and pick the bot. Or click **ƒ** and paste the channel ID.": "The list shows the first 2000 channels. Can't find yours? Invite the bot: type **/invite** in the channel, choose **Add apps** and pick the bot. Or click **ƒ** and paste the channel ID.",+ "Private channels appear only after the bot is added to them.": "Private channels appear only after the bot is added to them.",+ "Timestamp of the target message, from its link or a trigger output.": "Timestamp of the target message, from its link or a trigger output.",+ "Emoji name without colons.": "Emoji name without colons.",+ "Add the reaction as the connected user instead of the bot.": "Add the reaction as the connected user instead of the bot.",+ "Search by name or handle.": "Search by name or handle.",+ "Slack mrkdwn is supported. Empty sends blocks only.": "Slack mrkdwn is supported. Empty sends blocks only.",+ "Overrides the bot's display name for this message.": "Overrides the bot's display name for this message.",+ "Image URL used as the sender's avatar.": "Image URL used as the sender's avatar.",+ "Emoji used as the sender's avatar.": "Emoji used as the sender's avatar.",+ "Append a link to this flow at the end of the message.": "Append a link to this flow at the end of the message.",+ "JSON array of blocks from the Block Kit Builder.": "JSON array of blocks from the Block Kit Builder.",+ "Show link previews in the message.": "Show link previews in the message.",+ "Send everyone the same message, or give each user their own.": "Send everyone the same message, or give each user their own.",+ "Enable link unfurling for these messages": "Enable link unfurling for these messages",+ "Messages sent at once. Allows 16 recipients per send, up to 80.": "Messages sent at once. Allows 16 recipients per send, up to 80.",+ "Off posts as the connected user and needs a user token.": "Off posts as the connected user and needs a user token.",+ "Timestamp or link of the parent message to reply under.": "Timestamp or link of the parent message to reply under.",+ "Sent with the message as its comment. Other options are skipped.": "Sent with the message as its comment. Other options are skipped.",+ "When replying in a thread, also show the reply in the channel.": "When replying in a thread, also show the reply in the channel.",+ "Slack mrkdwn formatting is supported.": "Slack mrkdwn formatting is supported.",+ "Each button becomes a choice the recipient can click.": "Each button becomes a choice the recipient can click.",+ "Shown as the file's title in Slack.": "Shown as the file's title in Slack.",+ "File name including its extension.": "File name including its extension.",+ "Found in trigger output or the file link.": "Found in trigger output or the file link.",+ "Slack search syntax works, e.g. from:@jane in:#general.": "Slack search syntax works, e.g. from:@jane in:#general.",+ "Must match the email on the Slack profile.": "Must match the email on the Slack profile.",+ "Display name without the leading @.": "Display name without the leading @.",+ "Starts with U or W.": "Starts with U or W.",+ "Also return bot users.": "Also return bot users.",+ "Also return deactivated accounts.": "Also return deactivated accounts.",+ "Slack mrkdwn is supported. Empty updates blocks only.": "Slack mrkdwn is supported. Empty updates blocks only.",+ "Lowercase letters, numbers, dashes and underscores only.": "Lowercase letters, numbers, dashes and underscores only.",+ "Only invited members can see and join it.": "Only invited members can see and join it.",+ "Slack notifies both the old and new address.": "Slack notifies both the old and new address.",+ "Admins on paid plans only. Empty updates the connected user.": "Admins on paid plans only. Empty updates the connected user.",+ "Unix timestamp; only later messages are returned.": "Unix timestamp; only later messages are returned.",+ "Unix timestamp; only earlier messages are returned.": "Unix timestamp; only earlier messages are returned.",+ "Include messages exactly at the oldest and latest timestamps.": "Include messages exactly at the oldest and latest timestamps.",+ "Return every metadata field Slack attaches to a message.": "Return every metadata field Slack attaches to a message.",+ "Up to 100 characters.": "Up to 100 characters.",+ "Emoji name with colons.": "Emoji name with colons.",+ "Unix timestamp in seconds. Empty keeps the status until cleared.": "Unix timestamp in seconds. Empty keeps the status until cleared.",+ "Converted to Slack mrkdwn for use in a message.": "Converted to Slack mrkdwn for use in a message.",+ "Timestamp or link of the thread's parent message.": "Timestamp or link of the thread's parent message.",+ "Next Cursor from a previous run whose Has More was true.": "Next Cursor from a previous run whose Has More was true.",+ "Shown under the channel name.": "Shown under the channel name.",+ "Handle without the leading @.": "Handle without the leading @.",+ "Slack user IDs to add. Empty with append off clears the group.": "Slack user IDs to add. Empty with append off clears the group.",+ "Off replaces the member list with the users above.": "Off replaces the member list with the users above.","Channel ID to post to (e.g. C0123ABCD). Resolve a #name to an ID first with Find Channel.": "Channel ID to post to (e.g. C0123ABCD). Resolve a #name to an ID first with Find Channel.","The text of the message. When using blocks, this is used as fallback text for notifications.": "The text of the message. When using blocks, this is used as fallback text for notifications.","Timestamp (ts) of a parent message to reply within its thread, e.g. 1710304378.475129. Use the parent ts, not a reply ts.": "Timestamp (ts) of a parent message to reply within its thread, e.g. 1710304378.475129. Use the parent ts, not a reply ts.",@@ -251,7 +271,7 @@"Enable link unfurling for this message.": "Enable link unfurling for this message.","Optional Block Kit blocks array. See https://api.slack.com/block-kit": "Optional Block Kit blocks array. See https://api.slack.com/block-kit","The Slack user ID to DM (e.g. U0123ABCD). Resolve a handle/email to an ID first with Find User by Handle / Find User by Email.": "The Slack user ID to DM (e.g. U0123ABCD). Resolve a handle/email to an ID first with Find User by Handle / Find User by Email.",- "The text of the direct message.": "The text of the direct message.",+ "The text of the direct message. Renders as a section above any blocks, and is used as the notification fallback. Leave empty to send blocks only.": "The text of the direct message. Renders as a section above any blocks, and is used as the notification fallback. Leave empty to send blocks only.","Channel ID to post to (e.g. C0123ABCD). Resolve a #name with Find Channel.": "Channel ID to post to (e.g. C0123ABCD). Resolve a #name with Find Channel.","Unix epoch timestamp in seconds for when to send, e.g. 1893456000. Must be in the future and within 120 days.": "Unix epoch timestamp in seconds for when to send, e.g. 1893456000. Must be in the future and within 120 days.","Optional parent message ts to schedule this as a threaded reply, e.g. 1710304378.475129.": "Optional parent message ts to schedule this as a threaded reply, e.g. 1710304378.475129.",@@ -262,7 +282,7 @@"The scheduled_message_id from Schedule Message or List Scheduled Messages (e.g. Q1234ABCD).": "The scheduled_message_id from Schedule Message or List Scheduled Messages (e.g. Q1234ABCD).","Channel ID containing the message (e.g. C0123ABCD). Resolve a #name with Find Channel.": "Channel ID containing the message (e.g. C0123ABCD). Resolve a #name with Find Channel.","Timestamp (ts) of the message to update, e.g. 1710304378.475129. Obtain it from Post Message / Search Messages / Get Channel History.": "Timestamp (ts) of the message to update, e.g. 1710304378.475129. Obtain it from Post Message / Search Messages / Get Channel History.",- "The new text of the message.": "The new text of the message.",+ "The new text of the message. Renders as a section above any blocks, and is used as the notification fallback. Leave empty for a blocks-only update.": "The new text of the message. Renders as a section above any blocks, and is used as the notification fallback. Leave empty for a blocks-only update.","Optional Block Kit blocks array to replace the message blocks. See https://api.slack.com/block-kit": "Optional Block Kit blocks array to replace the message blocks. See https://api.slack.com/block-kit","Timestamp (ts) of the message to delete, e.g. 1710304378.475129. Obtain it from Post Message / Search Messages / Get Channel History.": "Timestamp (ts) of the message to delete, e.g. 1710304378.475129. Obtain it from Post Message / Search Messages / Get Channel History.","Channel ID where the ephemeral message appears (e.g. C0123ABCD). Resolve a #name with Find Channel.": "Channel ID where the ephemeral message appears (e.g. C0123ABCD). Resolve a #name with Find Channel.",@@ -313,8 +333,14 @@"The new purpose text. Pass an empty string to clear the purpose.": "The new purpose text. Pass an empty string to clear the purpose.","The new topic text. Pass an empty string to clear the topic.": "The new topic text. Pass an empty string to clear the topic.","Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",+ "Appended to the URL as ?key=value.": "Appended to the URL as ?key=value.","Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",- "Use user token instead of bot token": "Use user token instead of bot token",+ "On a failed request, output the error instead of failing the step.": "On a failed request, output the error instead of failing the step.",+ "Seconds to wait for a response. Empty: up to the flow limit (10 min).": "Seconds to wait for a response. Empty: up to the flow limit (10 min).",+ "Follow 3xx redirects instead of returning them as the response.": "Follow 3xx redirects instead of returning them as the response.",+ "Authenticate with the user token instead of the bot token.": "Authenticate with the user token instead of the bot token.",+ "Same message for everyone": "Same message for everyone",+ "Personal message per user": "Personal message per user","GET": "GET","POST": "POST","PATCH": "PATCH",@@ -332,7 +358,7 @@"New Mention in Direct Message": "New Mention in Direct Message","New Reaction": "New Reaction","Reaction Removed": "Reaction Removed",- "Channel created": "Channel created",+ "New Channel": "New Channel","New Command in Channel": "New Command in Channel","New Command in Direct Message": "New Command in Direct Message","New User": "New User",@@ -350,42 +376,30 @@"Triggers when a specific command is sent to the bot (e.g., @bot command arg1 arg2)": "Triggers when a specific command is sent to the bot (e.g., @bot command arg1 arg2)","Triggers when a specific command is sent to the bot (e.g., @bot command arg1 arg2) via Direct Message.": "Triggers when a specific command is sent to the bot (e.g., @bot command arg1 arg2) via Direct Message.","Triggers when a new user is created / first joins your org.": "Triggers when a new user is created / first joins your org.",- "Triggers when you save a message.": "Triggers when you save a message.",+ "Triggers when a message is saved.": "Triggers when a message is saved.","Triggers when a custom emoji has been added to a team.": "Triggers when a custom emoji has been added to a team.","Triggers when a user interacts with a modal.": "Triggers when a user interacts with a modal.",- "Ignore Bot Messages ?": "Ignore Bot Messages ?",- "Ignore Message from Yourself ?": "Ignore Message from Yourself ?",+ "Ignore Bot Messages": "Ignore Bot Messages",+ "Ignore My Own Messages": "Ignore My Own Messages","Users": "Users","User Groups": "User Groups","Channels": "Channels","Remove Mention from Message": "Remove Mention from Message",- "Emojis (E.g fire, smile)": "Emojis (E.g fire, smile)",+ "Emojis": "Emojis","Commands": "Commands","Interaction Type": "Interaction Type","This trigger needs Slack's App Webhook manually configured on self-hosted instances before it will receive events, see the [setup guide](https://www.activepieces.com/docs/install/configure-operate/setup-app-webhooks#slack).": "This trigger needs Slack's App Webhook manually configured on self-hosted instances before it will receive events, see the [setup guide](https://www.activepieces.com/docs/install/configure-operate/setup-app-webhooks#slack).",- "\n\tPlease make sure add the bot to the channel by following these steps:\n\t 1. Type /invite in the channel's chat.\n\t 2. Click on Add apps to this channel.\n\t 3. Search for and add the bot.\n \n**Note**: If you can't find the channel in the dropdown list (which fetches up to 2000 channels), please click on the **(F)** and type the channel ID directly in an array like this: `{`{ ['your_channel_id_1', 'your_channel_id_2', ...] `}`}": "\n\tPlease make sure add the bot to the channel by following these steps:\n\t 1. Type /invite in the channel's chat.\n\t 2. Click on Add apps to this channel.\n\t 3. Search for and add the bot.\n \n**Note**: If you can't find the channel in the dropdown list (which fetches up to 2000 channels), please click on the **(F)** and type the channel ID directly in an array like this: `{`{ ['your_channel_id_1', 'your_channel_id_2', ...] `}`}",- "If no channel is selected, the flow will be triggered for username mentions in all channels": "If no channel is selected, the flow will be triggered for username mentions in all channels",- "If enabled, provides a clean_text field with the user and user group mentions removed from the message.": "If enabled, provides a clean_text field with the user and user group mentions removed from the message.",- "Select emojis to trigger on": "Select emojis to trigger on",- "If no channel is selected, the flow will be triggered for reactions in all channels the app has access to": "If no channel is selected, the flow will be triggered for reactions in all channels the app has access to",- "If no channel is selected, the flow will be triggered for reactions removed in all channels the app has access to": "If no channel is selected, the flow will be triggered for reactions removed in all channels the app has access to",- "List of valid commands that the bot should respond to (e.g., help, ocr, remind)": "List of valid commands that the bot should respond to (e.g., help, ocr, remind)",- "If no channel is selected, the flow will be triggered for commands in all channels": "If no channel is selected, the flow will be triggered for commands in all channels",+ "Skip messages posted by bots and apps.": "Skip messages posted by bots and apps.",+ "Skip messages sent by the connected user. Needs a user token.": "Skip messages sent by the connected user. Needs a user token.",+ "The list shows the first 2000 channels. Can't find yours? Invite the bot: type **/invite** in the channel, choose **Add apps** and pick the bot. Or click **ƒ** and paste IDs as `{`{ ['C012AB3CD', 'C045EF6GH'] `}`}.": "The list shows the first 2000 channels. Can't find yours? Invite the bot: type **/invite** in the channel, choose **Add apps** and pick the bot. Or click **ƒ** and paste IDs as `{`{ ['C012AB3CD', 'C045EF6GH'] `}`}.",+ "Pick one or more members.": "Pick one or more members.",+ "Pick one or more user groups.": "Pick one or more user groups.",+ "Empty means every channel the bot is in.": "Empty means every channel the bot is in.",+ "Adds clean_text with the mentions stripped out.": "Adds clean_text with the mentions stripped out.",+ "Emoji names without colons. Empty means any emoji.": "Emoji names without colons. Empty means any emoji.",+ "Words the bot responds to, such as help or remind.": "Words the bot responds to, such as help or remind.","This trigger needs Slack's Interactivity & Shortcuts Request URL manually configured on self-hosted instances before it will receive events, see the [setup guide](https://www.activepieces.com/docs/install/configure-operate/setup-app-webhooks#slack).": "This trigger needs Slack's Interactivity & Shortcuts Request URL manually configured on self-hosted instances before it will receive events, see the [setup guide](https://www.activepieces.com/docs/install/configure-operate/setup-app-webhooks#slack).",- "Select the type of modal interaction to trigger on.": "Select the type of modal interaction to trigger on.",+ "Submit fires on send, Close fires when the modal is dismissed.": "Submit fires on send, Close fires when the modal is dismissed.","View Submission": "View Submission",- "View Closed": "View Closed",- "Send Message To Multiple Users": "Send Message To Multiple Users",- "Send a direct message to many users at once, in parallel.": "Send a direct message to many users at once, in parallel.",- "Message Mode": "Message Mode",- "Send everyone the same message, or give each user their own.": "Send everyone the same message, or give each user their own.",- "Same message for everyone": "Same message for everyone",- "Personal message per user": "Personal message per user",- "Recipients": "Recipients",- "Users And Messages": "Users And Messages",- "One entry per user. A user listed twice keeps only the last message.": "One entry per user. A user listed twice keeps only the last message.",- "The Slack user ID to send to, for example U012AB3CD.": "The Slack user ID to send to, for example U012AB3CD.",- "Enable link unfurling for these messages": "Enable link unfurling for these messages",- "Parallel Sends": "Parallel Sends",- "How many direct messages to send at the same time, between 1 and 20. Raise it only if the default is too slow.": "How many direct messages to send at the same time, between 1 and 20. Raise it only if the default is too slow."-}+ "View Closed": "View Closed"+}\ No newline at end of filediff --git a/packages/pieces/community/slack/src/index.ts b/packages/pieces/community/slack/src/index.tsindex e507b6da38c..f55727211cd 100644--- a/packages/pieces/community/slack/src/index.ts+++ b/packages/pieces/community/slack/src/index.ts@@ -101,7 +101,7 @@ export { slackAuth, slackOAuth2Auth } from './lib/auth';export const slack = createPiece({displayName: 'Slack',description: 'Channel-based messaging platform',- minimumSupportedRelease: '0.86.4',+ minimumSupportedRelease: '0.88.2',logoUrl: 'https://cdn.activepieces.com/pieces/slack.png',categories: [PieceCategory.COMMUNICATION],auth: slackAuth,@@ -119,7 +119,6 @@ export const slack = createPiece({action.type === 'button' &&action.value?.startsWith(server.publicUrl)) {- // We don't await the promise as we don't handle the response anywayhttpClient.sendRequest({url: action.value,method: HttpMethod.POST,@@ -169,7 +168,6 @@ export const slack = createPiece({}},verify: ({ webhookSecret, payload }) => {- // Construct the signature base stringconst timestamp = payload.headers['x-slack-request-timestamp'];const signature = payload.headers['x-slack-signature'];const signatureBaseString = `v0:${timestamp}:${payload.rawBody}`;@@ -283,10 +281,11 @@ export const slack = createPiece({},extraProps: {useUserToken: Property.Checkbox({- displayName: 'Use user token',- description: 'Use user token instead of bot token',- required: true,+ displayName: 'Use User Token',+ description: 'Authenticate with the user token instead of the bot token.',+ required: false,defaultValue: false,+ advanced: true,}),},}),diff --git a/packages/pieces/community/slack/src/lib/actions/add-reaction-to-message.ts b/packages/pieces/community/slack/src/lib/actions/add-reaction-to-message.tsindex 6c6967a6dec..5eef2f050da 100644--- a/packages/pieces/community/slack/src/lib/actions/add-reaction-to-message.ts+++ b/packages/pieces/community/slack/src/lib/actions/add-reaction-to-message.ts@@ -1,6 +1,6 @@import { slackAuth } from '../auth';import { createAction, Property } from '@activepieces/pieces-framework';-import { singleSelectChannelInfo, slackChannel } from '../common/props';+import { singleSelectChannelInfo, slackChannel, messageTs } from '../common/props';import { WebClient } from '@slack/web-api';import { processMessageTimestamp } from '../common/utils';@@ -23,22 +23,18 @@ export const addRectionToMessageAction = createAction({props: {info: singleSelectChannelInfo,channel: slackChannel(true),- ts: Property.ShortText({- displayName: 'Message Timestamp',- description:- 'Please provide the timestamp of the message you wish to react, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.',- required: true,- }),+ ts: messageTs,reaction: Property.ShortText({- displayName: 'Reaction (emoji) name',+ displayName: 'Emoji',+ description: 'Emoji name without colons.',+ placeholder: 'thumbsup',required: true,- description: 'e.g.`thumbsup`',}),reactAsUser: Property.Checkbox({- displayName: 'React as user?',+ displayName: 'React as User',description:- 'If enabled, the reaction will be added as the authenticated user instead of the bot.',- required: true,+ 'Add the reaction as the connected user instead of the bot.',+ required: false,defaultValue: false,}),},diff --git a/packages/pieces/community/slack/src/lib/actions/create-channel.ts b/packages/pieces/community/slack/src/lib/actions/create-channel.tsindex eb1f00683a6..5db5f0e37f7 100644--- a/packages/pieces/community/slack/src/lib/actions/create-channel.ts+++ b/packages/pieces/community/slack/src/lib/actions/create-channel.ts@@ -16,10 +16,13 @@ export const createChannelAction = createAction({props: {channelName: Property.ShortText({displayName: 'Channel Name',+ description: 'Lowercase letters, numbers, dashes and underscores only.',+ placeholder: 'project-updates',required: true,}),isPrivate: Property.Checkbox({- displayName: 'Is Private?',+ displayName: 'Private Channel',+ description: 'Only invited members can see and join it.',required: false,defaultValue: false,}),diff --git a/packages/pieces/community/slack/src/lib/actions/delete-message.ts b/packages/pieces/community/slack/src/lib/actions/delete-message.tsindex 9bfebdf0c96..a82d1b04390 100644--- a/packages/pieces/community/slack/src/lib/actions/delete-message.ts+++ b/packages/pieces/community/slack/src/lib/actions/delete-message.ts@@ -1,6 +1,6 @@-import { createAction, Property } from '@activepieces/pieces-framework';+import { createAction } from '@activepieces/pieces-framework';import { slackAuth } from '../auth';-import { singleSelectChannelInfo, slackChannel } from '../common/props';+import { singleSelectChannelInfo, slackChannel, messageTs } from '../common/props';import { processMessageTimestamp } from '../common/utils';import { WebClient } from '@slack/web-api';import { requireUserToken, SlackAuthValue } from '../common/auth-helpers';@@ -9,7 +9,7 @@ export const deleteMessageAction = createAction({name: 'delete-message',classification: 'DESTRUCTIVE',displayName: 'Delete Message',- description: `Deletes a specific message from a channel using the message's timestamp.`,+ description: 'Deletes a message. Needs a user token.',audience: 'human',aiMetadata: {description:@@ -20,12 +20,7 @@ export const deleteMessageAction = createAction({props: {info: singleSelectChannelInfo,channel: slackChannel(true),- ts: Property.ShortText({- displayName: 'Message Timestamp',- description:- 'Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.',- required: true,- }),+ ts: messageTs,},async run({ auth, propsValue }) {const messageTimestamp = processMessageTimestamp(propsValue.ts);diff --git a/packages/pieces/community/slack/src/lib/actions/find-user-by-email.ts b/packages/pieces/community/slack/src/lib/actions/find-user-by-email.tsindex f945aa9b2e3..ea1782ce380 100644--- a/packages/pieces/community/slack/src/lib/actions/find-user-by-email.ts+++ b/packages/pieces/community/slack/src/lib/actions/find-user-by-email.ts@@ -20,6 +20,8 @@ export const findUserByEmailAction = createAction({props: {email: Property.ShortText({displayName: 'Email',+ description: 'Must match the email on the Slack profile.',+ placeholder: '[email protected]',required: true,}),},diff --git a/packages/pieces/community/slack/src/lib/actions/find-user-by-handle.ts b/packages/pieces/community/slack/src/lib/actions/find-user-by-handle.tsindex 5f4cae4755f..f263016147e 100644--- a/packages/pieces/community/slack/src/lib/actions/find-user-by-handle.ts+++ b/packages/pieces/community/slack/src/lib/actions/find-user-by-handle.ts@@ -16,7 +16,8 @@ export const findUserByHandleAction = createAction({props: {handle: Property.ShortText({displayName: 'Handle',- description: 'User handle (display name), without the leading @',+ description: 'Display name without the leading @.',+ placeholder: 'jane.doe',required: true,}),},diff --git a/packages/pieces/community/slack/src/lib/actions/find-user-by-id.ts b/packages/pieces/community/slack/src/lib/actions/find-user-by-id.tsindex 31d91fd30f1..7b3e32fe212 100644--- a/packages/pieces/community/slack/src/lib/actions/find-user-by-id.ts+++ b/packages/pieces/community/slack/src/lib/actions/find-user-by-id.ts@@ -9,13 +9,15 @@ export const findUserByIdAction = createAction({name: 'find-user-by-id',classification: 'READ',displayName: 'Find User by ID',- description: 'Finds a user by their ID.',+ description: 'Returns the profile of a user by ID.',audience: 'human',aiMetadata: { description: 'Fetch a user profile directly by their Slack user ID; read-only and repeatable. Pick this when you already have the user ID (the fastest, exact lookup); use Find User by Handle when you only know the display-name handle.', idempotent: true },outputSchema: getUserByIdActionOutputSchema,props: {id: Property.ShortText({- displayName: 'ID',+ displayName: 'User ID',+ description: 'Starts with U or W.',+ placeholder: 'U012AB3CD',required: true,}),},diff --git a/packages/pieces/community/slack/src/lib/actions/get-channel-history.ts b/packages/pieces/community/slack/src/lib/actions/get-channel-history.tsindex c68147e86d3..77461b4c681 100644--- a/packages/pieces/community/slack/src/lib/actions/get-channel-history.ts+++ b/packages/pieces/community/slack/src/lib/actions/get-channel-history.ts@@ -6,13 +6,11 @@ import { getBotToken, SlackAuthValue } from '../common/auth-helpers';import { channelHistoryActionOutputSchema } from '../output-schemas';export const getChannelHistory = createAction({- // auth: check https://www.activepieces.com/docs/developers/piece-reference/authentication,name: 'getChannelHistory',classification: 'SEARCH',auth: slackAuth,- displayName: 'Get channel history',- description:- 'Retrieve all messages from a specific channel ("conversation") between specified timestamps',+ displayName: 'Get Channel History',+ description: 'Lists messages in a channel, newest first, within a time window.',audience: 'human',aiMetadata: { description: 'Retrieve top-level messages from a known channel, paging through the full range and optionally bounded by oldest/latest timestamps; read-only and repeatable. Use this to read a channel you already have the ID for; use Search messages to find messages by content across the workspace, or Retrieve Thread Messages to read replies within a thread.', idempotent: true },outputSchema: channelHistoryActionOutputSchema,@@ -21,39 +19,38 @@ export const getChannelHistory = createAction({channel: slackChannel(true),oldest: Property.Number({displayName: 'Oldest',- description:- 'Only messages after this timestamp will be included in results',+ description: 'Unix timestamp; only later messages are returned.',required: false,}),latest: Property.Number({displayName: 'Latest',- description:- 'Only messages before this timestamp will be included in results. Default is the current time',+ description: 'Unix timestamp; only earlier messages are returned.',required: false,}),inclusive: Property.Checkbox({displayName: 'Inclusive',description:- 'Include messages with oldest or latest timestamps in results. Ignored unless either timestamp is specified',+ 'Include messages exactly at the oldest and latest timestamps.',defaultValue: false,- required: true,+ required: false,+ advanced: true,}),includeAllMetadata: Property.Checkbox({- displayName: 'Include all metadata',- description: 'Return all metadata associated with each message',+ displayName: 'Include All Metadata',+ description: 'Return every metadata field Slack attaches to a message.',defaultValue: false,- required: true,+ required: false,+ advanced: true,}),},async run({ auth, propsValue }) {const client = new WebClient(getBotToken(auth as SlackAuthValue));const messages = [];- await client.conversations.history({ channel: propsValue.channel });for await (const page of client.paginate('conversations.history', {channel: propsValue.channel,oldest: propsValue.oldest,latest: propsValue.latest,- limit: 200, // page size, does not limit the total number of results+ limit: 200,include_all_metadata: propsValue.includeAllMetadata,inclusive: propsValue.inclusive,})) {diff --git a/packages/pieces/community/slack/src/lib/actions/get-file.ts b/packages/pieces/community/slack/src/lib/actions/get-file.tsindex 83b8d68d539..c877b52ed6d 100644--- a/packages/pieces/community/slack/src/lib/actions/get-file.ts+++ b/packages/pieces/community/slack/src/lib/actions/get-file.ts@@ -21,8 +21,9 @@ export const getFileAction = createAction({props: {fileId: Property.ShortText({displayName: 'File ID',+ description: 'Found in trigger output or the file link.',+ placeholder: 'F0123ABC456',required: true,- description: 'You can pass the file ID from the New Message Trigger payload.',}),},async run(context) {diff --git a/packages/pieces/community/slack/src/lib/actions/get-group-by-handle.ts b/packages/pieces/community/slack/src/lib/actions/get-group-by-handle.tsindex 7a7d0fbb048..cfb2d4e4a1b 100644--- a/packages/pieces/community/slack/src/lib/actions/get-group-by-handle.ts+++ b/packages/pieces/community/slack/src/lib/actions/get-group-by-handle.ts@@ -9,14 +9,15 @@ export const getGroupByHandleAction = createAction({name: 'get_group_by_handle',classification: 'READ',displayName: 'Get User Group by Handle',- description: 'Finds a Slack user group by its handle (e.g., @user-group) and returns its details. To mention this group in a message, map the returned ID using the syntax <!subteam^ID>. Read more: https://api.slack.com/reference/surfaces/formatting#mentioning-groups',+ description: 'Finds a user group by handle and returns its ID.',audience: 'both',aiMetadata: { description: 'Look up a Slack user group (subteam) by its handle and return the group, including its ID for building an <!subteam^ID> mention; read-only and repeatable. Use this for groups, not individuals (use Find User by Handle/ID for people). Matches case-insensitively on the handle and errors if no group has that handle.', idempotent: true },outputSchema: getGroupByHandleActionOutputSchema,props: {handle: Property.ShortText({displayName: 'Group Handle',- description: 'Group handle without the leading @',+ description: 'Handle without the leading @.',+ placeholder: 'engineering',required: true,}),},diff --git a/packages/pieces/community/slack/src/lib/actions/get-message.ts b/packages/pieces/community/slack/src/lib/actions/get-message.tsindex c7ad45e4bfc..91c1a508e7d 100644--- a/packages/pieces/community/slack/src/lib/actions/get-message.ts+++ b/packages/pieces/community/slack/src/lib/actions/get-message.ts@@ -1,6 +1,6 @@-import { createAction, Property } from '@activepieces/pieces-framework';+import { createAction } from '@activepieces/pieces-framework';import { slackAuth } from '../auth';-import { singleSelectChannelInfo, slackChannel } from '../common/props';+import { singleSelectChannelInfo, slackChannel, messageTs } from '../common/props';import { processMessageTimestamp } from '../common/utils';import { WebClient } from '@slack/web-api';import { getBotToken, SlackAuthValue } from '../common/auth-helpers';@@ -18,12 +18,7 @@ export const getMessageAction = createAction({props: {info: singleSelectChannelInfo,channel: slackChannel(true),- ts: Property.ShortText({- displayName: 'Message Timestamp',- description:- 'Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.',- required: true,- }),+ ts: messageTs,},async run({ auth, propsValue }) {const messageTimestamp = processMessageTimestamp(propsValue.ts);diff --git a/packages/pieces/community/slack/src/lib/actions/get-thread-replies.action.ts b/packages/pieces/community/slack/src/lib/actions/get-thread-replies.action.tsindex d608fef6e41..19dd88f5780 100644--- a/packages/pieces/community/slack/src/lib/actions/get-thread-replies.action.ts+++ b/packages/pieces/community/slack/src/lib/actions/get-thread-replies.action.ts@@ -1,7 +1,8 @@import { createAction, Property } from '@activepieces/pieces-framework';import { slackAuth } from '../auth';import { WebClient } from '@slack/web-api';-import { processMessageTimestamp } from '../common/utils';+import { threadCursor } from '../common/props';+import { fetchAllThreadReplies, processMessageTimestamp } from '../common/utils';import { getBotToken, SlackAuthValue } from '../common/auth-helpers';import { threadRepliesActionOutputSchema } from '../output-schemas';@@ -10,11 +11,11 @@ export const slackGetThreadRepliesAiAction = createAction({name: 'slack_get_thread_replies',classification: 'SEARCH',displayName: 'Get Thread Replies',- description: 'Retrieve all replies in a Slack thread.',+ description: 'Retrieve the replies in a Slack thread.',audience: 'ai',aiMetadata: {description:- 'Retrieve all replies in a thread given the channel ID and the parent message timestamp; read-only and repeatable. The timestamp must be the parent message ts, not a reply ts. Use Get Channel History for top-level channel messages, or Search Messages to find a message by content.',+ 'Retrieve the replies in a thread given the channel ID and the parent message timestamp; read-only and repeatable. Returns up to 10,000 replies per call; when has_more is true, pass response_metadata.next_cursor as the cursor to continue. The timestamp must be the parent message ts, not a reply ts. Use Get Channel History for top-level channel messages, or Search Messages to find a message by content.',idempotent: true,},outputSchema: threadRepliesActionOutputSchema,@@ -31,6 +32,7 @@ export const slackGetThreadRepliesAiAction = createAction({'Timestamp (ts) of the parent message, e.g. 1710304378.475129. Use the parent ts, not a reply ts.',required: true,}),+ cursor: threadCursor,},async run({ auth, propsValue }) {const client = new WebClient(getBotToken(auth as SlackAuthValue));@@ -38,9 +40,6 @@ export const slackGetThreadRepliesAiAction = createAction({if (!messageTimestamp) {throw new Error('Invalid Timestamp Value.');}- return await client.conversations.replies({- channel: propsValue.channel,- ts: messageTimestamp,- });+ return await fetchAllThreadReplies({ client, channel: propsValue.channel, ts: messageTimestamp, cursor: propsValue.cursor });},});diff --git a/packages/pieces/community/slack/src/lib/actions/list-users.ts b/packages/pieces/community/slack/src/lib/actions/list-users.tsindex b49d2acc607..fb1245e6c19 100644--- a/packages/pieces/community/slack/src/lib/actions/list-users.ts+++ b/packages/pieces/community/slack/src/lib/actions/list-users.ts@@ -6,23 +6,24 @@ import { getBotToken, SlackAuthValue } from '../common/auth-helpers';import { listUsersActionOutputSchema } from '../output-schemas';export const listUsers = createAction({- // auth: check https://www.activepieces.com/docs/developers/piece-reference/authentication,name: 'listUsers',classification: 'SEARCH',- displayName: 'List users',+ displayName: 'List Users',description: 'List all users of the workspace',audience: 'human',aiMetadata: { description: 'List every member of the workspace, paging through all results, with toggles to include bots and disabled/deactivated users; read-only and repeatable. Use this to enumerate or scan all users; use Find User by ID or Find User by Handle when you already know which single user you want.', idempotent: true },outputSchema: listUsersActionOutputSchema,props: {includeBots: Property.Checkbox({- displayName: 'Include bots?',- required: true,+ displayName: 'Include Bots',+ description: 'Also return bot users.',+ required: false,defaultValue: false,}),includeDisabled: Property.Checkbox({- displayName: 'Include disabled users?',- required: true,+ displayName: 'Include Deactivated Users',+ description: 'Also return deactivated accounts.',+ required: false,defaultValue: false,}),},diff --git a/packages/pieces/community/slack/src/lib/actions/markdown-to-slack-format.ts b/packages/pieces/community/slack/src/lib/actions/markdown-to-slack-format.tsindex a0721b46a66..9a5ae53c385 100644--- a/packages/pieces/community/slack/src/lib/actions/markdown-to-slack-format.ts+++ b/packages/pieces/community/slack/src/lib/actions/markdown-to-slack-format.ts@@ -7,15 +7,16 @@ import slackifyMarkdown from 'slackify-markdown';export const markdownToSlackFormat = createAction({name: 'markdownToSlackFormat',classification: 'READ',- displayName: 'Markdown to Slack format',- description:- "Convert Markdown-formatted text to Slack's pseudo - markdown syntax",+ displayName: 'Markdown to Slack Format',+ description: "Converts Markdown text to Slack's mrkdwn syntax.",audience: 'both',aiMetadata: { description: "Convert standard Markdown into Slack's mrkdwn dialect so links, bold, and lists render correctly in messages; a pure local text transform that needs no auth and is fully repeatable for the same input. Use this to prepare text before sending it through a Slack message action.", idempotent: true },requireAuth: false,props: {markdown: Property.LongText({- displayName: 'Markdown text',+ displayName: 'Markdown Text',+ description: 'Converted to Slack mrkdwn for use in a message.',+ placeholder: '**bold** and _italic_',required: true,}),},diff --git a/packages/pieces/community/slack/src/lib/actions/request-action-message.ts b/packages/pieces/community/slack/src/lib/actions/request-action-message.tsindex d18abab4fde..96233b5cb17 100644--- a/packages/pieces/community/slack/src/lib/actions/request-action-message.ts+++ b/packages/pieces/community/slack/src/lib/actions/request-action-message.ts@@ -1,16 +1,7 @@-import { createAction, Property } from '@activepieces/pieces-framework';+import { createAction } from '@activepieces/pieces-framework';import { slackAuth } from '../auth';import { assertNotNullOrUndefined } from '@activepieces/pieces-framework';-import {- profilePicture,- text,- slackChannel,- username,- actions,- singleSelectChannelInfo,- threadTs,- mentionOriginFlow,-} from '../common/props';+import { profilePicture, text, slackChannel, username, actions, singleSelectChannelInfo, threadTs, mentionOriginFlow, replyBroadcast } from '../common/props';import { requestAction } from '../common/request-action';import { requestActionActionOutputSchema } from '../output-schemas';@@ -36,12 +27,7 @@ export const requestActionMessageAction = createAction({threadTs,username,profilePicture,- replyBroadcast: Property.Checkbox({- displayName: 'Broadcast reply to channel',- description: 'When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)',- required: false,- defaultValue: false,- }),+ replyBroadcast,mentionOriginFlow,},async run(context) {diff --git a/packages/pieces/community/slack/src/lib/actions/request-approval-direct-message.ts b/packages/pieces/community/slack/src/lib/actions/request-approval-direct-message.tsindex 50f53e0d44a..98af31b8818 100644--- a/packages/pieces/community/slack/src/lib/actions/request-approval-direct-message.ts+++ b/packages/pieces/community/slack/src/lib/actions/request-approval-direct-message.ts@@ -14,7 +14,7 @@ export const requestApprovalDirectMessageAction = createAction({classification: 'WRITE',displayName: 'Request Approval from A User',description:- 'Send approval message to a user and then wait until the message is approved or disapproved',+ 'Sends approve/reject buttons to a user and waits for the answer.',audience: 'both',aiMetadata: {description:diff --git a/packages/pieces/community/slack/src/lib/actions/request-approval-message.ts b/packages/pieces/community/slack/src/lib/actions/request-approval-message.tsindex d13cdbc89d8..d34dadaf17b 100644--- a/packages/pieces/community/slack/src/lib/actions/request-approval-message.ts+++ b/packages/pieces/community/slack/src/lib/actions/request-approval-message.ts@@ -21,7 +21,7 @@ export const requestSendApprovalMessageAction = createAction({classification: 'WRITE',displayName: 'Request Approval in a Channel',description:- 'Send approval message to a channel and then wait until the message is approved or disapproved',+ 'Sends approve/reject buttons to a channel and waits for the answer.',audience: 'both',aiMetadata: { description: 'Post a message with Approve/Disapprove buttons to a channel and pause the flow until someone clicks one, then resume with the boolean outcome. Use this for a simple approval gate visible to a channel; use Request Action from A User for a private DM with custom action choices. Posts a new message each run, so it is not idempotent.', idempotent: false },outputSchema: approvalActionOutputSchema,diff --git a/packages/pieces/community/slack/src/lib/actions/retrieve-thread-messages.ts b/packages/pieces/community/slack/src/lib/actions/retrieve-thread-messages.tsindex 40079d7bbab..34688f8c0e2 100644--- a/packages/pieces/community/slack/src/lib/actions/retrieve-thread-messages.ts+++ b/packages/pieces/community/slack/src/lib/actions/retrieve-thread-messages.ts@@ -1,8 +1,8 @@import { createAction, Property } from '@activepieces/pieces-framework';import { slackAuth } from '../auth';import { WebClient } from '@slack/web-api';-import { slackChannel } from '../common/props';-import { processMessageTimestamp } from '../common/utils';+import { singleSelectChannelInfo, slackChannel, threadCursor } from '../common/props';+import { fetchAllThreadReplies, processMessageTimestamp } from '../common/utils';import { getBotToken, SlackAuthValue } from '../common/auth-helpers';import { threadRepliesActionOutputSchema } from '../output-schemas';@@ -12,27 +12,27 @@ export const retrieveThreadMessages = createAction({displayName: 'Retrieve Thread Messages',description: 'Retrieves thread messages by channel and thread timestamp.',audience: 'human',- aiMetadata: { description: 'Retrieve all replies in a thread given the channel and the parent message timestamp; read-only and repeatable. The timestamp must be that of the parent message, not a reply. Use this to read a conversation thread; use Get channel history for top-level channel messages.', idempotent: true },+ aiMetadata: { description: 'Retrieve the replies in a thread given the channel and the parent message timestamp; read-only and repeatable. Returns up to 10,000 replies per call; when has_more is true, pass response_metadata.next_cursor as the cursor to continue. The timestamp must be that of the parent message, not a reply. Use this to read a conversation thread; use Get channel history for top-level channel messages.', idempotent: true },auth: slackAuth,outputSchema: threadRepliesActionOutputSchema,props: {+ info: singleSelectChannelInfo,channel: slackChannel(true),threadTs: Property.ShortText({- displayName: 'Thread ts',- description:- 'Provide the ts (timestamp) value of the **parent** message to retrieve replies of this message. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.',+ displayName: 'Thread Timestamp',+ description: "Timestamp or link of the thread's parent message.",+ placeholder: '1710304378.475129',required: true,}),+ cursor: threadCursor,},async run({ auth, propsValue }) {const client = new WebClient(getBotToken(auth as SlackAuthValue));- const messageTimestamp = processMessageTimestamp(propsValue.threadTs);- if (!messageTimestamp) {- throw new Error('Invalid Timestamp Value.');- }- return await client.conversations.replies({- channel: propsValue.channel,- ts: messageTimestamp,- });+ const messageTimestamp = processMessageTimestamp(propsValue.threadTs);+ if (!messageTimestamp) {+ throw new Error('Invalid Timestamp Value.');+ }++ return await fetchAllThreadReplies({ client, channel: propsValue.channel, ts: messageTimestamp, cursor: propsValue.cursor });},});diff --git a/packages/pieces/community/slack/src/lib/actions/search-messages.ts b/packages/pieces/community/slack/src/lib/actions/search-messages.tsindex dde98809225..2576e77eec1 100644--- a/packages/pieces/community/slack/src/lib/actions/search-messages.ts+++ b/packages/pieces/community/slack/src/lib/actions/search-messages.ts@@ -7,15 +7,17 @@ import { searchMessagesActionOutputSchema } from '../output-schemas';export const searchMessages = createAction({name: 'searchMessages',classification: 'SEARCH',- displayName: 'Search messages',- description: 'Searches for messages matching a query',+ displayName: 'Search Messages',+ description: 'Searches messages. Needs a user token.',audience: 'human',aiMetadata: { description: 'Search across the workspace for messages matching a query string and return all matching messages, paging through every result; read-only and repeatable. Requires a user token (search is not available to bot tokens). Use this to find messages anywhere by content; use Get channel history or Get Message by Timestamp when you already know the channel.', idempotent: true },auth: slackAuth,outputSchema: searchMessagesActionOutputSchema,props: {query: Property.ShortText({- displayName: 'Search query',+ displayName: 'Search Query',+ description: 'Slack search syntax works, e.g. from:@jane in:#general.',+ placeholder: 'invoice in:#finance',required: true,}),},@@ -24,10 +26,6 @@ export const searchMessages = createAction({const client = new WebClient(userToken);const matches = [];- // We can't use the usual "for await ... of" syntax with client.paginate- // Because search.messages uses a bastardized version of cursor-based pagination- // Where you need to pass * as first cursor- // https://api.slack.com/methods/search.messages#arg_cursorlet cursor = '*';do {const page = await client.search.messages({diff --git a/packages/pieces/community/slack/src/lib/actions/send-direct-message-action.ts b/packages/pieces/community/slack/src/lib/actions/send-direct-message-action.tsindex d70b9958c14..e795be88ac6 100644--- a/packages/pieces/community/slack/src/lib/actions/send-direct-message-action.ts+++ b/packages/pieces/community/slack/src/lib/actions/send-direct-message-action.ts@@ -2,14 +2,7 @@ import { createAction, Property } from '@activepieces/pieces-framework';import { buildFlowOriginContextBlock, slackSendMessage, textToSectionBlocks } from '../common/utils';import { slackAuth } from '../auth';import { assertNotNullOrUndefined } from '@activepieces/pieces-framework';-import {- profilePicture,- userId,- username,- blocks,- mentionOriginFlow,- iconEmoji,-} from '../common/props';+import { profilePicture, userId, username, blocks, mentionOriginFlow, iconEmoji, unfurlLinks } from '../common/props';import { Block,KnownBlock } from '@slack/web-api';import { getBotToken, SlackAuthValue } from '../common/auth-helpers';import { chatPostMessageOutputSchema } from '../output-schemas';@@ -28,8 +21,7 @@ export const slackSendDirectMessageAction = createAction({userId: userId(true),text: Property.LongText({displayName: 'Message',- description:- 'The text of your message. Renders as a section above any Block Kit blocks, and is used as the notification fallback. Leave empty to send blocks only.',+ description: 'Slack mrkdwn is supported. Empty sends blocks only.',required: false,}),username,@@ -37,12 +29,7 @@ export const slackSendDirectMessageAction = createAction({iconEmoji,mentionOriginFlow,blocks,- unfurlLinks: Property.Checkbox({- displayName: 'Unfurl Links',- description: 'Enable link unfurling for this message',- required: false,- defaultValue: true,- }),+ unfurlLinks,},async run(context) {const token = getBotToken(context.auth as SlackAuthValue);diff --git a/packages/pieces/community/slack/src/lib/actions/send-message-action.ts b/packages/pieces/community/slack/src/lib/actions/send-message-action.tsindex 7edb5acad27..349049e51c7 100644--- a/packages/pieces/community/slack/src/lib/actions/send-message-action.ts+++ b/packages/pieces/community/slack/src/lib/actions/send-message-action.ts@@ -1,14 +1,5 @@import { createAction, Property } from '@activepieces/pieces-framework';-import {- profilePicture,- slackChannel,- username,- blocks,- threadTs,- singleSelectChannelInfo,- mentionOriginFlow,- iconEmoji,-} from '../common/props';+import { profilePicture, slackChannel, username, blocks, threadTs, singleSelectChannelInfo, mentionOriginFlow, iconEmoji, replyBroadcast, unfurlLinks } from '../common/props';import { buildFlowOriginContextBlock, processMessageTimestamp, slackSendMessage, textToSectionBlocks } from '../common/utils';import { slackAuth } from '../auth';import { Block,KnownBlock } from '@slack/web-api';@@ -30,35 +21,27 @@ export const slackSendMessageAction = createAction({channel: slackChannel(true),text: Property.LongText({displayName: 'Message',- description: 'The text of your message. When using Block Kit blocks, this is used as a fallback for notifications.',+ description: 'Slack mrkdwn is supported. Empty sends blocks only.',required: false,}),sendAsBot:Property.Checkbox({- displayName:'Send as a bot?',- required:true,+ displayName:'Send as Bot',+ description: 'Off posts as the connected user and needs a user token.',+ required:false,defaultValue:true}),threadTs,- username,- profilePicture,- iconEmoji,file: Property.File({displayName: 'Attachment',+ description: 'Sent with the message as its comment. Other options are skipped.',required: false,}),- replyBroadcast: Property.Checkbox({- displayName: 'Broadcast reply to channel',- description: 'When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)',- required: false,- defaultValue: false,- }),+ username,+ profilePicture,+ iconEmoji,+ replyBroadcast,mentionOriginFlow,- unfurlLinks: Property.Checkbox({- displayName: 'Unfurl Links',- description: 'Enable link unfurling for this message',- required: false,- defaultValue: true,- }),+ unfurlLinks,blocks,},async run(context) {diff --git a/packages/pieces/community/slack/src/lib/actions/send-message-to-multiple-users.ts b/packages/pieces/community/slack/src/lib/actions/send-message-to-multiple-users.tsindex 57b183e6222..288b02657ed 100644--- a/packages/pieces/community/slack/src/lib/actions/send-message-to-multiple-users.ts+++ b/packages/pieces/community/slack/src/lib/actions/send-message-to-multiple-users.ts@@ -119,9 +119,13 @@ export const slackSendMessageToMultipleUsersAction = createAction({}),concurrency: Property.Number({displayName: 'Parallel Sends',- description: `How many direct messages to send at the same time, between ${MIN_ACTION_CONCURRENCY_LIMIT} and ${MAX_ACTION_CONCURRENCY_LIMIT}. It also sets how many recipients one step accepts, because every send has to fit the flow time budget: ${slackConcurrency.roundsWithinFlowBudget()} recipients per parallel send, up to ${DEFAULT_MAX_RECIPIENTS}.`,+ description: `Messages sent at once. Allows ${slackConcurrency.roundsWithinFlowBudget()} recipients per send, up to ${DEFAULT_MAX_RECIPIENTS}.`,required: false,defaultValue: DEFAULT_ACTION_CONCURRENCY_LIMIT,+ display: 'stepper',+ min: MIN_ACTION_CONCURRENCY_LIMIT,+ max: MAX_ACTION_CONCURRENCY_LIMIT,+ step: 1,}),},async run(context) {diff --git a/packages/pieces/community/slack/src/lib/actions/set-channel-topic.ts b/packages/pieces/community/slack/src/lib/actions/set-channel-topic.tsindex e49c1f00186..108fe6c17b9 100644--- a/packages/pieces/community/slack/src/lib/actions/set-channel-topic.ts+++ b/packages/pieces/community/slack/src/lib/actions/set-channel-topic.ts@@ -19,6 +19,8 @@ export const setChannelTopicAction = createAction({channel: slackChannel(true),topic: Property.LongText({displayName: 'Topic',+ description: 'Shown under the channel name.',+ placeholder: 'Weekly release coordination',required: true,}),},diff --git a/packages/pieces/community/slack/src/lib/actions/set-user-status.ts b/packages/pieces/community/slack/src/lib/actions/set-user-status.tsindex a99aa143c9f..cff29d0e155 100644--- a/packages/pieces/community/slack/src/lib/actions/set-user-status.ts+++ b/packages/pieces/community/slack/src/lib/actions/set-user-status.ts@@ -11,24 +11,26 @@ export const setUserStatusAction = createAction({name: 'slack-set-user-status',classification: 'WRITE',displayName: 'Set User Status',- description: "Sets a user's custom status",+ description: "Sets the connected user's status. Needs a user token.",audience: 'human',aiMetadata: { description: "Set the authenticated user's custom status text and optional emoji, optionally with a Unix-timestamp expiration; requires a user token, not a bot token. This overwrites any existing status, so re-running with the same input is idempotent. Status text is capped at 100 characters.", idempotent: true },outputSchema: updateProfileActionOutputSchema,props: {text: Property.ShortText({- displayName: 'Text',+ displayName: 'Status Text',+ description: 'Up to 100 characters.',+ placeholder: 'In a meeting',required: true,}),emoji: Property.ShortText({displayName: 'Emoji',required: false,- description:- 'Emoji shortname (standard or custom), e.g. :tada: or :train:',+ description: 'Emoji name with colons.',+ placeholder: ':calendar:',}),expiration: Property.Number({- displayName: 'Expires at',- description: 'Unix timestamp - if not set, the status will not expire',+ displayName: 'Expires At',+ description: 'Unix timestamp in seconds. Empty keeps the status until cleared.',required: false,}),},diff --git a/packages/pieces/community/slack/src/lib/actions/update-message.ts b/packages/pieces/community/slack/src/lib/actions/update-message.tsindex 9589b2cef50..f4219c57c46 100644--- a/packages/pieces/community/slack/src/lib/actions/update-message.ts+++ b/packages/pieces/community/slack/src/lib/actions/update-message.ts@@ -1,16 +1,15 @@import { createAction, Property } from '@activepieces/pieces-framework';import { slackAuth } from '../auth';-import { blocks, singleSelectChannelInfo, slackChannel, mentionOriginFlow } from '../common/props';+import { blocks, singleSelectChannelInfo, slackChannel, mentionOriginFlow, messageTs } from '../common/props';import { buildFlowOriginContextBlock, processMessageTimestamp, textToSectionBlocks } from '../common/utils';import { Block,KnownBlock, WebClient } from '@slack/web-api';import { getBotToken, SlackAuthValue } from '../common/auth-helpers';import { chatUpdateOutputSchema } from '../output-schemas';export const updateMessage = createAction({- // auth: check https://www.activepieces.com/docs/developers/piece-reference/authentication,name: 'updateMessage',classification: 'WRITE',- displayName: 'Update message',+ displayName: 'Update Message',description: 'Update an existing message',audience: 'human',aiMetadata: {@@ -23,16 +22,10 @@ export const updateMessage = createAction({props: {info: singleSelectChannelInfo,channel: slackChannel(true),- ts: Property.ShortText({- displayName: 'Message Timestamp',- description:- 'Please provide the timestamp of the message you wish to update, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.',- required: true,- }),+ ts: messageTs,text: Property.LongText({displayName: 'Message',- description:- 'The updated text of your message. Renders as a section above any Block Kit blocks, and is used as the notification fallback. Leave empty for a blocks-only update.',+ description: 'Slack mrkdwn is supported. Empty updates blocks only.',required: false,}),mentionOriginFlow,diff --git a/packages/pieces/community/slack/src/lib/actions/update-profile.ts b/packages/pieces/community/slack/src/lib/actions/update-profile.tsindex 7549d07ae66..b1e6d37d63e 100644--- a/packages/pieces/community/slack/src/lib/actions/update-profile.ts+++ b/packages/pieces/community/slack/src/lib/actions/update-profile.ts@@ -9,7 +9,7 @@ export const updateProfileAction = createAction({name: 'slack-update-profile',classification: 'WRITE',displayName: 'Update Profile',- description: 'Update basic profile field such as name or title.',+ description: 'Updates name, email or title. Needs a user token.',audience: 'human',aiMetadata: { description: "Update basic profile fields (first name, last name, email) for the authenticated user, or for another user when an admin specifies a user ID; requires a user token. Setting the same values again is idempotent. Note that changing the email triggers Slack notification emails to both addresses, and editing another user is admin-only on paid teams.", idempotent: true },outputSchema: updateProfileActionOutputSchema,@@ -24,13 +24,13 @@ export const updateProfileAction = createAction({}),email: Property.ShortText({displayName: 'Email',- description: `Changing a user's email address will send an email to both the old and new addresses, and also post a slackbot message to the user informing them of the change.`,+ description: 'Slack notifies both the old and new address.',required: false,}),userId: Property.ShortText({- displayName: 'User',- description:- 'ID of user to change. This argument may only be specified by admins on paid teams.You can use **Find User by Email** action to retrieve ID.',+ displayName: 'User ID',+ description: 'Admins on paid plans only. Empty updates the connected user.',+ placeholder: 'U012AB3CD',required: false,}),},diff --git a/packages/pieces/community/slack/src/lib/actions/update-user-groups.ts b/packages/pieces/community/slack/src/lib/actions/update-user-groups.tsindex 8eccbd531d9..c3cf8224ae4 100644--- a/packages/pieces/community/slack/src/lib/actions/update-user-groups.ts+++ b/packages/pieces/community/slack/src/lib/actions/update-user-groups.ts@@ -20,18 +20,19 @@ export const updateGroupUsersAction = createAction({props: {handle: Property.ShortText({displayName: 'Group Handle',- description: 'Group handle without the leading @',+ description: 'Handle without the leading @.',+ placeholder: 'engineering',required: true,}),userIds: Property.Array({displayName: 'User IDs',- description: 'The list of Slack User IDs to update this group with. Leave empty to clear the group (if not appending).',+ description: 'Slack user IDs to add. Empty with append off clears the group.',required: false,}),appendUsers: Property.Checkbox({- displayName: 'Append to existing members?',- description: 'If checked, these users will be added to the current group. If unchecked, the current group members will be completely replaced by these users.',- required: true,+ displayName: 'Append to Existing Members',+ description: 'Off replaces the member list with the users above.',+ required: false,defaultValue: true,}),},diff --git a/packages/pieces/community/slack/src/lib/actions/upload-file.ts b/packages/pieces/community/slack/src/lib/actions/upload-file.tsindex acd45c98812..7573919a11c 100644--- a/packages/pieces/community/slack/src/lib/actions/upload-file.ts+++ b/packages/pieces/community/slack/src/lib/actions/upload-file.ts@@ -11,22 +11,26 @@ export const uploadFile = createAction({auth: slackAuth,name: 'uploadFile',classification: 'WRITE',- displayName: 'Upload file',- description: 'Upload file without sharing it to a channel or user',+ displayName: 'Upload File',+ description: 'Uploads a file, optionally into a channel.',audience: 'both',aiMetadata: { description: 'Upload a file to Slack, optionally sharing it into a channel and setting a title and filename. Each call creates a new file, so it is not idempotent. To attach a file inline with a message instead, use the attachment option on Send Message To A Channel.', idempotent: false },outputSchema: uploadFileActionOutputSchema,props: {file: Property.File({- displayName: 'Attachment',+ displayName: 'File',required: true,}),title: Property.ShortText({displayName: 'Title',+ description: "Shown as the file's title in Slack.",+ placeholder: 'Q3 report',required: false,}),filename: Property.ShortText({displayName: 'Filename',+ description: 'File name including its extension.',+ placeholder: 'report.pdf',required: false,}),channel: slackChannel(false),diff --git a/packages/pieces/community/slack/src/lib/common/auth-helpers.ts b/packages/pieces/community/slack/src/lib/common/auth-helpers.tsindex cdde339da33..1e9a2203655 100644--- a/packages/pieces/community/slack/src/lib/common/auth-helpers.ts+++ b/packages/pieces/community/slack/src/lib/common/auth-helpers.ts@@ -100,7 +100,7 @@ export async function getUserId(auth: SlackAuthValue): Promise<string> {method: HttpMethod.GET,url: 'https://slack.com/api/auth.test',headers: {- Authorization: `Bearer ${a.props.botToken}`,+ Authorization: `Bearer ${a.props.userToken || a.props.botToken}`,},});if (!response.body.ok) {diff --git a/packages/pieces/community/slack/src/lib/common/props.ts b/packages/pieces/community/slack/src/lib/common/props.tsindex 9e6468afcca..11459fc27b7 100644--- a/packages/pieces/community/slack/src/lib/common/props.ts+++ b/packages/pieces/community/slack/src/lib/common/props.ts@@ -2,24 +2,16 @@ import { MarkdownVariant, Property } from '@activepieces/pieces-framework';import { UsersListResponse, WebClient } from '@slack/web-api';import { slackAuth } from '../auth';import { getBotToken, SlackAuthValue } from '../common/auth-helpers';-const slackChannelBotInstruction = `- Please make sure add the bot to the channel by following these steps:- 1. Type /invite in the channel's chat.- 2. Click on Add apps to this channel.- 3. Search for and add the bot.- `;-export const multiSelectChannelInfo = Property.MarkDown({value:- slackChannelBotInstruction +- `\n**Note**: If you can't find the channel in the dropdown list (which fetches up to 2000 channels), please click on the **(F)** and type the channel ID directly in an array like this: \`{\`{ ['your_channel_id_1', 'your_channel_id_2', ...] \`}\`}`,+ "The list shows the first 2000 channels. Can't find yours? Invite the bot: type **/invite** in the channel, choose **Add apps** and pick the bot. Or click **ƒ** and paste IDs as `{`{ ['C012AB3CD', 'C045EF6GH'] `}`}.",+ variant: MarkdownVariant.INFO,});export const singleSelectChannelInfo = Property.MarkDown({value:- slackChannelBotInstruction +- `\n**Note**: If you can't find the channel in the dropdown list (which fetches up to 2000 channels), please click on the **(F)** and type the channel ID directly.- `,+ "The list shows the first 2000 channels. Can't find yours? Invite the bot: type **/invite** in the channel, choose **Add apps** and pick the bot. Or click **ƒ** and paste the channel ID.",+ variant: MarkdownVariant.INFO,});export const appWebhookSetupInfo = Property.MarkDown({@@ -38,8 +30,7 @@ export const slackChannel = <R extends boolean>(required: R) =>Property.Dropdown<string, R,typeof slackAuth>({auth: slackAuth,displayName: 'Channel',- description:- "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'",+ description: 'Private channels appear only after the bot is added to them.',required,refreshers: [],async options({ auth }) {@@ -64,48 +55,77 @@ export const slackChannel = <R extends boolean>(required: R) =>export const username = Property.ShortText({displayName: 'Username',- description: 'The username of the bot',+ description: "Overrides the bot's display name for this message.",required: false,+ advanced: true,});export const profilePicture = Property.ShortText({displayName: 'Profile Picture',- description: 'The profile picture of the bot',+ description: "Image URL used as the sender's avatar.",+ placeholder: 'https://example.com/avatar.png',required: false,+ advanced: true,});export const iconEmoji = Property.ShortText({displayName: 'Icon Emoji',- description: 'The icon emoji of the bot',+ description: "Emoji used as the sender's avatar.",+ placeholder: ':robot_face:',required: false,+ advanced: true,});export const threadTs = Property.ShortText({- displayName: 'Reply to Thread (Thread Message Link/Timestamp)',- description:- 'Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.',+ displayName: 'Reply to Thread',+ description: 'Timestamp or link of the parent message to reply under.',+ placeholder: '1710304378.475129',required: false,});export const mentionOriginFlow = Property.Checkbox({- displayName: 'Mention flow of origin?',- description:- 'If checked, adds a mention at the end of the Slack message to indicate which flow sent the notification, with a link to said flow.',+ displayName: 'Mention Origin Flow',+ description: 'Append a link to this flow at the end of the message.',required: false,defaultValue: false,+ advanced: true,});export const blocks = Property.Json({- displayName: 'Block Kit blocks',- description: 'See https://api.slack.com/block-kit for specs',+ displayName: 'Block Kit Blocks',+ description: 'JSON array of blocks from the Block Kit Builder.',+ required: false,+ defaultValue: [],+});++export const messageTs = Property.ShortText({+ displayName: 'Message Timestamp',+ description: 'Timestamp of the target message, from its link or a trigger output.',+ placeholder: '1710304378.475129',+ required: true,+});++export const replyBroadcast = Property.Checkbox({+ displayName: 'Also Post to Channel',+ description: 'When replying in a thread, also show the reply in the channel.',+ required: false,+ defaultValue: false,+ advanced: true,+});++export const unfurlLinks = Property.Checkbox({+ displayName: 'Unfurl Links',+ description: 'Show link previews in the message.',required: false,- defaultValue: []+ defaultValue: true,+ advanced: true,});export const userId = <R extends boolean>(required: R) =>Property.Dropdown<string, R, typeof slackAuth>({auth: slackAuth,displayName: 'User',+ description: 'Search by name or handle.',required,refreshers: [],async options({ auth }) {@@ -129,6 +149,7 @@ export const userId = <R extends boolean>(required: R) =>export const userIds = Property.MultiSelectDropdown({auth: slackAuth,displayName: 'Users',+ description: 'Pick one or more members.',required: false,refreshers: [],async options({ auth }) {@@ -152,6 +173,7 @@ export const userIds = Property.MultiSelectDropdown({export const usergroupIds = Property.MultiSelectDropdown({auth: slackAuth,displayName: 'User Groups',+ description: 'Pick one or more user groups.',required: false,refreshers: [],async options({ auth }) {@@ -181,19 +203,24 @@ export const usergroupIds = Property.MultiSelectDropdown({export const text = Property.LongText({displayName: 'Message',+ description: 'Slack mrkdwn formatting is supported.',required: true,});export const actions = Property.Array({displayName: 'Action Buttons',+ description: 'Each button becomes a choice the recipient can click.',required: true,properties: {label: Property.ShortText({displayName: 'Label',+ description: 'Text shown on the button.',+ placeholder: 'Approve',required: true,}),style: Property.StaticDropdown({displayName: 'Style',+ description: 'Primary is green, Danger is red.',required: false,defaultValue: null,options: {@@ -218,10 +245,14 @@ export async function getUsers(accessToken: string) {users.push(...response.members.filter((member) => !member.deleted)- .map((member) => ({- label: member.name || '',- value: member.id || '',- }))+ .map((member) => {+ const handle = member.name ?? '';+ const realName = member.real_name ?? member.profile?.real_name;+ return {+ label: realName ? `${realName} (@${handle})` : `@${handle}`,+ value: member.id ?? '',+ };+ }));}}@@ -255,3 +286,10 @@ export async function getChannels(accessToken: string) {return channels;}++export const threadCursor = Property.ShortText({+ displayName: 'Continue From Cursor',+ description: 'Next Cursor from a previous run whose Has More was true.',+ required: false,+ advanced: true,+});diff --git a/packages/pieces/community/slack/src/lib/common/utils.ts b/packages/pieces/community/slack/src/lib/common/utils.tsindex 968bf64e1fd..2195199037b 100644--- a/packages/pieces/community/slack/src/lib/common/utils.ts+++ b/packages/pieces/community/slack/src/lib/common/utils.ts@@ -1,5 +1,5 @@import { ApFile } from '@activepieces/pieces-framework';-import { Block, KnownBlock, WebClient, WebClientOptions } from '@slack/web-api';+import { Block, ConversationsRepliesResponse, KnownBlock, WebClient, WebClientOptions } from '@slack/web-api';const SLACK_SECTION_TEXT_MAX_LENGTH = 3000;@@ -180,3 +180,39 @@ export function parseCommand(args,};}++const THREAD_REPLIES_PAGE_SIZE = 200;+const THREAD_REPLIES_MAX_PAGES = 50;++export async function fetchAllThreadReplies({ client, channel, ts, cursor: startCursor }: { client: WebClient; channel: string; ts: string; cursor?: string }): Promise<ConversationsRepliesResponse> {+ const firstPage = await client.conversations.replies({ channel, ts, limit: THREAD_REPLIES_PAGE_SIZE, ...(startCursor ? { cursor: startCursor } : {}) });+ const seen = new Set<string>();+ const messages: NonNullable<ConversationsRepliesResponse['messages']> = [];+ const append = (page: ConversationsRepliesResponse) => {+ for (const message of page.messages ?? []) {+ const key = message.ts ?? '';+ if (key && seen.has(key)) {+ continue;+ }+ seen.add(key);+ messages.push(message);+ }+ };+ append(firstPage);+ let cursor = firstPage.response_metadata?.next_cursor;+ const usedCursors = new Set<string>(startCursor ? [startCursor] : []);+ let pages = 1;+ while (cursor && !usedCursors.has(cursor) && pages < THREAD_REPLIES_MAX_PAGES) {+ usedCursors.add(cursor);+ const page = await client.conversations.replies({ channel, ts, limit: THREAD_REPLIES_PAGE_SIZE, cursor });+ append(page);+ cursor = page.response_metadata?.next_cursor;+ pages += 1;+ }+ return {+ ...firstPage,+ messages,+ has_more: Boolean(cursor),+ response_metadata: { ...firstPage.response_metadata, next_cursor: cursor ?? '' },+ };+}diff --git a/packages/pieces/community/slack/src/lib/output-schemas.ts b/packages/pieces/community/slack/src/lib/output-schemas.tsindex 3141a8f788b..4d9e171396e 100644--- a/packages/pieces/community/slack/src/lib/output-schemas.ts+++ b/packages/pieces/community/slack/src/lib/output-schemas.ts@@ -153,6 +153,11 @@ export const threadRepliesActionOutputSchema: OutputSchema = {fields: [{ key: 'messages', label: 'Messages', listItems: messageFields, labelKey: 'text' },{ key: 'has_more', label: 'Has More', format: 'boolean' },+ {+ key: 'response_metadata',+ label: 'Response Metadata',+ children: [{ key: 'next_cursor', label: 'Next Cursor' }],+ },],};diff --git a/packages/pieces/community/slack/src/lib/triggers/new-channel.ts b/packages/pieces/community/slack/src/lib/triggers/new-channel.tsindex ca6dd23fa0a..20c85d585ca 100644--- a/packages/pieces/community/slack/src/lib/triggers/new-channel.ts+++ b/packages/pieces/community/slack/src/lib/triggers/new-channel.ts@@ -8,7 +8,7 @@ export const channelCreated = createTrigger({auth: slackAuth,name: 'channel_created',classification: 'READ',- displayName: 'Channel created',+ displayName: 'New Channel',description: 'Triggers when a channel is created',aiMetadata: {description:diff --git a/packages/pieces/community/slack/src/lib/triggers/new-command-in-direct-message.ts b/packages/pieces/community/slack/src/lib/triggers/new-command-in-direct-message.tsindex f974c2ca9a3..a95c8a30dd8 100644--- a/packages/pieces/community/slack/src/lib/triggers/new-command-in-direct-message.ts+++ b/packages/pieces/community/slack/src/lib/triggers/new-command-in-direct-message.ts@@ -25,20 +25,21 @@ export const newCommandInDirectMessageTrigger = createTrigger({user: userId(true),commands: Property.Array({displayName: 'Commands',- description:- 'List of valid commands that the bot should respond to (e.g., help, ocr, remind)',+ description: 'Words the bot responds to, such as help or remind.',required: true,defaultValue: ['help'],}),ignoreBots: Property.Checkbox({- displayName: 'Ignore Bot Messages ?',- required: true,+ displayName: 'Ignore Bot Messages',+ description: 'Skip messages posted by bots and apps.',+ required: false,defaultValue: true,}),ignoreSelfMessages: Property.Checkbox({- displayName: 'Ignore Message from Yourself ?',- required: true,- defaultValue: false,+ displayName: 'Ignore My Own Messages',+ description: 'Skip messages sent by the connected user. Needs a user token.',+ required: false,+ defaultValue: false,}),},type: TriggerStrategy.APP_WEBHOOK,@@ -76,7 +77,6 @@ export const newCommandInDirectMessageTrigger = createTrigger({return [];}- // Check for mention and parse commandif (user && payloadBody.event.text) {const parsedCommand = parseCommand(payloadBody.event.text,@@ -84,8 +84,7 @@ export const newCommandInDirectMessageTrigger = createTrigger({commands);- if (parsedCommand && commands.includes(parsedCommand.command)) {- // Return event with parsed command+ if (parsedCommand) {return [{...payloadBody.event,diff --git a/packages/pieces/community/slack/src/lib/triggers/new-command.ts b/packages/pieces/community/slack/src/lib/triggers/new-command.tsindex aca51048f48..eed6668f63b 100644--- a/packages/pieces/community/slack/src/lib/triggers/new-command.ts+++ b/packages/pieces/community/slack/src/lib/triggers/new-command.ts@@ -26,16 +26,14 @@ export const newCommand = createTrigger({user: userId(true),commands: Property.Array({displayName: 'Commands',- description:- 'List of valid commands that the bot should respond to (e.g., help, ocr, remind)',+ description: 'Words the bot responds to, such as help or remind.',required: true,defaultValue: ['help'],}),channels: Property.MultiSelectDropdown({auth: slackAuth,displayName: 'Channels',- description:- 'If no channel is selected, the flow will be triggered for commands in all channels',+ description: 'Empty means every channel the bot is in.',required: false,refreshers: [],async options({ auth }) {@@ -56,8 +54,9 @@ export const newCommand = createTrigger({},}),ignoreBots: Property.Checkbox({- displayName: 'Ignore Bot Messages ?',- required: true,+ displayName: 'Ignore Bot Messages',+ description: 'Skip messages posted by bots and apps.',+ required: false,defaultValue: true,}),},@@ -99,7 +98,6 @@ export const newCommand = createTrigger({return [];}- // Check for mention and parse commandif (user && payloadBody.event.text) {const parsedCommand = parseCommand(payloadBody.event.text,@@ -107,8 +105,7 @@ export const newCommand = createTrigger({commands);- if (parsedCommand && commands.includes(parsedCommand.command)) {- // Return event with parsed command+ if (parsedCommand) {return [{...payloadBody.event,diff --git a/packages/pieces/community/slack/src/lib/triggers/new-direct-message.ts b/packages/pieces/community/slack/src/lib/triggers/new-direct-message.tsindex cd6083bb680..4969a4e0879 100644--- a/packages/pieces/community/slack/src/lib/triggers/new-direct-message.ts+++ b/packages/pieces/community/slack/src/lib/triggers/new-direct-message.ts@@ -19,13 +19,15 @@ export const newDirectMessageTrigger = createTrigger({props: {info: appWebhookSetupInfo,ignoreBots: Property.Checkbox({- displayName: 'Ignore Bot Messages ?',- required: true,+ displayName: 'Ignore Bot Messages',+ description: 'Skip messages posted by bots and apps.',+ required: false,defaultValue: false,}),ignoreSelfMessages: Property.Checkbox({- displayName: 'Ignore Message from Yourself ?',- required: true,+ displayName: 'Ignore My Own Messages',+ description: 'Skip messages sent by the connected user. Needs a user token.',+ required: false,defaultValue: false,}),},diff --git a/packages/pieces/community/slack/src/lib/triggers/new-mention-in-direct-message.ts b/packages/pieces/community/slack/src/lib/triggers/new-mention-in-direct-message.tsindex b03d3ab72bb..a30bf7e82e5 100644--- a/packages/pieces/community/slack/src/lib/triggers/new-mention-in-direct-message.ts+++ b/packages/pieces/community/slack/src/lib/triggers/new-mention-in-direct-message.ts@@ -23,13 +23,15 @@ export const newMentionInDirectMessageTrigger = createTrigger({info: appWebhookSetupInfo,user: userId(true),ignoreBots: Property.Checkbox({- displayName: 'Ignore Bot Messages ?',- required: true,+ displayName: 'Ignore Bot Messages',+ description: 'Skip messages posted by bots and apps.',+ required: false,defaultValue: false,}),ignoreSelfMessages: Property.Checkbox({- displayName: 'Ignore Message from Yourself ?',- required: true,+ displayName: 'Ignore My Own Messages',+ description: 'Skip messages sent by the connected user. Needs a user token.',+ required: false,defaultValue: false,}),},diff --git a/packages/pieces/community/slack/src/lib/triggers/new-mention.ts b/packages/pieces/community/slack/src/lib/triggers/new-mention.tsindex 6017be1e92b..80b0982bc33 100644--- a/packages/pieces/community/slack/src/lib/triggers/new-mention.ts+++ b/packages/pieces/community/slack/src/lib/triggers/new-mention.ts@@ -26,8 +26,7 @@ export const newMention = createTrigger({channels: Property.MultiSelectDropdown({auth: slackAuth,displayName: 'Channels',- description:- 'If no channel is selected, the flow will be triggered for username mentions in all channels',+ description: 'Empty means every channel the bot is in.',required: false,refreshers: [],async options({ auth }) {@@ -48,21 +47,28 @@ export const newMention = createTrigger({},}),ignoreBots: Property.Checkbox({- displayName: 'Ignore Bot Messages ?',- required: true,+ displayName: 'Ignore Bot Messages',+ description: 'Skip messages posted by bots and apps.',+ required: false,defaultValue: false,}),removeMention: Property.Checkbox({displayName: 'Remove Mention from Message',- description: 'If enabled, provides a clean_text field with the user and user group mentions removed from the message.',- required: true,+ description: 'Adds clean_text with the mentions stripped out.',+ required: false,defaultValue: false,+ advanced: true,}),},type: TriggerStrategy.APP_WEBHOOK,sampleData: undefined,outputSchema: newMentionTriggerOutputSchema,onEnable: async (context) => {+ const users = context.propsValue.users ?? [];+ const usergroups = context.propsValue.usergroups ?? [];+ if (users.length === 0 && usergroups.length === 0) {+ throw new Error('Pick at least one user or user group; with both empty this trigger never fires.');+ }const teamId = await getTeamId(context.auth as SlackAuthValue);context.app.createListeners({events: ['message'],diff --git a/packages/pieces/community/slack/src/lib/triggers/new-message-in-channel.ts b/packages/pieces/community/slack/src/lib/triggers/new-message-in-channel.tsindex cb434601ef3..aa1fe1a1469 100644--- a/packages/pieces/community/slack/src/lib/triggers/new-message-in-channel.ts+++ b/packages/pieces/community/slack/src/lib/triggers/new-message-in-channel.ts@@ -21,8 +21,9 @@ export const newMessageInChannelTrigger = createTrigger({info: singleSelectChannelInfo,channel: slackChannel(true),ignoreBots: Property.Checkbox({- displayName: 'Ignore Bot Messages ?',- required: true,+ displayName: 'Ignore Bot Messages',+ description: 'Skip messages posted by bots and apps.',+ required: false,defaultValue: false,}),},diff --git a/packages/pieces/community/slack/src/lib/triggers/new-message.ts b/packages/pieces/community/slack/src/lib/triggers/new-message.tsindex 0654080c53e..3bc7ad75648 100644--- a/packages/pieces/community/slack/src/lib/triggers/new-message.ts+++ b/packages/pieces/community/slack/src/lib/triggers/new-message.ts@@ -17,8 +17,9 @@ export const newMessageTrigger = createTrigger({props: {info: appWebhookSetupInfo,ignoreBots: Property.Checkbox({- displayName: 'Ignore Bot Messages ?',- required: true,+ displayName: 'Ignore Bot Messages',+ description: 'Skip messages posted by bots and apps.',+ required: false,defaultValue: false,}),},diff --git a/packages/pieces/community/slack/src/lib/triggers/new-modal-interaction.ts b/packages/pieces/community/slack/src/lib/triggers/new-modal-interaction.tsindex a1791a03a93..0aaf4fc2951 100644--- a/packages/pieces/community/slack/src/lib/triggers/new-modal-interaction.ts+++ b/packages/pieces/community/slack/src/lib/triggers/new-modal-interaction.ts@@ -19,7 +19,8 @@ export const newModalInteractionTrigger = createTrigger({info: interactivitySetupInfo,interactionType: Property.StaticDropdown({displayName: 'Interaction Type',- description: 'Select the type of modal interaction to trigger on.',+ description:+ 'Submit fires on send, Close fires when the modal is dismissed.',required: true,defaultValue: 'view_submission',options: {diff --git a/packages/pieces/community/slack/src/lib/triggers/new-reaction-added.ts b/packages/pieces/community/slack/src/lib/triggers/new-reaction-added.tsindex fd2b1c143b5..47d36e5e516 100644--- a/packages/pieces/community/slack/src/lib/triggers/new-reaction-added.ts+++ b/packages/pieces/community/slack/src/lib/triggers/new-reaction-added.ts@@ -23,16 +23,15 @@ export const newReactionAdded = createTrigger({webhookInfo: appWebhookSetupInfo,info: multiSelectChannelInfo,emojis: Property.Array({- displayName: 'Emojis (E.g fire, smile)',- description: 'Select emojis to trigger on',+ displayName: 'Emojis',+ description: 'Emoji names without colons. Empty means any emoji.',required: false,}),user: userId(false),channels: Property.MultiSelectDropdown({auth: slackAuth,displayName: 'Channels',- description:- 'If no channel is selected, the flow will be triggered for reactions in all channels the app has access to',+ description: 'Empty means every channel the bot is in.',required: false,refreshers: [],async options({ auth }) {diff --git a/packages/pieces/community/slack/src/lib/triggers/new-reaction-removed.ts b/packages/pieces/community/slack/src/lib/triggers/new-reaction-removed.tsindex cffa506c238..df011627ce6 100644--- a/packages/pieces/community/slack/src/lib/triggers/new-reaction-removed.ts+++ b/packages/pieces/community/slack/src/lib/triggers/new-reaction-removed.ts@@ -22,16 +22,15 @@ export const newReactionRemoved = createTrigger({webhookInfo: appWebhookSetupInfo,info: multiSelectChannelInfo,emojis: Property.Array({- displayName: 'Emojis (E.g fire, smile)',- description: 'Select emojis to trigger on',+ displayName: 'Emojis',+ description: 'Emoji names without colons. Empty means any emoji.',required: false,}),user: userId(false),channels: Property.MultiSelectDropdown({auth: slackAuth,displayName: 'Channels',- description:- 'If no channel is selected, the flow will be triggered for reactions removed in all channels the app has access to',+ description: 'Empty means every channel the bot is in.',required: false,refreshers: [],async options({ auth }) {diff --git a/packages/pieces/community/slack/src/lib/triggers/new-saved-message.ts b/packages/pieces/community/slack/src/lib/triggers/new-saved-message.tsindex 3dfc99053da..88ce4540d10 100644--- a/packages/pieces/community/slack/src/lib/triggers/new-saved-message.ts+++ b/packages/pieces/community/slack/src/lib/triggers/new-saved-message.ts@@ -9,7 +9,7 @@ export const newSavedMessageTrigger = createTrigger({name: 'new-saved-message',classification: 'READ',displayName: 'New Saved Message',- description: 'Triggers when you save a message.',+ description: 'Triggers when a message is saved.',aiMetadata: {description:'Fires when the connected Slack user saves (stars) a message. Only star_added events whose saved item is a message fire; saving other item types does not trigger. The event payload is the saved item, including its channel and message reference.',@@ -34,7 +34,6 @@ export const newSavedMessageTrigger = createTrigger({run: async (context) => {const payloadBody = context.payload.body as PayloadBody;- // check if it's saved messageif (payloadBody.event.type === 'star_added' && payloadBody.event.item.type ==='message') {return [payloadBody.event.item];}diff --git a/packages/pieces/community/slack/src/lib/triggers/new-team-custom-emoji.ts b/packages/pieces/community/slack/src/lib/triggers/new-team-custom-emoji.tsindex 17dd4beb2d5..f5731f9ea99 100644--- a/packages/pieces/community/slack/src/lib/triggers/new-team-custom-emoji.ts+++ b/packages/pieces/community/slack/src/lib/triggers/new-team-custom-emoji.ts@@ -53,8 +53,7 @@ export const newTeamCustomEmojiTrigger = createTrigger({run: async (context) => {const payloadBody = context.payload.body as PayloadBody;- // check if it's emoji message- if (payloadBody.event.type !== 'emoji_changed' && payloadBody.event.subtype !== 'add') {+ if (payloadBody.event.type !== 'emoji_changed' || payloadBody.event.subtype !== 'add') {return [];}diff --git a/packages/pieces/community/slack/src/lib/triggers/new-user.ts b/packages/pieces/community/slack/src/lib/triggers/new-user.tsindex 0ebfd553ddc..94088436bf6 100644--- a/packages/pieces/community/slack/src/lib/triggers/new-user.ts+++ b/packages/pieces/community/slack/src/lib/triggers/new-user.ts@@ -93,7 +93,6 @@ export const newUserTrigger = createTrigger({run: async (context) => {const payloadBody = context.payload.body as PayloadBody;- // check if it's emoji messageif (payloadBody.event.type !== 'team_join') {return [];}diff --git a/packages/pieces/community/slack/test/step-form-fixes.test.ts b/packages/pieces/community/slack/test/step-form-fixes.test.tsnew file mode 100644index 00000000000..6f70fb17cb0--- /dev/null+++ b/packages/pieces/community/slack/test/step-form-fixes.test.ts@@ -0,0 +1,161 @@+import { AppConnectionType } from '@activepieces/pieces-framework';+import { beforeEach, describe, expect, it, vi } from 'vitest';++type RepliesArgs = { channel: string; ts: string; limit?: number; cursor?: string };++const repliesCalls: RepliesArgs[] = [];+let repliesPages: Record<string, { messages: { ts: string; text: string }[]; response_metadata?: { next_cursor?: string } }> = {};++vi.mock('@slack/web-api', () => ({+ WebClient: class {+ conversations = {+ replies: async (args: RepliesArgs) => {+ repliesCalls.push(args);+ return { ok: true, ...repliesPages[args.cursor ?? 'first'] };+ },+ };+ },+}));++const { retrieveThreadMessages } = await import('../src/lib/actions/retrieve-thread-messages');+const { slackGetThreadRepliesAiAction } = await import('../src/lib/actions/get-thread-replies.action');+const { newTeamCustomEmojiTrigger } = await import('../src/lib/triggers/new-team-custom-emoji');+const { newMention } = await import('../src/lib/triggers/new-mention');++const auth = {+ type: AppConnectionType.CUSTOM_AUTH,+ props: { botToken: 'xoxb-test' },+};++function actionContext(propsValue: Record<string, unknown>) {+ return {+ auth,+ propsValue,+ server: { publicUrl: 'https://cloud.activepieces.com/api/' },+ project: { id: 'proj_1' },+ flows: { current: { id: 'flow_1' } },+ };+}++function triggerContext({ event, propsValue = {} }: { event: Record<string, unknown>; propsValue?: Record<string, unknown> }) {+ return {+ auth,+ propsValue,+ payload: { body: { event }, headers: {}, queryParams: {} },+ app: { createListeners: vi.fn() },+ };+}++beforeEach(() => {+ repliesCalls.length = 0;+ repliesPages = {};+});++describe('New Team Custom Emoji only fires on additions', () => {+ it.each([+ ['add', 1],+ ['remove', 0],+ ['rename', 0],+ ])('subtype %s yields %i event(s)', async (subtype, expected) => {+ const event = { type: 'emoji_changed', subtype, name: 'partyparrot', value: 'https://emoji.example/parrot.gif' };+ const result = await newTeamCustomEmojiTrigger.run(triggerContext({ event }) as never);+ expect(result).toHaveLength(expected);+ if (expected === 1) {+ expect(result[0]).toEqual({ id: 'partyparrot', image: 'https://emoji.example/parrot.gif' });+ }+ });++ it('ignores unrelated event types', async () => {+ const event = { type: 'message', subtype: 'add', name: 'x', value: 'y' };+ expect(await newTeamCustomEmojiTrigger.run(triggerContext({ event }) as never)).toEqual([]);+ });+});++describe('thread replies are fetched across every page', () => {+ const parent = { ts: '1710304378.475129', text: 'parent' };++ function threeRepeatedParentPages() {+ repliesPages = {+ first: { messages: [parent, { ts: '1.1', text: 'a' }], response_metadata: { next_cursor: 'c2' } },+ c2: { messages: [parent, { ts: '1.2', text: 'b' }], response_metadata: { next_cursor: 'c3' } },+ c3: { messages: [{ ts: '1.3', text: 'c' }], response_metadata: { next_cursor: '' } },+ };+ }++ it.each([+ ['Retrieve Thread Messages', () => retrieveThreadMessages],+ ['Get Thread Replies (AI)', () => slackGetThreadRepliesAiAction],+ ])('%s follows cursors, dedupes the parent and blanks the cursor', async (_name, action) => {+ threeRepeatedParentPages();+ const result = await action().run(actionContext({ channel: 'C0123ABCD', threadTs: parent.ts }) as never);+ expect(repliesCalls.map((call) => call.cursor)).toEqual([undefined, 'c2', 'c3']);+ expect(repliesCalls.every((call) => call.limit === 200)).toBe(true);+ expect(result.messages?.map((message) => message.ts)).toEqual([parent.ts, '1.1', '1.2', '1.3']);+ expect(result.has_more).toBe(false);+ expect(result.response_metadata?.next_cursor).toBe('');+ });++ it('stops on a repeated cursor instead of looping forever', async () => {+ repliesPages = {+ first: { messages: [parent], response_metadata: { next_cursor: 'loop' } },+ loop: { messages: [{ ts: '2.1', text: 'a' }], response_metadata: { next_cursor: 'loop' } },+ };+ const result = await retrieveThreadMessages.run(actionContext({ channel: 'C0123ABCD', threadTs: parent.ts }) as never);+ expect(repliesCalls).toHaveLength(2);+ expect(result.messages?.map((message) => message.ts)).toEqual([parent.ts, '2.1']);+ expect(result.has_more).toBe(true);+ expect(result.response_metadata?.next_cursor).toBe('loop');+ });++ it('stops after 50 pages and hands back the cursor to continue from', async () => {+ const pages: typeof repliesPages = { first: { messages: [parent], response_metadata: { next_cursor: 'c1' } } };+ for (let index = 1; index <= 60; index += 1) {+ pages[`c${index}`] = { messages: [{ ts: `${index}.0`, text: `reply ${index}` }], response_metadata: { next_cursor: `c${index + 1}` } };+ }+ repliesPages = pages;+ const result = await retrieveThreadMessages.run(actionContext({ channel: 'C0123ABCD', threadTs: parent.ts }) as never);+ expect(repliesCalls).toHaveLength(50);+ expect(result.messages).toHaveLength(50);+ expect(result.has_more).toBe(true);+ expect(result.response_metadata?.next_cursor).toBe('c50');+ });++ it.each([+ ['Retrieve Thread Messages', () => retrieveThreadMessages],+ ['Get Thread Replies (AI)', () => slackGetThreadRepliesAiAction],+ ])('%s continues from a cursor handed back by a capped run', async (_name, action) => {+ repliesPages = {+ c50: { messages: [{ ts: '50.0', text: 'reply 50' }], response_metadata: { next_cursor: 'c51' } },+ c51: { messages: [{ ts: '51.0', text: 'reply 51' }], response_metadata: { next_cursor: '' } },+ };+ const result = await action().run(actionContext({ channel: 'C0123ABCD', threadTs: parent.ts, cursor: 'c50' }) as never);+ expect(repliesCalls.map((call) => call.cursor)).toEqual(['c50', 'c51']);+ expect(result.messages?.map((message) => message.ts)).toEqual(['50.0', '51.0']);+ expect(result.has_more).toBe(false);+ });++ it('accepts a message link as the thread timestamp', async () => {+ repliesPages = { first: { messages: [parent], response_metadata: { next_cursor: '' } } };+ await retrieveThreadMessages.run(actionContext({ channel: 'C0123ABCD', threadTs: 'https://acme.slack.com/archives/C0123ABCD/p1710304378475129' }) as never);+ expect(repliesCalls[0].ts).toBe(parent.ts);+ });+});++describe('New Mention in Channel refuses to enable with nothing to match', () => {+ it('throws when both users and user groups are empty', async () => {+ await expect(newMention.onEnable(triggerContext({ event: {}, propsValue: { users: [], usergroups: [] } }) as never)).rejects.toThrow(/at least one user or user group/);+ });++ it('does not fire when no configured user or group is mentioned', async () => {+ const event = { channel: 'C1', channel_type: 'channel', text: 'hello <@U999>' };+ const result = await newMention.run(triggerContext({ event, propsValue: { users: ['U123'], usergroups: [], channels: [], ignoreBots: false } }) as never);+ expect(result).toEqual([]);+ });++ it('fires and strips the mention when asked to', async () => {+ const event = { channel: 'C1', channel_type: 'channel', text: '<@U123> ship it' };+ const result = await newMention.run(triggerContext({ event, propsValue: { users: ['U123'], usergroups: [], channels: [], ignoreBots: false, removeMention: true } }) as never);+ expect(result).toHaveLength(1);+ expect((result[0] as { clean_text: string }).clean_text).toBe('ship it');+ });+});