This quick tutorial shows you how to
...
configure Wordbee Translator to send notifications for newly assigned jobs or orders into a Slack channel.
...
Two steps are required to get it working:
...
...
The Wordbee Translator Web Hook configuration. You define the events to notify, the content. Web hooks call the Slack incoming web hook URLs.
Configuring Slack
Info |
---|
This is a one time configuration. The objective is to obtain a URL to post notifications into a Slack channel. This URL is needed, in a second step, to configure Wordbee Translator. |
Login to Slack and go to the Administration area. Then click Configure Apps:
...
Then click Build in the top navigation menu:
...
On the next screen click Create New App:
...
A popup opens and you need to give the app a name such as “Wordbee” or whatever you like. Select your Slack workspace and confirm:
...
You will be redirected to a new page. Click Incoming webhooks in the left and then tick on webhooks in the right hand side as shown below:
...
Then scroll to the bottom of this page and click Add new Webhook to Workspace:
...
Another popup opens where you select the channel to which the notifications will be sent to:
...
Click Allow. On the resulting page you will find the incoming Webhook URL:
...
Copy the URL to a notepad. We will need it for the Wordbee Translator configuration.
...
Configure Slack
Configure your Slack account and create an Incoming Webhook URL that you will later use to connect with Wordbee Translator. If you need help, follow the steps from the Configuring Slack article.
Configure Wordbee Translator
We will now set up “webhooks” in your Wordbee Translator platform. A webhook is nothing more than a URL that Wordbee calls when an event, such as job status, changes. The URL that Wordbee will call is the exact URL that you created when configuring Slack.
Login as administrator to your Wordbee Translator Platform.
Click the Settings top navigation link and then Developer API Webhooks (this link is at the bottom of the Settings page):
Example: How to notify new or not-started jobs in Slack
Create a webhook
In Settings > Developer API Webhooks, use the Edit link to define the URLs of the events Wordbee Translator will automatically trigger. Fill in the properties as follows:
Webhook: Choose “Codyt job - Status change to Not started”. This will notify new jobs.
URL: Paste the Incoming Webhook URL that you have 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 the Slack notification content
The HTTP body is a JSON document and composed of elements inside the “blocks” array. The structure must comply with the Slack specifications, see The Slack Block Kit UI Framework.
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 the configuration
In Wordbee Translator, 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.”
If you want to notify creation of inactive jobs, you would configure the respective webhook 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 webhook 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 webhooks have been triggered and which ones were rejected by Slack.
Features you might miss
Info |
---|
The following features might be missing in this implementation:
|