---
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: ConfigMap
metadata:
labels:
funktion.fabric8.io/kind: Connector
provider: fabric8
project: connector-slack
version: 1.1.23
group: io.fabric8.funktion.connector
name: slack
data:
deployment.yml: |
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
funktion.fabric8.io/kind: Subscription
connector: slack
spec:
replicas: 1
template:
metadata:
labels:
funktion.fabric8.io/kind: Subscription
connector: slack
spec:
containers:
- image: fabric8/connector-slack:1.1.23
name: connector
schema.yml: |
---
component:
kind: component
scheme: slack
syntax: slack:channel
title: Slack
description: The slack component allows you to send messages to Slack.
label: social
deprecated: false
async: false
producerOnly: true
javaType: org.apache.camel.component.slack.SlackComponent
groupId: org.apache.camel
artifactId: camel-slack
version: 2.18.1
componentProperties:
webhookUrl:
kind: property
type: string
javaType: java.lang.String
deprecated: false
secret: false
description: The incoming webhook URL
properties:
channel:
kind: path
group: producer
required: true
type: string
javaType: java.lang.String
deprecated: false
secret: false
description: The channel name (syntax name) or slackuser (syntax userName) to send a message directly to an user.
iconEmoji:
kind: parameter
group: producer
type: string
javaType: java.lang.String
deprecated: false
secret: false
description: Use a Slack emoji as an avatar
iconUrl:
kind: parameter
group: producer
type: string
javaType: java.lang.String
deprecated: false
secret: false
description: The avatar that the component will use when sending message to a channel or user.
username:
kind: parameter
group: producer
type: string
javaType: java.lang.String
deprecated: false
secret: false
description: This is the username that the bot will have when sending messages to a channel or user.
webhookUrl:
kind: parameter
group: producer
type: string
javaType: java.lang.String
deprecated: false
secret: false
description: The incoming webhook URL
synchronous:
kind: parameter
group: advanced
label: advanced
type: boolean
javaType: boolean
deprecated: false
secret: false
defaultValue: false
description: Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
documentation.adoc: |+
[[Slack-SlackComponent]]
Slack Component
~~~~~~~~~~~~~~~
*Available as of Camel 2.16*
The??*slack*??component allows you to connect to an instance
of??http://www.slack.com/[Slack]??and delivers a message contained in the
message body via a pre
established??https://api.slack.com/incoming-webhooks[Slack incoming
webhook].
Maven users will need to add the following dependency to their `pom.xml`
for this component:
[source,xml]
------------------------------------------------------------
org.apache.camel
camel-slack
x.x.x
------------------------------------------------------------
[[Slack-URIformat]]
URI format
^^^^^^^^^^
To send a message to a channel.
[source,java]
------------------------
slack:#channel[?options]
------------------------
To send a direct message to a slackuser.
[source,java]
-------------------------
slack:@username[?options]
-------------------------
[[Slack-Options]]
Options
^^^^^^^
// component options: START
The Slack component supports 1 options which are listed below.
{% raw %}
[width="100%",cols="2,1m,7",options="header"]
|=======================================================================
| Name | Java Type | Description
| webhookUrl | String | The incoming webhook URL
|=======================================================================
{% endraw %}
// component options: END
// endpoint options: START
The Slack component supports 6 endpoint options which are listed below:
{% raw %}
[width="100%",cols="2,1,1m,1m,5",options="header"]
|=======================================================================
| Name | Group | Default | Java Type | Description
| channel | producer | | String | *Required* The channel name (syntax name) or slackuser (syntax userName) to send a message directly to an user.
| iconEmoji | producer | | String | Use a Slack emoji as an avatar
| iconUrl | producer | | String | The avatar that the component will use when sending message to a channel or user.
| username | producer | | String | This is the username that the bot will have when sending messages to a channel or user.
| webhookUrl | producer | | String | The incoming webhook URL
| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
|=======================================================================
{% endraw %}
// endpoint options: END
[[Slack-SlackComponent.1]]
SlackComponent
^^^^^^^^^^^^^^
The SlackComponent with XML must be configured as a Spring or Blueprint
bean that contains the incoming webhook url for the integration as a
parameter.
[source,xml]
-----------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------
For Java you can configure this using Java code.
[[Slack-Example]]
Example
^^^^^^^
A CamelContext with Blueprint could be as:
[source,xml]
---------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
[[Slack-SeeAlso]]
See Also
^^^^^^^^
* link:configuring-camel.html[Configuring Camel]
* link:component.html[Component]
* link:endpoint.html[Endpoint]
* link:getting-started.html[Getting Started]