/slack-slash-command-receiver

A tiny microservice to receive slash command requests from Slack and forward them to Sesam

Primary LanguagePython

Slack slash command receiver

A tiny microservice to receive slash command requests from Slack.

The service mainly does three things:

  • It transforms the request from application/x-www-form-urlencoded to application/json.
  • It generates a uuid to give each request a unique id before it's forwarded to a http_endpoint pipe.
  • It validates the verification token defined in the Slack app.

Example config

{
  "_id": "slack-command-receiver",
  "type": "system:microservice",
  "docker": {
    "environment": {
      "ENDPOINT_URL": "$ENV(slack-command-pipe-endpoint)",
      "LOG_LEVEL": "INFO",
      "NODE_JWT": "$SECRET(slack-command-jwt)",
      "VALIDATION_TOKEN": "$SECRET(slack-command-validation-token)"
    },
    "image": "sesamcommunity/slack-slash-command-receiver",
    "port": 5000
  },
  "verify_ssl": true
}

Variables