Send list to google sheets using script issue

hi

I am using a script (which worked with another no code tool) to transfer lists and two other parameters in google sheet these lists I transformed them into csv
I try to adapt and I manage to transfer a single list (without transforming it into csv) with the following blocks

Are you sharing something that worked? Or something you need help with?

What is the script?

no it doesn’t work due to my difficulties to translate my app with thunkable
this is how I worked on the other no-code tool

1 Like

Wanna share your script code? That would be helpful in determining the issue. All looks good (seemingly) on how you are sending stuff.

The block you shared from App Investor is not the same as the one you shared from Thunkable therefore you should not expect it to work the same.

Anyway, no one can give you a good suggestion without seeing your code from both sides (Thunkable side and the Google Apps Script side). Both should match to get the expected results.

hi

it is true that they are not the same (and that it gives another result) and as for a list it worked I thought to continue in this way but I realized that it was not right
objects are not that yet !!!
I need to get as close as possible to what I was doing on the other no-code tool

1 Like

That is very difficult to answer. It is obvious that you do not want to share your project and your google script and therefore it will be hard to provide a solution other than guessing.

1 Like

If it’s the same script, you could try sending your data in the actual url string

But

If it’s the same script, then it would seem it’s not working because your key names don’t match?

hi

my problem, I think, is to “encode” the lists with thunkable blocks
when the script that I built by taking inspiration from this and there I simplified it because it included a file search (one of the parameters that is missing is the name of the folder)

1 Like

hi

I manage to send simple data to my script so it works in part the problem is how to send lists in the form of csv

1 Like

The script you shared expects 3 lists as parameters. You are passing two parameters and one list so the script will not run correctly. The best this script will do is to create one single row entry in your Google sheet.

If you are using the QueryParameters then remember that the maximum length should not exceed 2083 characters combined with the script URL.

Again, you should not have spaces in your list so you need to convert the spaces to %20.

The last thing is to pass your list as string not as a Thunkable list by using:

I took the general form of the script but I tried with one list then two lists and so on
with the “create object” block I sent a list with two it didn’t worked more

1 Like

You will need to change the script code to deal with objects. Currently the script uses a string of words and commas to build a list from them and then loop through the list to append the items in the sheet. The current code will break when seeing an object passed as parameter.

1 Like

You append brackets to your array in the code but they would be sent with those already from Thunkable. I’d you send it as an array, you shouldn’t need to add those brackets. Right?

Can you not connect the google sheet as a data source and append a row with the data source blocks?

1 Like

This is why I explained:

1 Like

i can’t use google sheet as data source because i create this sheets dynamically

1 Like

I noticed something when I try my script without the app it hangs on “:” because it is hours that I send

Hi

I can get around sending entire lists by putting the block that sends the data in a loop to send all the first elements of each list then every second and so on but I hope with your help I can send all of them the lists at the same time

1 Like

This should not work.
image
Your script is clearing the sheet every time you call it.

[Edit]
To send large data to Google sheet or Google script see this demo