Channels Connector
General description
Channels connector is a component responsible for providing a bridge between different channels and SentiOne Automate. It allows to conduct conversations with Automate bots. It's meant to replace separate "Bot" apps by merging them into one application.
List of supported channels is available here.
API
Default port: 5782
There are default endpoints for monitoring purposes. They are described in Components monitoring section.
Databases
RabbitMQ
The component reads and writes data to queues:
- automate.webhooks.messenger - used for Facebook's webhooks
- automate.webhooks.vonage - used for Vonage's webhooks
- automate.webhooks.twilio - used for Twilio's webhooks
Communication
This service communicates with the following services:
Application | Config to URL | Auth |
---|---|---|
admin | chatbots.channels-connector.api.admin-external.url | OTP |
Twilio API | chatbots.channels-connector.twilio.api-url | Token-based |
Facebook Graph API | chatbots.channels-connector.messenger.facebook-uri | Token-based |
gateway | chatbots.gateway-api.url | None |
MS Teams API | https://graph.microsoft.com https://login.microsoftonline.com | Token-based |
WebChat | chatbots.web-chat-api.url | OTP |
Thread Coordinator | chatbots.thread-coordinator-api.url | none |
LiveChat API | chatbots.channels-connector.livechat | Token based + webhook secret |
Slack API | chatbots.channels-connector.slack | Token-based + webhook secret |
Webhooks
WhatsApp
For both WhatsApp by Vonage and WhatsApp by Twilio channels, webhooks URLs are visible on the application's UI in the Channel creation form. Detailed guides on how to integrate Automate with WhatsApp (including setting up webhooks) are available here: Vonage Twilio.
Facebook Messenger
The webhooks URL is https://CHANNELS-CONNECTOR_SERVER_PUBLIC_URL/webhooks/messenger
To register webhooks, you need to go to Facebook Developer website and set this address as Callback URL in Messenger -> Settings -> Webhooks.
Microsoft Teams configuration
Please refer to configuration documentation Microsoft Teams.
LiveChat configuration
Please refer to configuration documentation LiveChat.
Slack configuration
Please refer to configuration documentation Slack
Config
Application's config
chatbots.channels-connector {
# Public address of channels connector. It's required for some channels e.g. Twilio
public-url: "https://CHANNELS-CONNECTOR_SERVER_PUBLIC_URL"
expose-exception: false
api {
admin-external {
url: "http://ADMIN_URL/api/external"
otp-secret: "PUT_SECRET_HERE"
}
}
vonage: {
enabled: true
message-timeout: 15s
message-interval: 500ms
}
twilio: {
enabled: true
message-timeout: 15s
handoverEnabled: true
//api-url: "api.twilio.com"
}
messenger: {
enabled: true
message-timeout: 15s
facebook-uri: "https://graph.facebook.com"
typing-time: 1s
# Defining app-id, app-secret and webhook-token enables Facebook Messenger Channel (OAuth)
app-id: "XXX"
app-secret: "XXX"
webhook-token: "XXX"
}
# Defining this section enables Ms Teams Channel (OAuth)
ms-teams {
enabled: true
private-key: "XXX",
client-secret: "XXX"
tenant-id: "XXX"
client-id: "XXX"
// Optional, available since v227
proxy: {
host: "hostname.com" // without protocol and port, can be IP address
port: 3128
username: "user" // optional, needed if Proxy requires Authentication
password: "password // optional, needed if Proxy requires Authentication
}
}
# Defining this section enables LiveChat (OAuth)
livechat {
enabled: true
client-id: "xxx"
client-secret: "xxx"
webhook-secret: "xxx"
# Proxy is optional
proxy {
host: "PROXY_HOST"
port: PROXY_PORT
username: "PROXY_USER"
password: "PROXY_PASSWORD"
}
}
# Defining this section enables WebChat
web-chat {
enabled: true
}
# Defining this section enables Slack (OAuth)
slack {
enabled: true
client-id: "xxx",
client-secret: "xxx"
signing-secret: "xxx"
}
}
Other required configurations:
chatbots.messaging {
rabbit {
hosts: ["HOST:PORT"]
username: "USER"
password: "PASSWORD"
}
}
chatbots.channels {
channel-data-encryption-key: "XXX" # Key length should be 256 bits (32 characters)
channels-connector-url: "http://CHANNELS-CONNECTOR_SERVER_PUBLIC_URL"
vonage-repeat-hmac-key: "XXX" # By default it is equal to Listen's onpremise hookServer.vonage.repeatHmacKey
hooks-server-url: "URL" # Optional
}
chatbots.web-chat-api {
url: "http://host:port"
otp-secret: "XXX"
}
Job execution
## RefreshChannelsSubscriptions
This cron job is responsible for periodically refreshing channels subscriptions if it's needed.
Troubleshooting
Updated 4 months ago