OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

JSON input from Google-AppSheet not sending notifications to Telegram

  • Thread starter Thread starter Kevin Risto
  • Start date Start date
K

Kevin Risto

Guest
So currently I'm in a small project to create an automatic notification in Telegram based on given input from AppSheet. I've created a bot within the AppSheet, using Webhook and applied codes within the JSON body.

Since it's new for me, I think the JSON is using JavaScript as its basic language and I've applied these lines of codes:

Code:
    {"chat_id":<TELEGRAM TOKEN ID>,
    "text":"<<CONCATENATE("Notification ",text(today()))>>\n
    <<CONCATENATE("ID: ",[ID])>>\n
   <<CONCATENATE("Registration Status: ", [Registration Status])>>\n
   <<CONCATENATE("No. of Customer: ", [CustomerNumberID])>>\n",
   "parse_mode":"MarkdownV2"}

The expected result should be, whenever a user inputs any data to [ID], [Registration Status], and [CustomerNumberID], from the Google AppSheet, it would send a notification to a Telegram channel.

The problems are:

  1. The code won't work and no return was received on Telegram's end if I used "No. of Customer" on line 5, but it does work if I use "Number of Customer" as the return text from the corresponding input of the column's cell.
  2. The code also doesn't work if I input numchar input on line 4, but it does work if I use whole char input. E.g.: I received a notification when I used "Ready" instead of "3-Days Offline" on the [Registration Status] input. (p.s: It ran because I replaced "No. of Customer" with "Number of Customer" on line 4.)

<p>So currently I'm in a small project to create an automatic notification in Telegram based on given input from AppSheet. I've created a bot within the AppSheet, using Webhook and applied codes within the JSON body.</p>
<p>Since it's new for me, I think the JSON is using JavaScript as its basic language and I've applied these lines of codes:</p>
<pre><code> {"chat_id":<TELEGRAM TOKEN ID>,
"text":"<<CONCATENATE("Notification ",text(today()))>>\n
<<CONCATENATE("ID: ",[ID])>>\n
<<CONCATENATE("Registration Status: ", [Registration Status])>>\n
<<CONCATENATE("No. of Customer: ", [CustomerNumberID])>>\n",
"parse_mode":"MarkdownV2"}
</code></pre>
<p>The expected result should be, whenever a user inputs any data to [ID], [Registration Status], and [CustomerNumberID], from the Google AppSheet, it would send a notification to a Telegram channel.</p>
<p>The problems are:</p>
<ol>
<li>The code won't work and no return was received on Telegram's end if I used "No. of Customer" on line 5, but it does work if I use "Number of Customer" as the return text from the corresponding input of the column's cell.</li>
<li>The code also doesn't work if I input numchar input on line 4, but it does work if I use whole char input. E.g.: I received a notification when I used "Ready" instead of "3-Days Offline" on the [Registration Status] input. (p.s: It ran because I replaced "No. of Customer" with "Number of Customer" on line 4.)</li>
</ol>
 

Latest posts

M
Replies
0
Views
1
Meliodas Dragon
M
Top