# Send list to google sheets using script issue

**URL:** <https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008>\
**Category:** Questions about Thunkable X\
**Created:** [December 19, 2021, 6:55am UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008 "2021-12-19T06:55:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bibbi](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@bibbi](https://community.thunkable.com/u/bibbi)\
**Post date:** [December 19, 2021, 6:55am UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/1 "2021-12-19T06:55:31Z")

</div>

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

 ![Capture d’écran 2021-12-19 à 07.52.09](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/d/3d02b44e802cafaf284ace90cdf065c0fa5dae74.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [December 19, 2021, 7:05am UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/2 "2021-12-19T07:05:12Z")

</div>

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

What is the script?

---

<div class="post-metadata">

**Author:** ![bibbi](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@bibbi](https://community.thunkable.com/u/bibbi)\
**Post date:** [December 19, 2021, 7:13am UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/4 "2021-12-19T07:13:27Z")

</div>

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

 ![Capture d’écran 2021-12-19 à 13.02.43](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/9/493858a8e6754ca513cc27bf9e71820ba195eb8b.jpeg)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [December 19, 2021, 12:13pm UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/5 "2021-12-19T12:13:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [December 19, 2021, 12:19pm UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/6 "2021-12-19T12:19:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bibbi](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@bibbi](https://community.thunkable.com/u/bibbi)\
**Post date:** [December 19, 2021, 12:28pm UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/7 "2021-12-19T12:28:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [December 19, 2021, 12:36pm UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/8 "2021-12-19T12:36:27Z")

</div>

> [@bibbi](#):
>
> I need to get as close as possible to what I was doing on the other no-code tool

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.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [December 19, 2021, 12:45pm UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/9 "2021-12-19T12:45:53Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![bibbi](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@bibbi](https://community.thunkable.com/u/bibbi)\
**Post date:** [December 19, 2021, 12:56pm UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/10 "2021-12-19T12:56:19Z")

</div>

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)

 ![Capture d’écran 2021-12-19 à 13.48.02](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/9/b9f55c3d7514f9c3270f80de9279226ac5a7a816.png)

---

<div class="post-metadata">

**Author:** ![bibbi](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@bibbi](https://community.thunkable.com/u/bibbi)\
**Post date:** [December 19, 2021, 1:06pm UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/11 "2021-12-19T13:06:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [December 19, 2021, 1:07pm UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/12 "2021-12-19T13:07:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [December 19, 2021, 1:13pm UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/13 "2021-12-19T13:13:34Z")

</div>

> [@bibbi](#):
>
> how to send lists in the form of csv

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:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/optimized/3X/8/6/869ca5bc91970b15c82972bb939b96ebb33484bc_2_690x37.png)

---

<div class="post-metadata">

**Author:** ![bibbi](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@bibbi](https://community.thunkable.com/u/bibbi)\
**Post date:** [December 19, 2021, 1:14pm UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/14 "2021-12-19T13:14:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [December 19, 2021, 1:27pm UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/15 "2021-12-19T13:27:29Z")

</div>

> [@bibbi](#):
>
> with the “create object” block

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.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [December 19, 2021, 1:37pm UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/16 "2021-12-19T13:37:08Z")

</div>

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?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/e/7ec50a526bfcbe23db690da094e570d332258eae.jpeg)

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

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [December 19, 2021, 1:40pm UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/17 "2021-12-19T13:40:06Z")

</div>

This is why I explained:

> [@muneer](#):
>
> Currently the script uses a string of words and commas to build a list from them

---

<div class="post-metadata">

**Author:** ![bibbi](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@bibbi](https://community.thunkable.com/u/bibbi)\
**Post date:** [December 19, 2021, 1:53pm UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/18 "2021-12-19T13:53:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bibbi](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@bibbi](https://community.thunkable.com/u/bibbi)\
**Post date:** [December 19, 2021, 1:59pm UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/19 "2021-12-19T13:59:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bibbi](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@bibbi](https://community.thunkable.com/u/bibbi)\
**Post date:** [December 20, 2021, 11:18am UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/20 "2021-12-20T11:18:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [December 20, 2021, 11:25am UTC](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008/21 "2021-12-20T11:25:31Z")

</div>

> [@bibbi](#):
>
> sends the data in a loop to send all the first elements of each list then every second and so on

This should not work.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/a/9a6942153a86f2e9367b503ba3a2363fafd07eb3.png)  
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

> [@Save Canvas Image to your Google drive](https://community.thunkable.com/t/save-canvas-image-to-your-google-drive/1609950):
>
> For this tutorial you will need to code a short script in Google Apps Script which you can access it from within Google Drive. You will need to use Web API component to talk to the script you created in Google Apps Script and pass the parameters using the Query Parameter section the the Body section. The Base64 image cannot fit into the Query Parameter section and therefore will will need to pass it using the Body section of the Web API. The Thunkable project is very simple and is used to demo…

[Next page](https://community.thunkable.com/t/send-list-to-google-sheets-using-script-issue/1657008.md?page=2)
