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.

Building this Pipeline involves the following key steps:

  1. Create a Private Channel in Sack.
  2. Subscribe to the Slack events and events and verify the URL.
  3. Create a Child Pipeline.
  4. Create a Parent Pipeline.

...

  1. Navigate to https://api.slack.com/apps—Slack Apps page.
  2. Click Event Subscriptions in the left navigation pane.
  3. Enable the toggle for Enable Events.
  4. Subscribe to the events you want to listen.
    • Bot events: Whenever a bot performs the operation of adding a user to channel, we want to receive an alert.
    • User events: Whenever a user posts a message to public channel, private channel, individual user or multiple users or group of users, we want to receive an alert.
  5. Provide the URL of the triggered task of the Parent Pipeline in the Request URL field.
  6. To provide the Request URL in Slack app, you need to configure a stand-alone Pipeline with a Mapper Snap and create a triggered task.
    1. Configure a Mapper Snap as follows for verification.
    2. Create a a triggered task for the Pipeline.
    3. Copy the cloud URL and HTTP Header (token) and paste it in Request URL field in Slack app for verification. Note that you have to append the bearer token to the URL. 

    4. 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

      Note

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


Create a Parent Pipeline - Slack Listener

...