Deploy this function on flows.network, and you will get a Telegram bot that uses ChatGPT to respond to every question in your Telegram DM or channel/group automatically.
Try a couple of Telegram bots on flows.network yourself!
- This is a simple ChatGPT bot that is created directly from the template.
- The multimodal assistant bot is based on this template. It can recognize text on uploaded pictures using flows.network's built in OCR service. It also has several task prompts already set up as slash commands.
-
You will need to bring your own OpenAI API key. If you do not already have one, sign up here.
-
You also need a bot token to access the Telegram API. If you don't already have one, go to Telegram to get a bot token from @botfather.
- Create a bot from a template
- Add your ChatGPT API key
- Add the telegram bot token
![image](https://private-user-images.githubusercontent.com/45785633/250009300-c91edcc2-207f-44d0-a545-9a61d0c6db2f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ0Mjg5ODgsIm5iZiI6MTcyNDQyODY4OCwicGF0aCI6Ii80NTc4NTYzMy8yNTAwMDkzMDAtYzkxZWRjYzItMjA3Zi00NGQwLWE1NDUtOWE2MWQwYzZkYjJmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIzVDE1NTgwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRkZDU0MDk1NjhjYzAzNjFlYTcxYTViZjg1YzZiNDVmNWZhNzg2ZjY1MmVlMGExYzIzNTMwNDRhMWE4NjY5ZWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.LvdbTtuR3ucZ1B1pgmSG1yA7y9A74zrRiKnW2JJvOBE)
Here you can see three variables. You can customize the system_prompt
variable to prompt ChatGPT.
Click on the Create and Build button.
You will now set up OpenAI integration. Click on Connect, and enter your key.
Close the tab and go back to the flow.network page once you are done. Click on Continue.
You will now set up Telegram integration. Enter your Telegram token here.
Click on Deploy button.
As soon as the flow function's status becomes ready
and the flow's status becomes running
, the Telegram Telegram bot goes live. Go ahead and send a private message to the bot! You can also invite this bot to your channel/group.