This repository contains a plugin to post messages on Slack from the Nuxeo Platform
git clone https://github.com/nuxeo-sandbox/nuxeo-slack
cd nuxeo-slack
mvn clean install
- Go to https://api.slack.com/apps
- Create a new app
- Copy the
Bot User OAuth Token
- Open the OAuth & Permissions menu
- Add the following scopes
- channels:read
- chat:write
- chat:write.public
- groups:write
- im:write
- mpim:write
- users:read
- users:read.email
- files:write
- Add the following scopes
In nuxeo.conf, set the following property
nuxeo.slack.token=<Bot User OAuth Token>
This plugin contains two automation operations.
The Notification.SendSlackNotification operation takes three parameters:
channel
: the channel name where to post. Ignored if the nuxeoUsername parameter is usednuxeoUsernames
: a list of nuxeo usernames. For each user, the email address must be set in the user profile in Nuxeo and must be the same as the user's email in the target slack workspacemessage
: the message to postblocks
: json string containing a message built with the Block Kit UI framework
The Slack.UploadFile takes a blob as the input and returns a String Blob containing a slack file object
- workflow task notification, send a slack notification on the workflowTaskAssigned event
Assuming the docker image was built, set the app bot token in conf.d/docker.conf
docker compose up -d
Use the following curl command to test that the integration is working correctly
curl --location --request POST 'http://localhost:8080/nuxeo/site/api/v1/automation/Notification.SendSlackNotification' \
--header 'Authorization: Basic QWRtaW5pc3RyYXRvcjpBZG1pbmlzdHJhdG9y' \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"channel":"general",
"message":"Salut!!!"
}
}'
This plugin is a work in progress.
These features are not part of the Nuxeo Production platform.
These solutions are provided for inspiration and we encourage customers to use them as code samples and learning resources.
This is a moving project (no API maintenance, no deprecation process, etc.) If any of these solutions are found to be useful for the Nuxeo Platform in general, they will be integrated directly into platform, not maintained here.
This plugin is published on the marketplace
Nuxeo Platform is an open source Content Services platform, written in Java. Data can be stored in both SQL & NoSQL databases.
The development of the Nuxeo Platform is mostly done by Nuxeo employees with an open development model.
The source code, documentation, roadmap, issue tracker, testing, benchmarks are all public.
Typically, Nuxeo users build different types of information management solutions for document management, case management, and digital asset management, use cases. It uses schema-flexible metadata & content models that allows content to be repurposed to fulfill future use cases.
More information is available at www.nuxeo.com