Skip to content
This repository has been archived by the owner on Apr 28, 2021. It is now read-only.

keboola/wr-slack

Repository files navigation

Slack Writer

Build Status

Keboola Connection Writer for Slack

Usage

The following parameters are required:

  • #token - Workspace token obtained when the application is installed into Slack workspace (create a new App, go to OAuth & Permissions, select the permission chat:write:bot and then click Install App to obtain the token (xoxp-).
  • channel - Channel to send the messages to, e.g. #my-channel or @some-person

At least one table has to be provided on input mapping and it must have one or two columns. If present, the second column is assumed to be JSON string with message attachments.

Sample configuration:

{
	"storage": {
		"input": {
			"tables": [
				{
					"source": "in.c-main.messages",
					"destination": "messages.csv"
				}
			]
		}
	},
	"parameters": {
		"#token": "xoxp-00000000-...",
		"channel": "@some-person"
	}
}

Sample table:

"message"
"A message with a <http://connection.keboola.com/|link>"
"A Multiline
message with *bold text*"

Sample table with attachments:

"first_col"
"some message","[{""text"":""some text"",""actions"":[{""type"":""button"",""name"":""response"",""value"":""yes"",""text"":""yes"",""style"":""primary""}]}]"

Development

Clone this repository and init the workspace with following command:

git clone https://github.com/keboola/wr-slack
cd my-component
docker-compose build
docker-compose run --rm dev composer install --no-scripts

Run the test suite using this command:

docker-compose run --rm dev composer tests

Integration

For information about deployment and integration with KBC, please refer to the deployment section of developers documentation