Node-RED package for Coda


#1

Hello, I built a Node-RED package for Coda and wanted to share with you.

Node-RED is a flow-based development tool that allows you to build applications quickly and easily. It’s built on Node.js so easy to set up (if you are familiar with CLI). It also comes with an intuitive browser-based GUI so it’s incredibly easy to get started.

I’ve been building tools using Node-RED that aggregates data from Twitter and various other data sources. Our typical Node-RED flow works as below:

  1. Search strings and keywords are stored in Coda to allow non-tech staff members to edit them without touching the code
  2. Our Node-RED flow accesses Coda to grab those strings and keywords
  3. It then constructs request URLs and sends requests to various services like Twitter
  4. When responses are received, it parses/formats the data, then saved in various storages including Coda and Google BigQuery

Node-RED is very good at processing data asynchronously so tasks such as querying through Twitter search API and writing the results to database / Coda was relatively easy to build.

Since we are planning on building more flows like this, and Coda has become our essential tool for data analysis and visualisation activities, we have decided to build a Coda package for Node-RED to make it even easier to interact with Coda from Node-RED.

At the moment, the package comes with the following nodes:

  • Connection settings node
    • Stores multiple Coda API tokens and table IDs
  • Get data node
    • This node constructs a URL and HTTP header to:
      • get a list of tables in a doc
      • get a list of columns in a table
      • get rows from a table
  • Multiple pages node
    • Sends multiple requests to Coda to retrieve a large number of rows from Coda (Coda allows you to retrieve up to 500 rows per GET request)
  • Upsert node
    • constructs a URL and HTTP header
    • format data into a structure that is accepted by Coda APIs

It is available on Github, as well as on npm:

The documentation comes with detailed instructions, as well as some sample flows, which you can import to your Node-RED instance to try out so it should be quite straightforward to get your flows to interact with Coda documents and tables.

I hope you find this useful :slightly_smiling_face:


#2

If you are interested in hardware/IoT this is the perfect library :sunglasses:!


#3

@Mori_Sugimoto Amazing stuff here! Thanks for sharing.


#4

VERY cool contribution! Thank you for posting!


#5

This is really cool. Wasn’t familiar with Node-Red, what a great way to write code.