I recently discovered the n8n platform and decided to experiment with the “Telegram AI Bot with LangChain Nodes Workflow.” After configuring the basic settings for both Telegram and OpenAI accounts and following the official tutorial on n8n’s YouTube channel, I find myself with a question.
I’m eager to implement the bot within a Telegram group comprising around 100 individuals, primarily for amusement and generating photos from the group members. While I’ve managed to obtain our group ID, my lack of programming expertise presents a hurdle in comprehending how to adjust the workflow’s code accordingly.
Hence, I’m reaching out to inquire if there’s a generous and patient individual within the community who could provide direct guidance on precisely what modifications are necessary and how to execute them. Screenshots illustrating the process would be immensely appreciated.
Thank you in advance for any assistance you can provide!
I’m currently utilizing the workflow available at the following link: https://n8n.io/workflows/2035-telegram-ai-bot-with-langchain-nodes/ as part of the n8n account trial period. If this solution proves effective for my needs, I fully intend to purchase a subscription.
It’s important to note that I’ve solely operated with the default settings, with the only modifications being the inclusion of my OpenAI account API and Telegram bot token. I must emphasize that I lack expertise in programming or in-depth technical intricacies. Thus, accessible and supportive assistance is paramount for someone in my position.
At a glance. It should just be as simple as adding your created telegram bot to your group. (You must own or be admin of the group to add bots.)
Then communicate with the bot as normal. By default you will have to @ the bot and then send the command. You can disable this in bot creation settings.
Thank you for your prompt response and guidance. Following your instructions, I created a test group and added the Telegram bot as advised. However, despite mentioning the bot with “@” and sending commands, it responds to individuals via private messages instead of posting in the group chat as intended.
We talked a little in the DMs but here was the final solution:
Did you say you were able to get the chat ID of the group? Can you try replace in the send message on telegram node where it shows chat ID and replace the code with that
Glad I could help.
Additional info for the curious:
Apparently the ID sent with the initial message to the bot, used in this flow, is actually the ID of the private message session with you and the bot. (Despite the message still originating from the group)
Replacing that code with the ID of the group the bot was added to, will allow it to reply there correctly and not your DMs.
I would like to express my sincere gratitude to ThinkBot Agency for their unwavering assistance and patience in guiding me, an amateur, through various challenges. I highly recommend their services! Thanks to them, everyone in our group will now be able to enjoy generating cat facts and generating pictures of warrior cats, which I find amusing lol. I am also attaching a picture of the field where I made changes, hoping it may help others facing similar challenges.