n8n

How to Automate Slack ServiceNow Incident Lookup?

Give your team a fast way to check ticket details without leaving chat. Type a slash command in Slack with an incident ID and get clear results right away. Ideal for IT support, on call teams, and busy service desks.

Here is how it runs end to end. A Webhook node receives the Slack request. A Set node pulls the incident ID from the text field. The ServiceNow node searches the incident table using the number provided and returns display values. A Switch node checks the result and sends one of three replies. If found, the response shares key incident details back to Slack using a JSON block. If not found, the reply explains the ID is invalid. If ServiceNow fails, users see a clear error message. This cuts context switching and speeds up triage.

To put it in place, you need a Slack slash command and a ServiceNow account with basic auth. Point the Slack command to the n8n Webhook URL and connect the ServiceNow node with your credentials. Teams can expect faster answers in channels and less time spent hunting in multiple tabs. Great for NOC rooms, war rooms, and help desk channels during busy hours.

What are the key features?

  • Receives Slack slash command requests with a Webhook node using POST
  • Extracts the incident ID from the request body using a Set node
  • Searches the ServiceNow incident table with number matching and display values enabled
  • Routes results with a Switch node for found, not found, and error cases
  • Returns formatted JSON blocks to Slack with Respond to Webhook nodes
  • Sends HTTP 200 responses with Content Type application/json for Slack
  • Uses Basic Auth credentials to connect securely to ServiceNow

What are the benefits?

  • Reduce incident lookups from 5 minutes to under 10 seconds
  • Cut triage time by up to 60 percent by answering in Slack
  • Improve accuracy by using live data pulled from ServiceNow
  • Support many Slack users with one shared endpoint
  • Connect Slack and ServiceNow in a clear, reliable flow

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Slack and ServiceNow. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n canvas, open the Webhook node and copy the Test URL and Production URL. Keep these handy for your Slack slash command setup.
  4. In the n8n credentials manager, create a new ServiceNow Basic Auth credential. Enter your instance URL, username, and password, then save it with a clear name like ServiceNow Basic Prod.
  5. Open the ServiceNow node and choose the credential you just created from the Credential to connect with dropdown. Leave the resource set to incident and operation to getAll.
  6. In your Slack workspace, create or edit a Slack App with a Slash Command. Set the Request URL to the Webhook Production URL from n8n and make sure the method is POST.
  7. In the Slash Command settings, set the usage hint so users know to pass an incident number, for example /incident INC0012345. Save your changes.
  8. Back in n8n, confirm the Set node maps body.text to a field named incident_id. This ensures the ServiceNow node searches for the right number.
  9. Click Execute Workflow in n8n and trigger the Slack command using the Test URL first if needed. Check that the Switch node routes to the right Respond to Webhook node.
  10. If Slack times out or shows no response, verify the ServiceNow credential works by running the ServiceNow node alone. Also confirm the incident number format matches your instance.
  11. Activate the workflow in n8n and run a final test from a real Slack channel. You should see an in channel message with incident details, a not found note, or an error notice.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

ServiceNow

Sign up

ITSM Standard: Custom pricing (no public price)

Slack

Sign up

Free plan: $0 / mo; limited to 10 apps (third-party or custom) and usable via Slack API

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.