Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

119
Views
Text length filter Google Apps Script

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.

  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 > 10) {
      sendText(chat_id,"โœ… Great!");
    }
    else (text.length < 10) {
      sendText(chat_id,"๐Ÿ˜” Its not enough.");
    }
  }
about 4 years ago ยท Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
ยฉ 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!