Best answer

Refresh Google Spreadsheet All Data Based on Custom SQL

  • 8 April 2021
  • 4 replies
  • 140 views

I have tried a few times and am getting stuck. I am looking to have a google sheet of data which is generated from a custom SQL query. But I would like the google sheet to update all the data based on the SQL query running. 

I have found ways to lookup rows and update those rows but I just want the sheet refreshed completely every x time period.

Been trying for a while to get this and just getting lost. Appreciate the help

icon

Best answer by XRay Tech 8 April 2021, 21:58

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Badge +4

Hey @sdawes9899,

 

If I’m reading this correctly, you have the Zap performing the function you want correctly but now you are looking for a way to trigger it at on a regular schedule. If this is the case, the Schedule trigger by Zapier may be what you’re looking for. This would allow you to set the Zap to trigger every hour, day, week, or month based on what you select. You could also have multiple copies of the Zap to trigger at different intervals.

If you need a more custom interval than this you could also use the Delay feature. To do this I would create a spreadsheet with all the times I want the Zap to trigger listed. The trigger would be adding new rows to the spreadsheet and the Delay step would be used to delay until the time in the spreadsheet.

Let me know if these will work for your case!

 

Happy Zappin’ !

XRay

@XRayTech Actually I do not. I have the SQL being correct but it is not creating the full spreadsheet worth or data NOR auto updating it. As when looking at the drop downs it just states 1 row when using custom SQL

 

 

Badge +4

@sdawes9899  Since you can only look at one row at a time this might not be very feasible. One option would be to use the Looping function to loop through the SQL rows and update the GSheets rows one at a time. The Looping function is currently limited to 500 loops though, so depending on the size of your database you may have to have multiple Zaps for rows 1-500, 501-1000, etc. This is not the most practical, but may be actionable. 

@XRayTech Ahh ok. That makes sense now. Thank you for clarifying