Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this Article

...

In any enterprise ecosystem, receiving notifications is critical to carry out your daily tasks. Emails are no longer the preferred method of receiving notifications, especially when the notifications involve time-critical issues. Managers usually run on a time crunch; to fasten the decision-making process and deliver results, they can configure an Event Listener in their Slack workspace to cut through the clutter and get notified on items that need their immediate attention. This use case demonstrates how we can use the Slack Snap Pack to route events that are important to the manager into a custom channel created for this purpose.

...

Understanding the Slack Pipeline

Prerequisites

  • Create an app in your Slack Workspace that listens to the Slack instance.
  • Set the required scopes for the app. In this Use Case we set the Bot and User Token scopes to perform the following actions:
    • Add read channels, read messages, and read users.
    • Add write messages and read channels.

...

Info
iconfalse
titleExpression

There are three elements in this expression: Token, Challenge and Type.

  • If the element is a challenge, the Snap sends the JSON response containing the challenge.
  • If the element is an event, the Snap checks whether it is Retry, because most often the Pipeline might take more time to process events. Hence, if the Slack application does not get response in three seconds, the Snap retriggers the Pipeline.
  • If it is a retry, the Snap sends the JSON object without processing it. If it is a not a retry, the Snap sends the event for further processing.


Next, we create a a
triggered task for the Parent Pipeline and do the following:

...

. From the Triggered task dialog window, we copy the Cloud URL and HTTP Header (token) and paste it in Request URL field in the Slack app for verification.

...

Note

You must append the bearer token to the URL. 

Once the Slack receives the challenge from the Parent Pipeline, the URL is verified.

...

 After the URL is verified which usually takes three seconds, the request triggers the Parent Pipeline and it receives the challenge as response
Image RemovedImage Added


Note

The Request URL should correspond to the same URL used for event subscription.

...