Can I sync data from a Coda table to a Google spreadsheet?

I have a table that was originally in Google Sheets, but I am trying to use Coda for it now. Unfortunately, the original Google Sheet still needs to be updated with changes I make in the Coda version. Is there an existing method to create this syncing?

There is no native option for this. You can create a connection using services like zapier/integromat/parabola or with Google apps script

Hi @cylo, thanks for your question. As @Asaf_Dafna mentioned there is no native way to sync data from your Coda docs to Google Sheets. The easiest way to do this is to use something like Zapier. If you are comfortable with a little bit of scripting in Google Apps Script, you can use the Google Sheets API in conjunction with Coda’s API to sync data. I also wrote about the pros and cons of syncing data with Google Sheets in this blog post.

@Al_Chen_Coda,

Might you (or anyone else) have a simple example of such a Coda API/Sheets API combination?

I only need to sync one Coda table to one Google sheet (totally okay if everything gets written over every time the trigger runs)

Have gone through your blog post and related video on YouTube (very informative!) hoping that it would mention Coda → Sheets, but alas, it did not.

Any help here would be very much appreciated.
We’re trying to move more of our business to Coda but still need to push some info to Google Sheets.

Many thanks!
Michael

Have you seen this Script example: https://blog.coda.io/how-to-sync-data-between-coda-docs-and-google-sheets-using-google-apps-script-128307ec2ad9

I’m working on a tutorial (blog post + YouTube video) on this very subject, will publish here in the community in the coming weeks when it’s ready :+1:

2 Likes

@Al_Chen_Coda What wonderful news — very much looking forward to that tutorial.

Thank you for the update.

We’ve also recently updated to the Team plan, and are loving it!

1 Like

@Al_Chen_Coda

Hi Al, any updates on the GAS script from Sheets to Coda?

We currently have scripts setup from various sources which place data inside a Google Sheet. I want to make sure I have the end code right so that we can place that array directly into Coda.

Still working on it! Will post an update here once I have something I can share.

3 Likes

Hi @cylo @Michael_Warren @Shaun_Singh, just posted two Google Apps Scripts you can use for syncing Coda to Sheets or Sheets to Coda in the community, hope these help!

2 Likes

Thanks @Al_Chen_Coda

I will get on this later tonight, really appreciate your help with this :+1:

1 Like

Great video, just tried it but got this error

1 Like

Or do I need to define the columns as well?

Hi @Thomas_Schulz, it looks like the TARGET_DOC_ID doesn’t look right. It should be everything after the _d in your doc URL. So try using vf5GA-qrla and see if it works.

1 Like

perfect :rocket: thanks

1 Like

@Al_Chen_Coda one time sync now works, but adding the timer, I get this error message:

Any thoughts what it could be?

Are you able to share any screenshots of your Coda doc and Google Sheet? One caveat I mentioned in the blog post and video is that this shouldn’t be treated as a real-time sync. So if you are running the script every minute and making edits to Google Sheet at the same time, there may be issues due to the snapshot in Coda not finishing in time, Coda source URLs not copying over, etc.

Alternatively, you could try setting the REWRITE_CODA_TABLE variable in the script to true which may result in the script running more reliably but you won’t get the Coda source row URLs in the Google Sheet after the sync happens.

1 Like