boomerang-io / community

The Boomerang community, roadmap, planning, and architecture repository. The central place for information on joining, contributing, and governance.
https://useboomerang.io
Apache License 2.0
11 stars 0 forks source link

Add Slack App API Extension #352

Closed tlawrie closed 2 years ago

tlawrie commented 2 years ago

Following on from previous attempts to add the Slack App capabilities to the Listener service which were never finished by the community, we now need to consider next steps.

Upon investigation, it would make sense to add a /apis/v1/extensions/slack context and add the capability for Workflows to be triggered by a Slack app at that endpoint.

With this, we would build it to specifically respond to a predefined set of criteria. Such as a slash command in Slack (/workflow or similar) that is easily identifiable by short. This could then pop up with a modal that asks relevant questions such as which workflow to execute.

There are a number of factors to consider;

If you allow all users to use the slash command then it becomes very difficult to know how to return a list of workflows. In the short term to get this completed, I think the user will need to enter a Workflow ID and trigger a specific workflow. The modal can then contain the parameter inputs required to execute it.

In the longer term, we would grab the user information such as email from the slash command and have that match a user in Slack and return the workflows in a drop-down that they have access to.

tlawrie commented 2 years ago

Hey @amhudson as part of this task we need to add the following to Flows settings. If you could open a draft PR for the loader, ill let you know if there is additional items to be added. Thank you!

{
    "_id" : ObjectId("62a7bec0a6166d30aff64a5b"),
    "config" : [ 
        {
            "description" : "The auth token for authenticating as a Slack app.",
            "key" : "slack.token",
            "label" : "Slack Auth Token",
            "type" : "text",
            "value" : "",
            "readOnly" : false
        }
    ],
    "description" : "Define the configuration for integrating with the extensions.",
    "key" : "extensions",
    "lastModiifed" : ISODate("2022-01-20T23:09:32.800Z"),
    "name" : "Extensions Configuration",
    "type" : "ValuesList",
    "_class" : "io.boomerang.mongo.entity.FlowSettingsEntity"
}