Google Apps Script Migration
We recently <link>announced</link> a new, stable release of the API: Version 1. Our CodaAPI library for Google Apps Script uses the API, and you must upgrade to the newest version of that library to access our latest API version.
Per our deprecation policy for the beta API, please migrate to the latest Google Apps Script library within 30 days of our announcement, that is, by
August 14, 2020
.
This version will be supported for at least the next 6 months (through January 15, 2021) and we will give at least 3 months notice before making any breaking changes on or after that date.

We have published a new version of the Google Apps Script library for Coda that uses the new API version. Migrating to this new library should be straightforward in most cases. Open your Google Apps Script project, and click the “Resources” menu button, and choose “Libraries”. Find the row for “CodaAPI” and click the dropdown menu under the “Version” column. Select version 9, which will be labeled “1.0.0”.

Google Apps Script - CodaAPI.png

In many cases, that should be all that you need to do to complete the migration.

Breaking Changes

However, we have made some breaking changes to the API, as outlined in our
, and these correspond to some library functions that have changed or been removed.

The main change is that functions that were specific to views have been removed, and you can now simply use the corresponding function for tables to work with views.
Old Function
New Function To Use
Reason
1
listViews
listTables
Views consolidated with tables
2
getView
getTable
Views consolidated with tables
3
listViewRows
listRows
Views consolidated with tables
4
updateViewRow
updateRow
Views consolidated with tables
5
deleteViewRow
deleteRow
Views consolidated with tables
6
listViewColumns
listColumns
Views consolidated with tables
7
pushViewButton
pushButton
Views consolidated with tables
8
listSections
listPages
Sections renamed to Pages
9
getSection
getPage
Sections renamed to Pages
10
updateSection
updatePage
Sections renamed to Pages
There are no rows in this table
Functionality related to folders has been removed. Pages can now have subpages nested beneath them, creating a similar but more powerful hierarchy than folders.

As such, the
listFolders
function has been removed. The pages you get back from the
listPages
response will include all top-level pages, which may have subpages nested within them. Examine the
children
property of any page in the response to see if it contains subpages. Similarly, the
getFolder
function has been removed, simply use
getPage
with the id of any parent page to see its list of children.
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.