Slack Notification from Servicenow

Karishma Mehta1
Tera Contributor

Hello Experts,

 

I need help with sending Slack notification from ServiceNow.

The requirement is to  send Slack notification to the host when a pre-registered visitor checks in for their visit at a kiosk

Thanks in advance

 

8 REPLIES 8

Ronald Wells
Tera Expert

You can send messages to Slack a couple ways:

  1. Create a REST Message using the Slack API (requires more working knowledge of the API)
    or
  2. Install the Slack Spoke for Integration Hub (easier, but must be licensed for Integration Hub Starter).

After setting up your integration with Slack using one of the above methods, use either a business rule or a flow to trigger the event/message when the visitor checks in.

Thanks Ronald for your suggestion. I am using the Slack Spoke to trigger outbound message to the Host informing them about the visitor check in with an option to 'Reject' the check in request. Could you please advice how can we receive the response back from Slack once the host/slack user clicks on Reject button

@Karishma Mehta1 Outbound message to slack you may use the spoke like you mentioned. But to get a response of a reject action from Slack, you need to configure a flow from slack to call a custom endpoint in ServiceNow, or have a listener for slack webhook events.

----First Request (Outbound from ServiceNow to Slack)----

1. Visitor checks in to ServiceNow

2. ServiceNow flow runs and sends a message to Slack with approval

3. ServiceNow gets a 200 response from Slack that the message has been received

 

---Second Request (Inbound from Slack to ServiceNow)---

1. Host approves/rejects in Slack

2. Slack sends approve/reject event to ServiceNow via Slack automation

3. ServiceNow processes the approval

Thank you Chris for your response.

How can we implement the flow in Slack for sending the rejection from Slack in ServiceNow. What configurations do we have to in Slack and in ServiceNow for this ?

I have done the following so far:

1.After configuring the app at Slack side, added a new Slack connection in ServiceNow instance. 
2. Configured Slack app details and Signing Key in ServiceNow for authenticating requests.
3. Configured outbound configurations in ServiceNow instance. Specified events in ServiceNow for which actions will be performed on the Slack spoke application.
4. Once the above configuration was done, I created a copy of the default subflow Post Actionable Message. Created a new  flow to trigger the outbound message from ServiceNow to Slack. This flow triggers when the status changes to 'Check In' on the Visitor Registration table. 
5. A message is received in Slack with a Reject button.
 
Could you please provide me a  steps/solution for inbound.