title: Telegram bot and google apps script not working
body: <p>Good evening everyone, forgive the trouble, I tried to do a &quot;search&quot; on the site but I could not find the answer to my problem so I thought of opening a new discussion.
  I make two premises, the first is that I am not familiar with the English language and therefore I am writing to you via google translator, the second is that I am a novice programmer.
  Having said that, let's get to the tricky part immediately, the following is the code that I put by inserting the token and the webappurl</p>
  <pre><code>var token = &quot;YOUR_TOKEN&quot;;
  var telegramUrl = &quot;https://api.telegram.org/bot&quot; + token;
  var webAppUrl = &quot;YOUR_YO_URL&quot;;
  
  function setWebhook () {
    var url = telegramUrl + &quot;/ setWebhook? url =&quot; + webAppUrl;
    var response = UrlFetchApp.fetch (url);
  }
  
  function sendMessage (chat_id, text) {
    var url = telegramUrl + &quot;/ sendMessage? chat_id =&quot; + chat_id + &quot;&amp; text =&quot; + text;
    var response = UrlFetchApp.fetch (url);
  }
  
  function doPost (e) {
    var contents = JSON.parse (e.postData.contents);
    var chat_id = contents.message.from.id;
    var answer = &quot;Hello&quot;;
    sendMessage (chat_id, answer);
  }
  </code></pre>
  <p>once this is done I publish it as a web application
  I imposed that a new version
  Execute the app as my account
  Who has access to the app anyone
  and press on update
  i go to my telegram bot and any message i send does not reply to me.
  I also tried to follow other tutorials (the codes are very similar to each other) but always the same story, I follow the procedures, but when I go to write on the bot it gives me no sign of life.
  I thank all those who want to help me
  and I apologize for what for the more experienced will be a very simple problem
  Thank you</p>
  <hr />
  <p>I added the line of code you suggested to me</p>
  <pre><code>function setWebhook () {
     var url = telegramUrl + &quot;/ setWebhook? url =&quot; + webAppUrl;
     var response = UrlFetchApp.fetch (url);
     Logger.log (response.getContentText ());
  }
  </code></pre>
  <p>the result was the following</p>
  <pre><code>&quot;[22-03-25 19: 00: 07: 208 CET] {&quot; ok &quot;: true,&quot; result &quot;: true,&quot; description &quot;:&quot; Webhook is already set &quot;}&quot;
  </code></pre>
  <p>but my bot still keeps not responding.</p>