Reading output from Google Apps script output

Hello

I could not find answer to the above question, so I will create this topic for it.

I have a Google Apps Script that I use to Create/Update/Delete some data on my GoogleSheet. I construct the complete URL to my GAS from my Thunkable X app, fire it up, and the script execute with no error: my data in Sheet changes based on command.

However, I was not yet able to read & manipulate the data inside my app after a Read/SQL command. The output from GAS is pure Text. And if you execute the script in the browser, it also shows it as Text. But it is not ASCI when the app gets the response (due to google masking all the html code; due to security considerations they stated).

My question is this: has anyone been able to read the data from within Thunkable X, and place it in either a List or other variables?

Thanks
Tony

1 Like

Hey @tonyz80, this is a great question! There is a new component being beta tested right now that will allow for just sucha thing with ease! The new component should allow you to read/write to Google Sheets! I have been waiting on this for some time now and am super excited to see it fully functioning soon!

1 Like

Thanks @ jgibb20189 for this reply.

Do you know when will this beta component be released?
Are we talking days or weeks?

thanks
Tony

I think the plan would be weeks. Probably not days. But it’s close. If it’s out for beta testing, I would assume it’s coming soon. @domhnallohanlon, @jane, or @Mark may have more insight buttttt, putting a hard date on something that’s not working perfectly yet may not be possible. However, keep your ears and eyes on the lookout for news!

@tonyz80, great work making that script btw. Would you share What does that look like and how Did you connect sheets to thunkable to save the data?Perhaps with screenshots?

1 Like

@jared
Yeah sure. Sorry I did not reply earlier.

I essentially have adopted the following GAS from
https://sites.google.com/view/metricrat-ai2/guides/crud-with-google-sheets-web-app-and-ai2

Although it was written for AI2, I incorporated it into X.Thunkable and all work EXCEPT how to read the results. In other words, the command is sent from within my Thunkable app, and it is executed, and the output is correct as seen in the Google Sheet.
However, I cannot use the ‘when web get result’ from the app, as GAS redirects the URL from script.google.com to script.googleusercontent.com.
According to GAS page, https://developers.google.com/apps-script/guides/content, it is for security reasons.
Therefore, I was not able to get the data from that redirected URL, because Thunkable cannot follow the redirected URL, thus, I cannot obtain the results and use them in my APP after I sent the POST.

So, on that note, may be @domhnallohanlon, @jane, or @Mark can provide some insight into how to best follow the final redirect URL and interact with the results by the Thunkable app.

thanks
Tony

1 Like