babelforce allows you to send automatic messages to slack. This article will explain the use case to send a slack message whenever a ticket comes in.
First of all, let'S look at the part on slack side:
1. Register an app on slack:
You can either follow this article or the steps below
- Go to this website: https://api.slack.com/messaging/sending
- On the top right corner click on "Your apps":
- Next, click on "Create new app", then choose the one "From scratch":
- Give it a name and choose your workspace, then click on "Create app"
- Next, click on "add features and functionalities", then click on "Incoming webhooks" and activate it
- submit a request to your slack admin at the bottom of the screen:
- Once your admin approved your reqeust, go to "Incoming webhooks" again, and scroll to the bottom. You will see the option to dd a new webhoook:
- Click to add and select a channel
-
Copy the URL - this will be your endpoint for sending messages:
https://hooks.slack.com/services/T02HCAH***/B062NK*****/D9gcbX7TM*****
2. Create a task to trigger slack messages based on babelforce events
- Now, we need to add a task template to our account, that triggers the message, based on an incoming sms. You can copy this template:
{
"required_fields": [
"body.sms_text"
],
"task": {
"type": "automation",
"actions": {
"on_scheduled": [
{
"http": {
"url": "https://hooks.slack.com/services/T02HCAH****/B062N*****/D9gcbX7TMg1Z8WaBO****",
"method": "POST",
"body": {
"text": "You received a new SMS. SMS text {{task.body.sms_text}}"
},
"var": "response"
}
}
],
"on_selecting": [
{}
]
},
"task_completion": {
"autoComplete": true
},
"scheduled_at": "now"
}
}
Comments
0 comments
Please sign in to leave a comment.