# Glide in not syncing automatically with Google sheets

**URL:** https://community.glideapps.com/t/glide-in-not-syncing-automatically-with-google-sheets/57183
**Category:** Ask for Help
**Created:** [January 27, 2023, 6:05pm UTC](https://community.glideapps.com/t/glide-in-not-syncing-automatically-with-google-sheets/57183 "2023-01-27T18:05:29Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Kaiser](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kaiser/32/53478_2.png) [@Kaiser](https://community.glideapps.com/u/Kaiser)
#### Post date: [January 27, 2023, 6:05pm UTC](https://community.glideapps.com/t/glide-in-not-syncing-automatically-with-google-sheets/57183/1 "2023-01-27T18:05:29Z")

</div>

Hi everyone.  
I’ve made a Glide page that generate Images, I’m using Google sheet and App script. In my app script I have a function that generate automatically a link (image) for every row, whenever the cell “Prompt” is filled and the link is generated in the cell “Response” (same row).  
In Google sheet, that take about 3 second and the link is generated. but in Glide, I should every time sync manually or wait at least 2 minutes to get the new link appear (I’m using Glide form to add new “Prompt”), I also have the Data sync mode on “Extra”. I need help Please  
Thanks.

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [January 27, 2023, 6:20pm UTC](https://community.glideapps.com/t/glide-in-not-syncing-automatically-with-google-sheets/57183/3 "2023-01-27T18:20:22Z")

</div>

Here is some more information regarding data syncing. Even with Extra syncs turned on, Glide will only check for new data every few minutes. It gets tricky when you rely on scripting or formulas in the google sheet.

> **[Glide Docs • Data Refresh](https://www.glideapps.com/docs/reference/faq/data-refresh)**
>
> How long it takes for data to sync from projects → data source.

Out of curiosity, how are you generating an image. Just wondering if there is some way you could achieve the same thing within glide. Then you wouldn’t have to rely on data syncing from google to glide, and you could reduce your update/sync counts.

---

<div class="post-metadata">

### Author: ![Kaiser](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kaiser/32/53478_2.png) [@Kaiser](https://community.glideapps.com/u/Kaiser)
#### Post date: [January 27, 2023, 6:25pm UTC](https://community.glideapps.com/t/glide-in-not-syncing-automatically-with-google-sheets/57183/4 "2023-01-27T18:25:50Z")

</div>

Okay! thanks for replying, I’m using a complex app script to send a Prompt request to “Open AI”, and writing back the result in same row. Is there a way to do this in Glide? and witch language should I use?

---

<div class="post-metadata">

### Author: ![Kaiser](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kaiser/32/53478_2.png) [@Kaiser](https://community.glideapps.com/u/Kaiser)
#### Post date: [January 27, 2023, 6:29pm UTC](https://community.glideapps.com/t/glide-in-not-syncing-automatically-with-google-sheets/57183/5 "2023-01-27T18:29:38Z")

</div>

Or, Is there a way to play an action after 3 second?

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [January 27, 2023, 6:40pm UTC](https://community.glideapps.com/t/glide-in-not-syncing-automatically-with-google-sheets/57183/6 "2023-01-27T18:40:02Z")

</div>

> [@Kaiser](#):
>
> Or, Is there a way to play an action after 3 second?

Doubt it. I think syncing with google can get expensive and would be demanding on the server.

> [@Kaiser](#):
>
> Is there a way to do this in Glide? and witch language should I use?

There is a javascript column if you want to use raw javascript. There is also an experimental code if you want to call external code. Both columns would allow you to pass in the prompt and return a result after processing through the code, so those are options. There are also plugin columns such as the JSON Fetch column, which allows you to retrieve data and parse it out. Something like that may be useful.

> **[Experimental Code Column | Glide Docs](https://www.glideapps.com/docs/automation/computed-columns/experimental-code-column)**
>
> Create new computed columns with JavaScript.

[https://www.glideapps.com/docs/reference/computed-columns/plugins](https://www.glideapps.com/docs/reference/computed-columns/plugins)

---

<div class="post-metadata">

### Author: ![Kaiser](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kaiser/32/53478_2.png) [@Kaiser](https://community.glideapps.com/u/Kaiser)
#### Post date: [January 27, 2023, 6:41pm UTC](https://community.glideapps.com/t/glide-in-not-syncing-automatically-with-google-sheets/57183/7 "2023-01-27T18:41:43Z")

</div>

I should try, thank you for the advice

---

<div class="post-metadata">

### Author: ![Kaiser](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kaiser/32/53478_2.png) [@Kaiser](https://community.glideapps.com/u/Kaiser)
#### Post date: [January 28, 2023, 10:39am UTC](https://community.glideapps.com/t/glide-in-not-syncing-automatically-with-google-sheets/57183/8 "2023-01-28T10:39:12Z")

</div>

Hi,  
I’ve tried the JavaScript column method, but is not giving any results, I’m not sure that I understand haw it is working, here is my code (API\_KEY is meant to be hided):

fetch(‘[https://api.openai.com/v1/images/generations](https://api.openai.com/v1/images/generations)’, {  
method: ‘POST’,  
headers: {  
‘Content-Type’: ‘application/json’,  
‘Authorization’: ‘Bearer API\_KEY’  
},  
body: JSON.stringify({  
prompt: “p1”,  
model: “image-alpha-001”,  
size: “256x256”  
})  
})  
.then(response =\> response.json())  
.then(data =\> {  
// Extract the image URL from the JSON object  
let imageUrl = data.data[0].url;

// Use the image URL to display the image in app  
document.getElementById(“myImage”).src = imageUrl;  
});

---

<div class="post-metadata">

### Author: ![Kaiser](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kaiser/32/53478_2.png) [@Kaiser](https://community.glideapps.com/u/Kaiser)
#### Post date: [January 28, 2023, 10:39am UTC](https://community.glideapps.com/t/glide-in-not-syncing-automatically-with-google-sheets/57183/9 "2023-01-28T10:39:52Z")

</div>

I replaced p1 with the prompt column

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [January 28, 2023, 2:38pm UTC](https://community.glideapps.com/t/glide-in-not-syncing-automatically-with-google-sheets/57183/10 "2023-01-28T14:38:45Z")

</div>

Since your moved the conversation to a new thread…

> [@Javascript column to call API](https://community.glideapps.com/t/javascript-column-to-call-api/57209):
>
> Hi, I’ve tried the JavaScript column method, to run API call but is not giving any results, I’m not sure that I understand haw it is working, here is my code (API\_KEY is meant to be hided): fetch(‘[https://api.openai.com/v1/images/generations’](https://api.openai.com/v1/images/generations%E2%80%99), { method: ‘POST’, headers: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer API\_KEY’ }, body: JSON.stringify({ prompt: “p1”, model: “image-alpha-001”, size: “256x256” }) }) .then(response =\> response.json()) .then(data =\> { //…
