Send last 5 ServiceNow requests via Slack

Social, UtilitiesIT HelpdeskUtilities

What it does

When someone runs the List ServiceNow Requests command in Slack, this automation searches ServiceNow for requests filed by that person. It sends the last 5 requests to the channel, or notifies them if none exist.

Who it's for

IT and Operations teams who need to check recent ServiceNow requests without leaving Slack.

Apps used

How teams use this

Check recent requests without opening ServiceNow

Run the command in Slack to see the last 5 requests someone filed, with an option to look up a specific incident by number from the reply.

Limit results to prevent channel spam

The automation stops after 5 requests so the Slack channel does not get flooded with a long list of every request ever filed.

Filter requests by status or priority

Add a condition to search only for requests with a specific status or priority level, so the list shows only the requests that matter most to someone.

Let managers review team requests

Invite the bot to a manager channel and modify the search to pull requests filed by team members instead of the person running the command.

How it works

  1. Run the List ServiceNow Requests command. Type the List ServiceNow Requests command in a Slack channel or direct message to retrieve recent requests filed by someone.
  2. Find the person in ServiceNow. Search ServiceNow for the person record matching the Slack email so the automation knows whose requests to retrieve.
  3. Search for pending requests. Query ServiceNow for all pending requests opened by that person, then limit the results to the last 5 to avoid spam in Slack.
  4. Send the request list to Slack. Post the last 5 requests in Slack, or notify someone if no requests exist. Prompt them to type an incident number for details.