--- title: Configure Slack modals in ServiceNow instance description: Create modal and specify fields that should be displayed in your Slack modal. Modal UI can be generated in two ways; automatically using a ServiceNow table and manually using a custom View Payload. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/integrate-applications/integration-hub/conf-slack-modals.html release: australia product: Integration Hub classification: integration-hub topic_type: task last_updated: "2026-03-12" reading_time_minutes: 6 breadcrumb: [Slack Spoke, Integration Hub spokes, Build integrations, Integration Hub, Workflow Data Fabric] --- # Configure Slack modals in ServiceNow instance Create modal and specify fields that should be displayed in your Slack modal. Modal UI can be generated in two ways; automatically using a ServiceNow table and manually using a custom **View Payload**. ## Before you begin Role required: admin. ## About this task For example, if you want to create incident using modal in Slack, the Create Incident modal requires **Priority**, **Category**, and **Short Description** fields. **Note:** Modals can be triggered from these interactive Slack components: - Command, - Block action, - Global shortcut, and - Message shortcut. ## Procedure 1. To create a modal with UI that is automatically generated using a ServiceNow table: 1. Navigate to **Slack** > **Slack Modal Configuration**. 2. Click **New**. 3. On the Slack Modal Configuration form, fill these values.
| Field | Description |
|---|---|
| Name | Name to identify the record. For example, `Modal to create incident`. |
| Modal Title | Modal title that is displayed on Slack. For example, `Create Incident`. |
| Table | ServiceNow table corresponding to the modal fields. For example, **Incident \[incident\]**. |
| Custom Modal | Option to configure a custom modal. |
| Input Fields | Inputs fields that should be displayed on Slack. For example, select **Priority**, **Category**, and **Short Description**. Ensure that these modal fields correspond to the selected ServiceNow table. For example, you can't display task related fields on a modal that creates an incident.**Note:** Only the string, date, and choice field types are supported. |
| Active | Option to actively use the record. |
| Script Validation | Script to validate inputs provided by the user in the modal. To validate the user-provided inputs, ensure that you are aware of the format in which values are retrieved from the modal and parse the response from Slack.The sample payload when user provides values for the **Priority**, **Category**, and **Short Description** fields in the Create Incident modal is: ``` {"priority":{"4gk":{"type":"static_select","selected_option":{"text":{"type":"plain_text","text":"1 - Critical","emoji":true},"value":"1"}}},"category":{"iV7":{"type":"static_select","selected_option":{"text":{"type":"plain_text","text":"Software","emoji":true},"value":"software"}}},"short_description":{"XS/Q=":{"type":"plain_text_input","value":"hemanth"}}} ``` To display validation errors in the modal, configure the script to return an object keys, status, and errorObject. errorObject should have a value of object that will be displayed on Slack. The object should have response\_action and error. Also, configure the script to return an object with keys of status and statusMessage when there are no validation errors. statusMessage is optional and you can configure it as per your requirement. \[Omitted image "slack-script-validation.png"\] Alt text: Script validation. |
| Field | Description |
|---|---|
| Name | Name to identify the record. For example, `Modal to create incident`. |
| Custom Modal | Option to configure a custom modal. Select this check box. |
| View Payload | Payload generated by Slack Block Kit Builder that defines the modal UI. For more information, see [Block Kit](https://api.slack.com/block-kit) and [Building with Block Kit](https://api.slack.com/block-kit/building). |
| Active | Option to actively use the record. |
| Script Validation | Script to validate inputs provided by the user in the modal. To validate the user-provided inputs, ensure that you are aware of the format in which values are retrieved from the modal and parse the response from Slack.The sample payload when user provides values for the **Priority**, **Category**, and **Short Description** fields in the Create Incident modal is: ``` {"priority":{"4gk":{"type":"static_select","selected_option":{"text":{"type":"plain_text","text":"1 - Critical","emoji":true},"value":"1"}}},"category":{"iV7":{"type":"static_select","selected_option":{"text":{"type":"plain_text","text":"Software","emoji":true},"value":"software"}}},"short_description":{"XS/Q=":{"type":"plain_text_input","value":"hemanth"}}} ``` To display validation errors in the modal, configure the script to return an object keys, status, and errorObject. errorObject should have a value of object that will be displayed on Slack. The object should have response\_action and error. Also, configure the script to return an object with keys of status and statusMessage when there are no validation errors. statusMessage is optional and you can configure it as per your requirement. \[Omitted image "slack-script-validation.png"\] Alt text: Script validation. |
| Category | Property name | Description | Example |
|---|---|---|---|
| Slash commands | sn\_slack\_ah\_v2.command.special\_characters | The characters encoded using the encodeURIComponent method are handled internally. To replace any additional special characters used in Slash commands in the Slack application with their encoded URI characters, add the characters in a JSON format. | \{ "~" : "%7E", "\\\(" : "%28", \} |
| Interactivity & Shortcuts: | sn\_slack\_ah\_v2.interactivity.special\_characters | The characters encoded using encodeURIComponent method and the following characters are handled internally: `!, ', (, ), *, ~` Fill in the property to replace any additional special characters used in Slack Interactivity & Shortcuts in the Slack application with their Encoded URI characters in a JSON format. | \{ "~" : "%7E", "\\\(" : "%28", \} |
| Field | Description |
|---|---|
| Label | Name to identify the inbound decision. |
| Answer | Subflow that must be triggered when the specified conditions are met. |
| Default Answer | Option to specify if this is the default answer. The default answer is applicable when the conditions are not met.1. Click the lookup icon \(\[Omitted image "SearchIcon.png"\] Alt text: Lookup icon\). 2. Select the required subflow from the Document list. **Note:** Ensure that the **Table name** is `Flow [sys_hub_flow]`. Ensure that you have configured the subflow to process the response payload from Slack to automate tasks. |
| Condition | Conditions to be met to perform tasks in ServiceNow instance. Specify the modal record in the condition. \[Omitted image "slack-modal-subflow.png"\] Alt text: Condition to trigger subflow. **Note:** **Condition** must have condition specific to the modal record only. |