Features
Solutions
Who uses Directual and why?
What can be built on the platform?
What industries benefit from Directual?
Learn
In this lesson, we’ll learn how to use the Open AI ChatGPT plugin with Directual no-code scenarios to create a Telegram bot.

Go to BotFather to create new Telegram bot. You can then either create a new app using Telegram bot template or install the Telegram plugin in your existing app.

Directual Telegram-plugin
First, go to OpenAI and create an account (EU/US telephone number is needed). Then, get the API key. Once you have the key, you can install the OpenAI plugin.

Directual OpenAI-plugin
You can explore the techniques for building Telegram bots on Directual in our documentation. Here we’ll just play around one scenario that is set to trigger on every new object in TMessageIn data structure.

Steps configuration:


Steps configuration:
We’ve added field for storing chat history on TChat object

Storing chat history on TChat object
Let’s add a condition to the scenario if message text equals “/start”, clear the chat history and start from the beginning.

Reseting the context
That is it! The dialogue with the bot may look like (it gets the context):

Example of a dialogue with the bot.
If you have any questions, shoot us a message on hello@directual.com. Also, don’t hesitate to join Directual community of no-coders.
To use no-code and ChatGPT, you will need to create a chatbot using a no-code platform such as Directual. Once you have created your app, you can integrate ChatGPT into it by using the OpenAI-plugin. This will allow you to generate human-like interaction to your app.