# AppScript

**URL:** https://community.glideapps.com/t/appscript/69018
**Category:** Ask for Help
**Created:** [December 26, 2023, 12:43pm UTC](https://community.glideapps.com/t/appscript/69018 "2023-12-26T12:43:50Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Andreas\_Ramelsberger](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/andreas_ramelsberger/32/52780_2.png) [@Andreas\_Ramelsberger](https://community.glideapps.com/u/Andreas_Ramelsberger)
#### Post date: [December 26, 2023, 12:43pm UTC](https://community.glideapps.com/t/appscript/69018/1 "2023-12-26T12:43:50Z")

</div>

Hey,  
does someone has experience with glideapps and appscript?  
I want for example sync my complete table in glideapps with google sheets.  
Does someone know how that works?

Best  
Andi

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [December 26, 2023, 1:11pm UTC](https://community.glideapps.com/t/appscript/69018/2 "2023-12-26T13:11:33Z")

</div>

Do you have a Business or Enterprise Plan?

---

<div class="post-metadata">

### Author: ![Andreas\_Ramelsberger](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/andreas_ramelsberger/32/52780_2.png) [@Andreas\_Ramelsberger](https://community.glideapps.com/u/Andreas_Ramelsberger)
#### Post date: [December 26, 2023, 1:34pm UTC](https://community.glideapps.com/t/appscript/69018/3 "2023-12-26T13:34:42Z")

</div>

I have business

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [December 26, 2023, 1:39pm UTC](https://community.glideapps.com/t/appscript/69018/4 "2023-12-26T13:39:42Z")

</div>

Okay, it’s possible using the Glide API.  
Essentially you would need to write some code that iterates through each table, fetches the data for the table via the API, and writes it into your Google Sheet.

If you’re not familiar with Apps Script, you might find this easier with an integration tool such as Make.

---

<div class="post-metadata">

### Author: ![Andreas\_Ramelsberger](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/andreas_ramelsberger/32/52780_2.png) [@Andreas\_Ramelsberger](https://community.glideapps.com/u/Andreas_Ramelsberger)
#### Post date: [December 26, 2023, 7:47pm UTC](https://community.glideapps.com/t/appscript/69018/5 "2023-12-26T19:47:51Z")

</div>

Hey Darren,

thanks for your reply. I have the problem, that I am not sure how to convert the data.  
In my code I am only able to export “ALL DATA in JSON FORMAT” and it lands then in ONE FIELD in Spreadsheet. But I think I am just wrong in understanding how the data is coming through the API.

Look this is the code I am using:

```auto
  // Überprüfe, ob das "rows" Array vorhanden ist
  if (responseData && responseData.queries && responseData.queries[0].rows) {
    const rows = responseData.queries[0].rows;
    const headers = Object.keys(rows[0]); // Kopfzeilen aus den Schlüsseln der ersten Zeile extrahieren
    const data = rows.map(row => headers.map(header => row[header] || '')); // Daten für jede Zelle extrahieren

    // Kopfzeilen und Daten ins Sheet schreiben
    sheet.getRange(1, 1, 1, headers.length).setValues([headers]); // Kopfzeilen
    sheet.getRange(2, 1, data.length, headers.length).setValues(data); // Daten

```

Do you have an info, what I am doing wrong here?

---

<div class="post-metadata">

### Author: ![Andreas\_Ramelsberger](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/andreas_ramelsberger/32/52780_2.png) [@Andreas\_Ramelsberger](https://community.glideapps.com/u/Andreas_Ramelsberger)
#### Post date: [December 26, 2023, 11:12pm UTC](https://community.glideapps.com/t/appscript/69018/6 "2023-12-26T23:12:04Z")

</div>

Beside that I have detected another problem with the api. As I sayd, I have a business account. In one of my databases with multible columns I see, that I can just receive approximatly 20. So if I try to send a request over zapier for example I just receive a limited amount of columns. Do you know why?

---

<div class="post-metadata">

### Author: ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)
#### Post date: [December 27, 2023, 12:28am UTC](https://community.glideapps.com/t/appscript/69018/7 "2023-12-27T00:28:48Z")

</div>

You can fetch directly using the JavaScript column without any limits or third-party integrations.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [December 27, 2023, 4:33am UTC](https://community.glideapps.com/t/appscript/69018/8 "2023-12-27T04:33:27Z")

</div>

> [@Andreas\_Ramelsberger](#):
>
> Do you have an info, what I am doing wrong here?

I believe the problem is with your very last line. You are operating on `data`, where you should be operating on `data[0]`.

> [@Andreas\_Ramelsberger](#):
>
> In one of my databases with multible columns I see, that I can just receive approximatly 20. So if I try to send a request over zapier for example I just receive a limited amount of columns.

I’ve never seen that, perhaps it’s a limitation of Zapier?  
Keep in mind that only non-computed columns are available via the API.

---

<div class="post-metadata">

### Author: ![Andreas\_Ramelsberger](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/andreas_ramelsberger/32/52780_2.png) [@Andreas\_Ramelsberger](https://community.glideapps.com/u/Andreas_Ramelsberger)
#### Post date: [December 27, 2023, 9:42am UTC](https://community.glideapps.com/t/appscript/69018/9 "2023-12-27T09:42:07Z")

</div>

Hey, how do you mean that? Also when I klick on GlideAPI / JavaScritp I see under columns just listed a view and not all of the columns I have in the database…

here as a sample that you see that I am talking about the right code:

```auto
 erstelltAm: { type: "date-time", name: "Y4lDo" },
        gptAntwort: { type: "string", name: "oN6tD" },
        briefingFile: { type: "string", name: "1pbBN" }
    }

```

Best  
Andi

---

<div class="post-metadata">

### Author: ![Andreas\_Ramelsberger](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/andreas_ramelsberger/32/52780_2.png) [@Andreas\_Ramelsberger](https://community.glideapps.com/u/Andreas_Ramelsberger)
#### Post date: [December 27, 2023, 9:43am UTC](https://community.glideapps.com/t/appscript/69018/10 "2023-12-27T09:43:43Z")

</div>

![Bildschirmfoto 2023-12-27 um 10.42.41](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/7/f79f5d87f2ae783290103f87ea3346a6cf49c40b.png)  
For example the column “Bearbeiter” should normally be visible as you see in the screenshot - its standard text. But its not in the list of java script columns and also über the other API Codes I can not find it. Do you have an idea?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [December 27, 2023, 10:03am UTC](https://community.glideapps.com/t/appscript/69018/11 "2023-12-27T10:03:14Z")

</div>

No, I can’t explain that.  
If you don’t see it under Show API → Add Rows/Edit Rows, then you might need to submit a support ticket.

---

<div class="post-metadata">

### Author: ![Andreas\_Ramelsberger](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/andreas_ramelsberger/32/52780_2.png) [@Andreas\_Ramelsberger](https://community.glideapps.com/u/Andreas_Ramelsberger)
#### Post date: [December 28, 2023, 12:06pm UTC](https://community.glideapps.com/t/appscript/69018/12 "2023-12-28T12:06:31Z")

</div>

Hey, could it be that the behavior is different with the user table compared to other tables? Cause I am now able to import data from a standard table… but when I try to do it with the user table it is fomated completly wrong / different. (the whole answer in one field)
