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.
Currently, It supports:
- WhatsApp by Twilio or Vonage
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 |
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 MsTeams
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"
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
}
}
}
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
}
Job execution
None
Troubleshooting
Updated 13 days ago