How to create a Telegram bot that sends you a summary made by Gemini of each email you receive in Gmail and other emails
Let’s explain to you how to create a Telegram bot that sends you a summary of your emails emails, such as Gmail. Thus, when you receive a new email, whether from anyone or from specific senders or topics, an artificial intelligence will make a summary and send it to you. All this without knowing how to program nor have technical knowledge. This is not something you can do simply by asking artificial intelligence, and we are going to need a program that generates workflows or work flows. We will use Make.com, because it is very complete and easy to use. Besides, Make.com It has a free version that is perfect for taking the first steps, although with some limitations. In Make we will have to link any artificial intelligence, although we have opted for Gemini because it is easy to obtain a free API for it. And then, We have chosen Telegram because creating bots is easyand it only takes a few minutes. In the end, what you will need is an API from an AI, a Token key from a Telegram bot, and creating the workflow chain on Make.com. In the examples we have used Gmail because it is also easy to link to it. Get your Gemini API first The first thing we are going to do is get a google api to be able to use Gemini in our project. For that, go to the website aistudio.google.com and sign in with your Google account. When you do, in the bar on the left at the bottom click on Get API Key. Now you have to click on the option Create API key that appears at the top of the screen you have created. This will open a window where you have to create the project for which you are going to use it in order to identify it, for example Gmail Gemini. When you create the project, you can now create the API. When you have created the API, you will see that it appears in the list of API keys. You just have to click on the left, below where it says Clueand a window with the API will open, starting with “AIza–“. Set up the Telegram bot The first thing you have to do is create a bot on Telegram. For that you have to look for the “@BotFather” tool and write to it as if it were a new user. Use the /newbot command to create a new bot, giving it a name to identify yourself and a unique username to access the bot whenever you want. When you do it, it will give you two things, first the username and address of your bot to access it, and second an access token with various figures and letters. You have to save this token to use later. Start creating your project Now you have to go to Make.com and click on the option Create new scenario to create a new project. In the options choose the option Build from scratch to create an automation from scratch. From what we are going to do, you must understand that we will create an automation of several modules, each one of them different. These automations will form a chainso that the action of the first leads to the second, and that of the second to the third. Come on, the order in which we put them is important. Add your email module as a trigger You will go to a blank screen with a button with the plus symbol. Here, click on the + button and from the drop-down menu choose Gmail. Inside now click on the option Watch emails to configure the action of reading your emails. This will cause your automation to be activated every time you receive an email in Gmail. It is a trigger, which is the element that will start this automation. Now click on the button Create a connectionwhich will open a screen where you have to name the connection at the top, and at the bottom log in with your Gmail account to link it. You will have to log in and give the website permissions to access your email. Once the action has been added, you can filter the type of emails that this automation executes. Can choose emails from a specific folder or labelas well as other criteria, so that these are launched and read by the AI. You can also set some limits. This screen gives you the possibility to fully customize the experience depending on What type of emails do you want the AI to summarize for you?. It is an important step, especially because you will be able to make it only perform this action with certain types of emails. For example, they can be from senders related to your work or a specific project. If you open the advanced settings either Advanced settingsyou can specify even more. For example, you can configure so that only runs with emails from a certain senderwith a certain subject, and many other characteristics. Now you can configure from what moment do you want the data to be processed. For example, you can choose From now on so that they are processed from the emails you start receiving from now on. You can also link other emails. For this, instead of the Gmail module you can use the Email module, which will allow you to connect with Google, with Microsoft for Outlook, or with others through IMAP. Outlook also has its own module. Now add the Gemini module Now it’s time to add the second module. To do this, click on the + button to the right of Gmail, and on the screen that opens choose the option Gemini. In the options that appear in the module that opens, choose where to put Generate a response. This will now open a key module, where you simply have to write the Gemini API Key that we have generated at … Read more