Skip to main content

How to Create a Telegram Notifications for Conditions in Google Sheet



Create a Bot for the Telegram Alert


  • Open Telegram messenger, sign in to your account or create a new one
  • Enter @Botfather in the search tab and choose this bot. (Official Telegram bots have a blue checkmark beside their name.)
  • Click “Start” to activate BotFather bot.In response, you receive a list of commands to manage bots.
  • Choose or type the /newbot command and send it.
  • Choose a name for your bot — your subscribers will see it in the conversation. And choose a username for your bot — the bot can be found by its username in searches. The username must be unique and end with the word “bot.”
  • Copy the token value.





  • In your Telegram account, search for “@myidbot” or open this link t.me/myidbot on your smartphone.
  • Start a conversation with that bot and type /getid. You will get a reply back with your user ID. 
  • Note the user id as we’ll need it for our projects.

How to Create a Telegram Notifications for Conditions in Google Sheet

Let's take an example of the stock market in Google Sheets.

Create a Google Sheet in Google Drive and then click on "App Script".



Let's take a scenario, I want that when my bought stock prices increase by 10%, then I should receive a notification on my Telegram. For this, I have to enter the quantity and the buy price of the stock.

Go to "App Script", paste the below code and save it.

Paste This code:

var telegramtoken = "Your Telegram Bot Token";
var  telegramURL = "https://api.telegram.org/bot"+telegramtoken;
 
function sendme(input,input1){
 
  if(input != "WAIT"){
    msg = "SELL StockName: "+input1+" Price: "+input
    var url = telegramURL + "/sendMessage?chat_id=<Telegram ID of the message receiver>&text="msg;
    var response = UrlFetchApp.fetch(url);
    return "Message Sent";
 
  }
 
}





Check all the formulas in the screenshots for a better understanding,








When the "SELL Notifi" column change from the "Wait" state to "SELL", a notification will send.





Comments

Popular posts from this blog

Free Cybersecurity Certifications

Introduction to Cybersecurity Cybersecurity Essentials Networking Essentials Android Bug Bounty Hunting: Hunt Like a Rat Ethical Hacking Essentials (EHE) Digital Forensics Essentials (DFE) Network Defense Essentials (NDE) Introduction to Dark Web, Anonymity, and Cryptocurrency AWS Skill Builder Introduction to Cybersecurity Building a Cybersecurity Toolkit Cyber Aces Free Cyber Security Training Course Introduction to Information Security Penetration Testing - Discovering Vulnerabilities

Web Application Security Testing (WAPT) Interview Questions

Let's Contribute All Together For Creating a Questions Dump What are the vulnerabilities you have to test in the Login form, Payment gateway? What is clickjacking? What is the mitigation of clickjacking? What is CSRF? How to mitigate CSRF? Let's take an example, If a developer implements a CSRF token in a cookie, will it mitigate the CSRF issue? Is it possible to mitigate the CSRF by header? If yes why, if No why? If the data is in JSON format, how you will check the CSRF issue and what are the ways of exploitation? Where to implement the CSRF token and why? If the client doesn't want to change the UI or doesn't want to implement the CSRF tokens, and headers then what mitigation you recommended to the client for CSRF? What is the problem with the per-request token? Is login CSRF possible? Explain login CSRF? Have you ever exploited it? What is the mitigation for login CSRF? Suppose, in an application csrf token is implemented in each request and every request, except th

Is your webcam exposed on the internet and everyone enjoying your personal moments? | How to check webcam or security camera is exposed on the internet or not?

Nowadays we start using many technology devices in our homes. Many people are installing CCTV or security cameras in their houses, private rooms, offices, private places, etc for security purposes and monitoring, but many of them don't know how to configure that device securely. So let's talk about CCTV and security cameras only.  What do most CCTV/Security camera users believe? Most users believe that using a strong username and password on a camera administrative page protects them. (Partially true in the case of online cameras) Example: Why it is partially true? It's partially true because you are protecting only the camera administrative page which is also an important part. Still, you are not protecting the protocol used to control streaming media servers (Real-Time Streaming Protocol ( RTSP )). I have seen many online webcams whose administrative page is secured by strong credentials, but they forget to secure the RTSP protocol which gives me access to the streaming