Feedback Bots allows you to deploy a feedback chatbot with master chatbot. Built on Azure Durable Functions as a part of PlanetScale and Hashnode hackathon. Read an article how it was built here
- Deploy Feedback bots to Azure, open Azure Function App configuration
- Create Database tables from
Database.sql
in MySQL-compatible database
- Set
Uri
to a FQDN of your Azure Function App (without https://) - Set
ConnectionString:Default
to a connection string of your MySQL-compatible database - Create a Host key for your functions in
App Keys
blade of your Azure Function App - Set
ClientId
to a created key - it will be used to auth webhooks
- Create a Master Bot using @BotFather
- Set
MasterToken
setting to the chatbot token obtained from BotFather - Execute
api/setup
function with admin key - this will setup webhook for your master bot - Send
/start
to master bot, check logs ofMasterBotWebhook
for message likeGot message: User sent message 123 to chat **123456789** at 30.07.2022 22:23:14.
- Set
MasterChatId
to your chat number id
Now your Master Bot is operational and you are ready to add client bots
- Create a Client Bot using @BotFather
- Send
/add
command to Master Bot - Send client bot's token to a master bot, the confirmation message should return
Setup is done, now any message to Client Bot will be forwarded to a Master Bot. Reply on Message in Master Bot to send back answer.
Feedback bots availibe as SaaS solution (pre-deploed and pre-setup for you) on FeedbackBots.com
The next configuration required to functions properly operate
Example of local.settings.json
{
"IsEncrypted": false,
"Values": {
"Uri": "uri for webhooks",
"MasterToken": "user-token for MasterBot",
"MasterChatId": "your chat-id in MasterBot",
"ClientId": "local"
},
"ConnectionStrings": {
"Default": "MySql Connection String"
}
}