Slack Modal Interface
Configured with HTTP Request, Limit, Respond To Webhook, Service Now, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- Transform
- Web / API
- Routing
- Trigger
- Integration
- Messaging
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| Parse Webhook | Transform | Edit Fields | See node parameters |
| Close Modal Popup | Web / API | Respond To Webhook | See node parameters |
| Route Message | Routing | Switch | See node parameters |
| ServiceNow Modal | Web / API | HTTP Request | POST |
| Webhook | Trigger | Webhook | See node parameters |
| Send 200 | Web / API | Respond To Webhook | See node parameters |
| ServiceNow | Integration | Service Now | incident / getAll |
| Channel - Notify User no Incidents Matched | Messaging | Slack | See node parameters |
| DM - Notify User no Incidents Matched | Messaging | Slack | See node parameters |
| Were Incidents Found? | Routing | If | See node parameters |
| No Matches - Was a Channel Selected? | Routing | If | See node parameters |
| Sort by Most Recent | Transform | Sort | See node parameters |
| Retain First 5 Incidents | Transform | Limit | See node parameters |
| Loop Over Items | Routing | Loop Over Items | See node parameters |
| Format Incident Details | Transform | Edit Fields | See node parameters |
| Format Slack Message | Transform | Edit Fields | See node parameters |
| Concatenate Incident Details | Transform | Summarize | See node parameters |
| DM - Send Matching Incidents | Messaging | Slack | See node parameters |
| Channel - Send Matching Incidents | Messaging | Slack | See node parameters |
| Was a Channel Selected? | Routing | If | See node parameters |
| Respond to Slack Webhook | Web / API | Respond To Webhook | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
serviceNowBasicApislackApi
Workflow notes
Slack Modal Interface
Slack Modal Interface
When triggered, Slack will display this interface to allow Slack users to search ServiceNow for tickets based on priority and state, and then allow you to choose which channel to output the results. If no channel is found, the response will be sent to the Slack user via DM.
Receive and Parse Slack Event via Webhook
Receive and Parse Slack Event via Webhook
This section begins with the Webhook node, which captures events from Slack, such as modal submissions or button presses. The payload from Slack is then processed by the Parse Webhook node to extract relevant details like callback IDs, user inputs (e.g., priority and state), and additional metadata. Once the data is parsed, it is passed to the Route Message node, which evaluates the callback ID or action type using a Switch node. Depending on the conditions, the workflow routes the data to specific paths: handling modal requests, processing data submissions, or responding to button actions. This setup ensures seamless handling of different Slack interactions and prepares the data for subsequent steps.
Respond to Modal request
Respond to Modal request
This section starts with the Respond to Slack Webhook, which sends an acknowledgment to Slack after a modal interaction is triggered. This ensures the Slack interface remains error-free and provides a smooth user experience. Following this, the ServiceNow Modal node is used to open a Slack modal via the Slack API. The modal allows users to input search parameters for ServiceNow incidents, such as priority and state. Additionally, users can select the Slack channel where the results will be posted. This integration ensures a seamless connection between Slack and ServiceNow, enabling users to perform detailed searches directly from Slack.
Close Modal and Search Service Now
Close Modal and Search Service Now
This section starts with the Close Modal Popup node, which sends a response to Slack to close the modal after user input has been captured. Once the modal is closed, the workflow moves to the ServiceNow node. This node performs an API query to retrieve incidents from ServiceNow that match the specified state and priority provided by the user in the modal form. The query results are then evaluated by the Were Incidents Found? node, an If node that checks if any incidents were returned by the query. This section ensures a smooth transition from user input in Slack to backend data retrieval in ServiceNow, facilitating the identification of relevant incidents.
No Incidents found, respond to Slack
No Incidents found, respond to Slack
This section begins with the No Matches - Was a Channel Selected? node, which evaluates whether the user selected a specific Slack channel for receiving notifications. If a channel was selected, the workflow proceeds to the Channel - Notify User no Incidents Matched node, which sends a message to the designated channel informing users that no incidents were found matching the specified criteria of state and priority.
If no channel was selected, the workflow uses the DM - Notify User no Incidents Matched node to send a direct message to the user who initiated the query. This message includes details about the search parameters, ensuring the user is informed of the results regardless of the outcome. This step ensures transparent and efficient communication, whether via a public channel or a private direct message.
Respond to Slack Button Press with 200 Response
Respond to Slack Button Press with 200 Response
This section uses the Send 200 node to send a 200 HTTP response back to Slack whenever a button press event is triggered in a Slack message. This response is crucial for preventing Slack from showing errors in its Block Kit user interface, ensuring a seamless and professional interaction for the user. By handling these button press events gracefully, this step maintains a positive user experience and avoids unnecessary confusion or interruptions.
Sort and format Results for block kit
Sort and format Results for block kit
This section begins by organizing the incident data retrieved from ServiceNow. The Sort by Most Recent node arranges the incidents in descending order, ensuring that the latest ones are processed first. Next, the Retain First 5 Incidents node limits the output to the five most recent incidents for clarity and focus.
The Loop Over Items node iterates through each incident, allowing the workflow to process them individually. During each loop, the Format Incident Details node structures the details of each incident into a format compatible with Slack’s Block Kit, ensuring readability and a professional appearance.
Once all incidents are formatted, the Concatenate Incident Details node aggregates the results into a single, cohesive message. Finally, the Format Slack Message node prepares the Slack message with a friendly greeting, summary details, and links to view the full incidents in ServiceNow. This section ensures that incident information is not only organized but also presented in a visually appealing and actionable manner within Slack.
Check if Slack channel selected and send Incident results in block kit format
Check if Slack channel selected and send Incident results in block kit format
This section begins with the Was a Channel Selected? node, which checks whether the user specified a Slack channel to receive the output. If a channel is selected, the workflow proceeds to the Channel - Send Matching Incidents node, which sends the formatted incident details to the chosen Slack channel using Block Kit. The message includes key information such as incident summaries, priorities, and state details, ensuring effective communication to the target audience.
If no channel was selected, the workflow uses the DM - Send Matching Incidents node to deliver the same information directly to the user via a Slack direct message. By dynamically adjusting the delivery method based on the user's input, this step ensures the incident results are communicated efficiently, whether to a broader audience or privately to the user.
Slack Modal Interface
Slack Modal Interface
Purpose and structure
This folder contains the Slack Modal Interface workflow. Its executable nodes use httpRequest, if, limit, respondToWebhook, serviceNow, set, slack, sort, splitInBatches, summarize, switch, webhook. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
Webhook
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Limit/0685_Limit_Webhook_Send_Webhook.json MIT; preserve source notices.