I’d like to be alerted when new Packs are added to coda. Today I explored various ways to accomplish this goal within coda; since I’m a new user, I thought it might be helpful to the developers if I shared my assumptions & processes for doing so:
1st attempt:
-
opened Packs Starter Kit Template: https://coda.io/t/Packs-Starter-Kit_tDpsxMCm1or/preview
-
navigated to “ All the Packs” section / table
-
clicked Automation icon; opened Automations rules editor
-
created rule that triggered on changes to “ All the Packs” table name column, sending me alert with name
-
later on realized that probably none of my actions had been persisted since I had been interacting with the ‘preview’ mode of the template
2nd attempt:
-
clicked “Copy Doc” button in Packs-Starter-Kit template to make my own private doc copy of the template
-
created new table with intent to set column content dynamically by using “Lookup from Table” column type and referencing “ All the Packs” table in source template
-
slowly realized “Lookup from Table” is confined to document-level scope (so are all non-api operations?)
3rd attempt:
-
Signed up for Google Apps Scripts & provisioned coda.io Api auth token
-
created Google Apps Script to one-way-sync the table I created earlier in my copy of the template with the “All the Packs” table in the original template;
-
realized there are no CodaAPI methods for querying public templates
-
what about using CodaApi.listFormulas() to enumerate all formulas, filtering for ‘::’ (which may be unique to Pack-specific formulas), and updating my table based on result?
- oh dang,
listFormulas
endpoint is/docs/{docId}/formulas
- it’s only for getting list of formulas included in specific doc (not templates don’t be silly)
- oh dang,
4th attempt:
-
still attempting to convince myself that its reasonable to expect that behind the scenes private docs copied/instantiated from a public template keep a reference to that template and dynamically update or synchronize the copied content if the template is updated… even though I can’t find any documentation or posts suggesting this is the case…
-
forum posts related to referencing tables between separate documents AKA “
cross-doc
”:
conclusion:
Guess I’ll just wait for cross-doc
features to be implemented (hopefully there will be some cross-template
features too
shhh… 5th attempt…
// from developer js console when logged into coda & browsing
// https://coda.io/t/Packs-Starter-Kit_tDpsxMCm1or/preview:
await fetch('https://coda.io/internalAppApi/packs')
.then(res => res.json())
.then( ({manifest: {packs}}) =>
packs.reduce( (acc, curr) =>
acc.concat(curr.versions[0].name), []
)
)
// resolves to ["Spotify", "Debug", "Slack", "Intercom", "GitHub", "Weather", "Gmail", "Greenhouse", "MLB", "Stocks", "Google Calendar", "Figma", "YouTube", "Instagram", "Walmart Shopping", "Wikipedia", "Twilio", "Google Natural Language", "NBA", "FullContact", "Dropbox"]