...
The initial configuration to do in your Slack account. You will create one or more so-called “incoming web hook URLs”
The Wordbee Translator Web Hook configuration. You define the events to notify, the content. Web hooks call the Slack incoming web hook URLs.
Table of Contents |
---|
Configure Slack
If you have not yet done so please configure your Slack account. Objective is to create an Incoming Webhook URL to then configure Wordbee Translator.
...
Click the Settings top navigation link and then Developer API Webhooks (this link is at the bottom of the Settings page):
...
Example: Notify new
...
or not-started jobs in Slack
Create a web hook
Click the Edit link in the page above and select . Then populate all fields such as in the following web hook:
...
Then populate the other fields:
...
Properties to populate are:
Webhook: Choose “Codyt job - Status change to Not started”. This will notify new jobs.
URL: Paste the Incoming Webhook URL that you created in Slack
HTTP method: Select POST
Content type: Select application/json
HTTP body: This is where you design the content that will show up in Slack
Define Slack notification content
The HTTP body of the message is a JSON that document and composed of elements inside the “blocks” array.
The structure must comply with the Slack specifications, see https://api.slack.com/block-kit/building
From the screenshot above, you see that we you need to insert Wordbee “placeholders” such as {{JobReference}} or {{CompanyName}} to show all the job details you want to see in Slack.
Hint: At the bottom of the page there is link to view all available placeholders.
A simple payload is shown below. It notifies a job with the job reference and the assigned worker:
Code Block |
---|
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "New job: {{JobReference}}"
}
},
{
"type": "section",
"text": {
"type": "plain_text",
"text": "{{CompanyName}} - {{FirstName}} {{LastName}}"
}
}
]
} |
Test
Select a Codyt job and change its status to “Not started”. Alternatively, create a new Codyt job and assign it to someone so that its status is Not Started.
Note: If you want to notify creation of inactive jobs, you would configure the respective web hook in the same manner as above.
Within a few seconds you should see a message pop up in your Slack channel.
If nothing shows up, it may be that the web hook URL or the Slack configuration is not correct.
Hover the “Settings” top navigation link and select “Current activity” from the drop down menu. This lets you see which web hooks have been triggered and which ones were rejected by Slack.
...
Missing features
Info |
---|
The following features may be missing in this implementation |
Missing features:
At this point the URL is not an available placeholder. Therefore you cannot just yet include the job URL with the Slack notification. This has to be added.
You may miss some web hook types to notify other types of events. Let us know what you need!