Use of bolean flag

//Including the two libraries
#include <UniversalTelegramBot.h>
#include <WiFi.h>
#include <WiFiClientSecure.h>

//------- WiFi Settings -------
char ssid[] = "";       // your network SSID (name)
char password[] = "";  // your network key

// ------- Telegram config --------
#define BOT_TOKEN ""  // your Bot Token (Get from Botfather)
#define CHAT_ID "-100" // Chat ID of where you want the message to go (You can use MyIdBot to get the chat ID)

const int gasAnalogPin = 32;
long Bot_lasttime;
int bulk_messages_mtbs = 30000; // testing to delay 6sec to detecting another distance and which message been sent .
boolean Flag=false;

// SSL client needed for both libraries
WiFiClientSecure client;

UniversalTelegramBot bot(BOT_TOKEN, client);

String ipAddress = "";

volatile bool telegramButton1PressedFlag = false;
volatile bool telegramButton2PressedFlag = false;
volatile bool telegramButton3PressedFlag = false;
volatile bool telegramButton4PressedFlag = false;
volatile bool telegramButton5PressedFlag = false;

void setup() {
Serial.begin(115200);
pinMode(gasAnalogPin, INPUT);

// Set WiFi to station mode and disconnect from an AP if it was Previously
// connected
WiFi.mode(WIFI_STA);
WiFi.disconnect();
delay(100);

// Attempt to connect to Wifi network:
Serial.print("Connecting Wifi: ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
    delay(500);
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
IPAddress ip = WiFi.localIP();
Serial.println(ip);

 ipAddress = ip.toString();

}

void sendTelegramMessage1() {
  String message = "Air was fresh @ testing!";
  if(bot.sendMessage(CHAT_ID, message, "Markdown")){
    Serial.println("TELEGRAM Message 1 Successfully sent");
  }
  telegramButton1PressedFlag = false;
}

void sendTelegramMessage2() {
  String message2 = "Air was good @ testing!";
  if(bot.sendMessage(CHAT_ID, message2, "Markdown")){
    Serial.println("TELEGRAM Message 1 Successfully sent");
  }
  telegramButton2PressedFlag = false;
}

void sendTelegramMessage3() {
  String message3 = "Air was poor @ testing!";
  if(bot.sendMessage(CHAT_ID, message3, "Markdown")){
    Serial.println("TELEGRAM Message 1 Successfully sent");
  }
  telegramButton3PressedFlag = false;
}

void sendTelegramMessage4() {
  String message4 = "Air was bad @ testing!";
  if(bot.sendMessage(CHAT_ID, message4, "Markdown")){
    Serial.println("TELEGRAM Message 1 Successfully sent");
  }
  telegramButton4PressedFlag = false;
}

void sendTelegramMessage5() {
  String message5 = "Air was terrible , emergency evacuation @ testing!";
  if(bot.sendMessage(CHAT_ID, message5, "Markdown")){
    Serial.println("TELEGRAM Message 1 Successfully sent");
  }
  telegramButton5PressedFlag = false;
}

void loop() {
  
 float V0 = 750;
 float Rs = 0;
 float R0 = 0; 
 float Voltage;
 float Vout = 1183;
 float ratio = 0;
 
        R0 = ((20000*5000/V0)-40000);
        Rs = ((20000*5000/analogRead(gasAnalogPin))-40000);


 
 ratio = Rs/R0; //Replace R0 with the value found using the sketch above

   Serial.println(R0);
   Serial.println(Rs);
   Serial.println(ratio); // How to calculate PPM?
   delay(1000);
 if (ratio > 0.90){                       //Fresh stage 1
      sendTelegramMessage1();
      delay(bulk_messages_mtbs);
      Bot_lasttime = 0;
      Flag=true;

 }else if (ratio < 0.90 && ratio > 0.70){        //good   stage 2
           sendTelegramMessage2();
           delay(bulk_messages_mtbs);
           Bot_lasttime = 0;
           Flag=true;

 }else if (ratio < 0.70 && ratio > 0.40){        //poor  stage 3
           sendTelegramMessage3();
           delay(bulk_messages_mtbs);
           Bot_lasttime = 0;
           Flag=true;

 }else if (ratio < 0.40 && ratio > 0.10){        //bad stage 4
           sendTelegramMessage4();
           delay(bulk_messages_mtbs);
           Bot_lasttime = 0;
           Flag=true;
          
 }else if (ratio <0.10){                  //Emergency  stage 5
           sendTelegramMessage5();
           delay(bulk_messages_mtbs);
           Bot_lasttime = 0;
           Flag=true;
}
}

Above are my complete code , can some one help me ameliorate the bolean flag , the message will keep sending . I'm trying to doing sending message once by following 5 stage from stage 1-5. When it reach any stage only sending message 1 time .

you need to test if the flag is true before sending. then make it false so it doesn't send again until the flag is reset to true

if(flag) // if flag is true
{
  // Send something once here
  flag = false;
}



// somewhere else in code
flag = true

Oh and Strings are bad you should use cstrings instead.

Hutkikz:
you need to test if the flag is true before sending. then make it false so it doesn't send again until the flag is reset to true

if(flag) // if flag is true

{
  // Send something once here
  flag = false;
}

// somewhere else in code
flag = true

//Including the two libraries
#include <UniversalTelegramBot.h>
#include <WiFi.h>
#include <WiFiClientSecure.h>

//------- WiFi Settings -------
char ssid[] = "";       // your network SSID (name)
char password[] = "";  // your network key

// ------- Telegram config --------
#define BOT_TOKEN ""  // your Bot Token (Get from Botfather)
#define CHAT_ID "" // Chat ID of where you want the message to go (You can use MyIdBot to get the chat ID)

const int gasAnalogPin = 32;
long Bot_lasttime;
int bulk_messages_mtbs = 30000; // testing to delay 6sec to detecting another distance and which message been sent .
boolean Flag=false;
boolean Flag2=false;
boolean Flag3=false;
boolean Flag4=false;
boolean Flag5=false;
// SSL client needed for both libraries
WiFiClientSecure client;

UniversalTelegramBot bot(BOT_TOKEN, client);

char ipAddress = "";

volatile bool telegramButton1PressedFlag = false;
volatile bool telegramButton2PressedFlag = false;
volatile bool telegramButton3PressedFlag = false;
volatile bool telegramButton4PressedFlag = false;
volatile bool telegramButton5PressedFlag = false;

void setup() {
Serial.begin(115200);
pinMode(gasAnalogPin, INPUT);

// Set WiFi to station mode and disconnect from an AP if it was Previously
// connected
WiFi.mode(WIFI_STA);
WiFi.disconnect();
delay(100);

// Attempt to connect to Wifi network:
Serial.print("Connecting Wifi: ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
    delay(500);
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
IPAddress ip = WiFi.localIP();
Serial.println(ip);

 ipAddress = ip.toString();

}

void sendTelegramMessage1() {
  String message = "Air was fresh @ testing!";
  if(bot.sendMessage(CHAT_ID, message, "Markdown")){
    Serial.println("TELEGRAM Message 1 Successfully sent");
  }
  telegramButton1PressedFlag = false;
}

void sendTelegramMessage2() {
  String message2 = "Air was good @ testing!";
  if(bot.sendMessage(CHAT_ID, message2, "Markdown")){
    Serial.println("TELEGRAM Message 1 Successfully sent");
  }
  telegramButton2PressedFlag = false;
}

void sendTelegramMessage3() {
  String message3 = "Air was poor @ testing!";
  if(bot.sendMessage(CHAT_ID, message3, "Markdown")){
    Serial.println("TELEGRAM Message 1 Successfully sent");
  }
  telegramButton3PressedFlag = false;
}

void sendTelegramMessage4() {
  String message4 = "Air was bad @ testing!";
  if(bot.sendMessage(CHAT_ID, message4, "Markdown")){
    Serial.println("TELEGRAM Message 1 Successfully sent");
  }
  telegramButton4PressedFlag = false;
}

void sendTelegramMessage5() {
  String message5 = "Air was terrible , emergency evacuation @ testing!";
  if(bot.sendMessage(CHAT_ID, message5, "Markdown")){
    Serial.println("TELEGRAM Message 1 Successfully sent");
  }
  telegramButton5PressedFlag = false;
}

void loop() {
  
 float V0 = 750;
 float Rs = 0;
 float R0 = 0; 
 float Voltage;
 float Vout = 1183;
 float ratio = 0;
 
        R0 = ((20000*5000/V0)-40000);
        Rs = ((20000*5000/analogRead(gasAnalogPin))-40000);


 
 ratio = Rs/R0; //Replace R0 with the value found using the sketch above

   Serial.println(R0);
   Serial.println(Rs);
   Serial.println(ratio); // How to calculate PPM?
   delay(1000);
 if (ratio > 0.90){                       //Fresh stage 1
      Flag = true;
                  if (Flag = true){
                        sendTelegramMessage1();
                        delay(bulk_messages_mtbs);
                        Bot_lasttime = 0;
                        Flag=false;
}
 }else if (ratio < 0.90 && ratio > 0.70){        //good   stage 2
            Flag2 = true;
                          if (Flag2 = true){
                                sendTelegramMessage2();
                                delay(bulk_messages_mtbs);
                                Bot_lasttime = 0;
                                Flag2=false;
}
 }else if (ratio < 0.70 && ratio > 0.40){        //poor  stage 3
            Flag3 = true;
                          if (Flag3 = true){  
                                sendTelegramMessage3();
                                delay(bulk_messages_mtbs);
                                Bot_lasttime = 0;
                                Flag3=false;
}
 }else if (ratio < 0.40 && ratio > 0.10){        //bad stage 4
            Flag4 = true;           
                          if (Flag4 = true){
                                sendTelegramMessage4();
                                delay(bulk_messages_mtbs);
                                Bot_lasttime = 0;
                                Flag4=false;
          
} 
 }else if (ratio <0.10){                  //Emergency  stage 5
            Flag5 = true;                   
                          if (Flag5 = true){
                                sendTelegramMessage5();
                                delay(bulk_messages_mtbs);
                                Bot_lasttime = 0;
                                Flag5=false;
}
}
}

something like this ?

Hutkikz:
Oh and Strings are bad you should use cstrings instead.

very useful