RASA connector to Telegram
by : paraparataaa
Step 1 : Make a bot in Telegram using Bot Father
- Open Telegram and add @BotFather
- Start chat and enter
/newbot
- Choose a name for our bot
- Choose a username for our bot
- After the configuration done, copy the HTTP API token that mentioned in BotFather
Step 2 : Make a tunneling with ngrok
- Download ngrok from here
- Extract ngrok
- Copy your token from Auth menu in our ngrok dashboard
- In Linux, add your token to ngrok with :
- We will use 5005 as port for rasa server, so open port 5005 as public with ngrok
- Copy https url that generated by ngrok to use later in credentials.yml file
Step 3 : Make Rasa project and connector
- Make rasa project and train it
- In credentials.yml file, add this code:
telegram:
access_token: "our_token"
verify: "our_bot_username"
webhook_url: "https://<https_ngrok_url_port_5005>/webhooks/telegram/webhook"
- Run rasa project with port 5005 (in default rasa server will run in port 5005)
- Open Telegram and add our bot (@username)
- Chat with our bot, to test it if it's running well or not