title: Text length filter Google Apps Script
body: <p>I create a telegram bot, which collects user info into gSheets. I want to create a filter. If the user wrote less than 10 symbols, bot says that this is not enough. When I tested it, bot just stopped, but JSON was still coming and being processed.</p>
  <pre><code>  function doPost(e) {
      let contents = JSON.parse(e.postData.contents); 
      let chat_id = contents.message.chat.id; 
      let text = contents.message.text; 
    
      if (text.length &gt; 10) {
        sendText(chat_id,&quot;✅ Great!&quot;);
      }
      else (text.length &lt; 10) {
        sendText(chat_id,&quot; Its not enough.&quot;);
      }
    }
  </code></pre>