diff --git a/_snippets/components/integrations/slack-tool-steps.mdx b/_snippets/components/integrations/slack-tool-steps.mdx index e49d9322..3923108d 100644 --- a/_snippets/components/integrations/slack-tool-steps.mdx +++ b/_snippets/components/integrations/slack-tool-steps.mdx @@ -5,4 +5,7 @@ Use a Tool step to retrieve messages from one of your Slack channels. + + Configure form and wizard buttons with text inputs and dropdown fields. + \ No newline at end of file diff --git a/build/tools/tool-steps/slack/interactive-forms.mdx b/build/tools/tool-steps/slack/interactive-forms.mdx new file mode 100644 index 00000000..681b964d --- /dev/null +++ b/build/tools/tool-steps/slack/interactive-forms.mdx @@ -0,0 +1,94 @@ +--- +title: "Slack interactive forms" +sidebarTitle: "Interactive forms" +description: "Configure pop-up forms and wizard steps that agents send to Slack users, with text inputs and dropdown fields." +--- + +Agents can send interactive cards to Slack that prompt users for input before the workflow continues. When a Slack user clicks a button on the card, they see either a pop-up form or a multi-step wizard that collects the information the agent needs. + +You can learn more about the Slack integration [here](/integrations/popular-integrations/slack). + +## Button types + +Each button on an agent's Slack card has a type that controls what happens when a user clicks it: + + + + Sends a predefined message back to the agent. No additional input is required from the Slack user. + + + Opens a single-page pop-up form with one or more fields for the Slack user to fill in before submitting. + + + Opens a multi-step form that walks the Slack user through a sequence of pages, each with its own fields. + + + +## Configuring form fields + +Both form and wizard button types support one or more fields per step. Whether a field renders as a text input or a dropdown depends on whether you include an `options` array in the field definition. + +### Text input + +A field without an `options` array renders as a free-text input box. Use this when the user's response is open-ended or the set of valid values isn't fixed. + +```json +{ + "label": "Describe the issue", + "name": "issue_description" +} +``` + +### Dropdown fields + +Adding an `options` array to a field definition makes it render as a single-select dropdown menu instead of a text input box. Each option has two properties: + +- **`label`** — the text the Slack user sees in the dropdown menu +- **`value`** — the string the agent receives when the user selects that option + +```json +{ + "label": "Priority", + "name": "priority", + "options": [ + { "label": "High", "value": "high" }, + { "label": "Medium", "value": "medium" }, + { "label": "Low", "value": "low" } + ] +} +``` + +The `value` sent to the agent can differ from the `label` shown to the Slack user. Use `label` for human-readable display text and `value` for the identifier your agent acts on. + +You can mix field types within the same form — for example, a dropdown for structured choices and a text input for free-form notes: + + +```json +{ + "fields": [ + { + "label": "Priority", + "name": "priority", + "options": [ + { "label": "High", "value": "high" }, + { "label": "Medium", "value": "medium" }, + { "label": "Low", "value": "low" } + ] + }, + { + "label": "Additional notes", + "name": "notes" + } + ] +} +``` + + +#### Constraints + +Dropdowns are single-select only. Multi-select is not supported. + +- Maximum **100 options** per dropdown field. +- Option labels are capped at **75 characters**. +- Each option's `value` must be unique within the field — duplicate values are not allowed. +- A field configured with an `options` array cannot also be set to multi-line text input mode. diff --git a/build/tools/tool-steps/slack/send-message.mdx b/build/tools/tool-steps/slack/send-message.mdx index 6624e0af..9f424a49 100644 --- a/build/tools/tool-steps/slack/send-message.mdx +++ b/build/tools/tool-steps/slack/send-message.mdx @@ -8,6 +8,8 @@ The 'Slack - Send Message' Tool step allows you to send a message to one of your You can learn more about the Slack integration [here](/integrations/popular-integrations/slack). +To send interactive cards with form or wizard buttons — including dropdown fields — see [Slack interactive forms](/build/tools/tool-steps/slack/interactive-forms). + This integration for Slack was developed by our team and is not affiliated with Slack. Please contact our Support for any questions/queries you may have. ## Add the 'Slack - Send Message' Tool step to your Tool diff --git a/docs.json b/docs.json index 2391efd5..f14c9296 100644 --- a/docs.json +++ b/docs.json @@ -292,7 +292,8 @@ "group": "Slack Tool Steps", "pages": [ "build/tools/tool-steps/slack/send-message", - "build/tools/tool-steps/slack/retrieve-messages" + "build/tools/tool-steps/slack/retrieve-messages", + "build/tools/tool-steps/slack/interactive-forms" ] }, { diff --git a/integrations/popular-integrations/slack.mdx b/integrations/popular-integrations/slack.mdx index 1c0fc454..a8743641 100644 --- a/integrations/popular-integrations/slack.mdx +++ b/integrations/popular-integrations/slack.mdx @@ -198,7 +198,7 @@ You can configure your Slack agent to make API calls to Slack via Relevance AI's ### All Slack Tool steps -You can learn more about each of the Slack Tool steps on the following pages. +You can learn more about each of the Slack Tool steps on the following pages. For interactive cards with form and wizard buttons — including dropdown fields — see [Slack interactive forms](/build/tools/tool-steps/slack/interactive-forms).