How to sync data from Coda to Google Sheets and Google Sheets to Coda using Google Apps Script

I found out the problem.

The column names in Gsheet are correct but 2 of them have identical names so when copied to Coda, they automatically changed to “column name 2” and thus cause a discrepancy in syncing.

Fix that and they sync work perfectly fine.

Thank you.