Slack Channel Provider

Configuration

The configuration steps are explained in the slack configuration page.

Slack Token

ParameterTypeRequired(*)Description
webhookobjectObtained directly from the incoming_webhook object in the installation response from the Slack API.
└ urlstring*
oauthobject
└ scopestring
└ channel_idstring*
└ installation_idstring*

Example

{
  "webhook": {
    "url": "https://example.com/webhook"
  }
}

Schema

{
  "$id": "slackToken",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "minProperties": 1,
  "properties": {
    "oauth": {
      "properties": {
        "channel_id": {
          "type": "string"
        },
        "installation_id": {
          "type": "string"
        },
        "scope": {
          "type": "string"
        }
      },
      "required": [
        "channel_id",
        "installation_id"
      ],
      "type": "object"
    },
    "webhook": {
      "description": "Obtained directly from the incoming_webhook object in the installation response from the Slack API.",
      "properties": {
        "url": {
          "format": "uri",
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "url"
      ],
      "type": "object"
    }
  },
  "type": "object"
}

Usage

1. When configured with

{
  "app_id": "12345678901",
  "client_id": "1.0",
  "client_secret": "12345678901234567890123456789012",
  "signing_secret": "12345678901234567890123456789012"
}

2. With a channel token

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "properties": {
    "app_id": {
      "description": "The Slack app ID that can be found in the app's settings page of the Slack API dashboard.",
      "pattern": "^[0-9A-Z]+$",
      "type": "string"
    },
    "client_id": {
      "description": "The Slack client ID that can be found in the app's settings page of the Slack API dashboard.",
      "pattern": "^[0-9]+\\.[0-9]+$",
      "type": "string"
    },
    "client_secret": {
      "description": "The Slack client secret that can be found in the app's settings page of the Slack API dashboard.",
      "maxLength": 32,
      "minLength": 32,
      "type": "string"
    },
    "signing_secret": {
      "description": "The Slack signing secret that can be found in the app's settings page of the Slack API dashboard.",
      "maxLength": 32,
      "minLength": 32,
      "type": "string"
    }
  },
  "required": [
    "app_id",
    "client_id",
    "client_secret",
    "signing_secret"
  ],
  "type": "object"
}

3. With Broadcast

{
  "action_url": "https://example.com",
  "category": "example",
  "content": "Hello, World!",
  "custom_attributes": {},
  "id": "d1b3b3b3-3b3b-3b3b-3b3b-3b3b3b3b3b3b",
  "overrides": {},
  "recipients": [
    {
      "custom_attributes": {
        "plan": "enterprise",
        "preferred_pronoun": "They",
        "pricing_version": "v10"
      },
      "email": "test@example.com",
      "external_id": "83d987a-83fd034",
      "first_name": "Person",
      "last_name": "Doe",
      "phone_numbers": [
        "+1 5005550001"
      ]
    }
  ],
  "title": "Hello, World!",
  "topic": "example"
}

The channel handler triggers a HTTP request

POST https://example.com/webhook

With payload

{
  "delete_original": false,
  "replace_original": false,
  "text": "*Hello, World!*\nHello, World!\nhttps://example.com"
}