Coda

1. Overview

Coda is an all-in-one collaborative document tool that combines the functionality of documents, spreadsheets, databases, and applications into a single flexible canvas. It enables teams to create dynamic, interconnected documents to manage projects, knowledge bases, and more.

With GoInsight's Coda node, you can seamlessly integrate the powerful features of Coda into your automated workflows, allowing for programmatic management of core resources like documents, tables, and data rows. This makes advanced use cases such as automated report generation, data synchronization, and triggering actions within Coda possible, including:

  • Document Management: Automatically create or delete Coda documents.
  • Data Operations: Create, read, update, and delete data rows in specified tables or views.
  • Structure Querying: Retrieve detailed information about tables, views, columns, formulas, and controls within a document.
  • Interaction Triggering: Programmatically "push" buttons within a Coda document to trigger preset automations or actions.

2. Prerequisites

Before using this node, you need to have a valid Coda account. You may need the appropriate permissions to generate an API token in your Coda account settings for authentication.

3. Credentials

For a detailed guide on how to obtain and configure credentials, please refer to our official documentation: Credential Configuration Guide.

4. Supported Operations

Summary

This Coda node primarily operates on documents (Docs), tables (Tables), rows (Rows), views (Views), and their related elements, giving you comprehensive control over content and data within Coda.

Resource Operation Description
Document Create a Doc Creates a new Coda document.
Document Delete a Doc Deletes a specified Coda document.
Document Get All Doc Gets all accessible Coda documents.
Table List Tables Lists all tables in a specified Coda document.
Table Get a Table Gets detailed information for a specific table in a Coda document.
Column Get All Columns Gets all columns for a specified table in a Coda document.
Column Get a Column Gets detailed information for a specific column in a Coda table.
Row Create a Row Creates a new row of data in a Coda table.
Row Delete a Row Deletes a specified row from a Coda table.
Row Get All Rows Gets all rows from a Coda table.
Row Get a Row Gets information for a specified row from a Coda table.
View Get Many Views Gets all views in a Coda document.
View Get a View Gets a specific view from a Coda document.
View Column Get All View Columns Gets all columns in a Coda view.
View Row Delete a View Row Deletes a specified row from a Coda view.
View Row Get a View Row Gets information for a specified row from a Coda view.
View Row Update a View Row Updates a specified row in a Coda view.
Control Get Many Controls Gets all controls in a Coda document.
Control Get a Control Gets a specific control from a Coda document.
Formula Get Many Formulas Gets all formulas in a Coda document.
Formula Get a Formula Gets a specific formula from a Coda document.
Button Push a Button Pushes a button in a Coda table row.
Button Push a View Button Pushes a button in a Coda view row.

Operation Details

Create a Doc

Creates a new Coda document.

Input Parameters:

  • Name: The name of the new Coda document.

Output:

  • Doc (object): Information about the newly created Coda document.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Create a Row

Creates a new row of data in a Coda table.

Input Parameters:

  • DocId: The ID of the Coda document.
  • TableId: The ID or name of the Coda table.
  • Values: A CSV-formatted string for creating multiple rows, e.g., "ccc,333,333\nddd,444,444".

Output:

  • Success (bool): Whether the data was successfully added.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Delete a Doc

Deletes a specified Coda document.

Input Parameters:

  • DocId: The ID of the Coda document to delete.

Output:

  • IsDeleted (bool): Whether the document was successfully deleted.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Delete a Row

Deletes a specified row from a Coda table.

Input Parameters:

  • DocId: The ID of the Coda document.
  • TableId: The ID or name of the Coda table.
  • RowId: The ID or name of the Coda row.

Output:

  • IsDeleted (bool): Whether the row was successfully deleted.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Delete a View Row

Deletes a specified row from a Coda view.

Input Parameters:

  • DocId: The ID of the Coda document.
  • ViewId: The ID or name of the Coda view.
  • RowId: The ID or name of the Coda row.

Output:

  • IsDeleted (bool): Whether the row was successfully deleted from the view.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Get All Columns

Gets all columns for a specified table in a Coda document.

Input Parameters:

  • DocId: The ID of the Coda document.
  • TableId: The ID or name of the table.

Output:

  • Columns (object-array): A list of columns in the specified table.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Get All Doc

Gets all accessible Coda documents.

Output:

  • Docs (object-array): A list of accessible Coda documents.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Get All Rows

Gets all rows from a Coda table.

Input Parameters:

  • DocId: The ID of the Coda document.
  • TableId: The ID or name of the Coda table.

Output:

  • Rows (object-array): A list of rows in the Coda table.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Get All View Columns

Gets all columns in a Coda view.

Input Parameters:

  • DocId: The ID of the Coda document.
  • ViewId: The ID or name of the Coda view.

Output:

  • Columns (object-array): A list of columns in the Coda view.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Get Many Controls

Gets all controls in a Coda document.

Input Parameters:

  • DocId: The ID of the Coda document.

Output:

  • Controls (object-array): A list of controls in the Coda document.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Get Many Formulas

Gets all formulas in a Coda document.

Input Parameters:

  • DocId: The ID of the Coda document.

Output:

  • Formulas (object-array): A list of formulas in the Coda document.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Get Many Views

Gets all views in a Coda document.

Input Parameters:

  • DocId: The ID of the Coda document.

Output:

  • Views (object-array): A list of views in the Coda document.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Get a Column

Gets detailed information for a specific column in a Coda table.

Input Parameters:

  • DocId: The ID of the Coda document.
  • TableId: The ID or name of the table.
  • ColumnId: The ID or name of the column.

Output:

  • Column (object): Detailed information for the specified column.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Get a Control

Gets a specific control from a Coda document.

Input Parameters:

  • DocId: The ID of the Coda document.
  • ControlId: The ID or name of the Coda control.

Output:

  • Control (object): The specified control in the Coda document.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Get a Formula

Gets a specific formula from a Coda document.

Input Parameters:

  • DocId: The ID of the Coda document.
  • FormulaId: The ID or name of the Coda formula.

Output:

  • Formula (object): The specified formula in the Coda document.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Get a Row

Gets information for a specified row from a Coda table.

Input Parameters:

  • DocId: The ID of the Coda document.
  • TableId: The ID or name of the Coda table.
  • RowId: The ID or name of the Coda row.

Output:

  • Row (object): The specified row in the Coda table.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Get a Table

Gets detailed information for a specific table in a Coda document.

Input Parameters:

  • DocId: The ID of the Coda document.
  • TableId: The ID or name of the table.

Output:

  • Table (object): Detailed information for the specified table.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Get a View

Gets a specific view from a Coda document.

Input Parameters:

  • DocId: The ID of the Coda document.
  • ViewId: The ID or name of the Coda view.

Output:

  • View (object): The specified view in the Coda document.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Get a View Row

Gets information for a specified row from a Coda view.

Input Parameters:

  • DocId: The ID of the Coda document.
  • ViewId: The ID or name of the Coda view.
  • RowId: The ID or name of the Coda row.

Output:

  • Row (object): The specified row in the Coda view.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

List Tables

Lists all tables in a specified Coda document.

Input Parameters:

  • DocId: The ID of the Coda document.

Output:

  • Tables (object-array): A list of tables in the Coda document.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Push a Button

Pushes a button in a Coda table row.

Input Parameters:

  • DocId: The ID of the Coda document.
  • TableId: The ID or name of the Coda table.
  • RowId: The ID or name of the Coda row.
  • ButtonColumnId: The ID or name of the Coda button column.

Output:

  • Success (bool): Whether the button was successfully pushed.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Push a View Button

Pushes a button in a Coda view row.

Input Parameters:

  • DocId: The ID of the Coda document.
  • ViewId: The ID or name of the Coda view.
  • RowId: The ID or name of the Coda row.
  • ButtonColumnId: The ID or name of the Coda button column.

Output:

  • Success (bool): Whether the button was successfully pushed in the view.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

Update a View Row

Updates a specified row in a Coda view.

Input Parameters:

  • DocId: The ID of the Coda document.
  • ViewId: The ID or name of the Coda view.
  • RowId: The ID or name of the Coda row.
  • Values: Key-value pairs for the update, e.g., "Name: John\nAge: 18\nGender: Male" (Chinese colons are also supported).

Output:

  • UpdatedRow (object): The updated row in the Coda view.
  • StatusCode (number): The status code of the operation.
  • ErrorMessage (string): An error message if it fails.

5. Example Usage

This section will guide you through creating a simple workflow to add a new row of data to a specified table in Coda. For example, we can add a new task to a "Task List" table.

Workflow Overview

A basic workflow consists of three nodes: Start -> Coda: Create a Row -> Answer.

Step-by-Step Guide

  1. Add a Tool Node:
    • On the workflow canvas, click the "+" sign to add a new node.
    • In the pop-up panel, select the "Tools" tab.
    • Find and select Coda from the tool list.
    • In the list of supported operations for Coda, click to select Create a Row, which will add the corresponding node to the canvas.
  2. Configure the Node:
    • Click on the newly added Create a Row node, and its configuration panel will expand on the right.
    • Credential Configuration: At the top of the panel, find the credential field. Click the dropdown menu and select your pre-configured Coda credential.
    • Parameter Entry: Fill in the input parameters for this operation in detail.
    • DocId: Enter your Coda document ID. You can find it in the browser's address bar, usually the string of characters after coda.io/d/. For example, abcdef1234.
    • TableId: Enter the ID or name of the table you want to operate on. For example, grid-xyz789 or Task List.
    • Values: Enter the data you want to add as a CSV string. Separate the values for each column with a comma. Assuming your table has three columns: "Task Name", "Assignee", and "Due Date", you could enter: "Complete quarterly report","John Doe","2024-12-31".
  3. Run and Validate:
    • Once all required parameters are correctly filled in, the error prompt in the top right corner of the workflow canvas will disappear.
    • Click the "Run" button in the top right corner of the canvas to execute the workflow.
    • After successful execution, you can click the log icon in the top right corner to view the detailed input and output of the node. The Success field in the output should be true. You can also open your Coda document and will find that the new row of data has been added to the table.

Final Workflow Display

After completing the steps above, your entire workflow is configured. After clicking "Run," a new row of task data will be successfully added to your specified Coda table.

6. FAQs

Q: How do I find my DocId, TableId, or ViewId?

A: You can find these IDs from the URL of your Coda document:

  • DocId: When you open a Coda document, the URL format is typically https://coda.io/d/Document-Name_d[DocId]. The string of characters after the _d is the document ID.
  • TableId/ViewId: When you click on a table or view within the document, the URL will change to https://coda.io/d/Document-Name_d[DocId]/[TableId]. The last part of the URL is the table or view ID, usually starting with grid- or view-.

Q: I'm encountering an error with "Create a Row" indicating an incorrect format. What should I check?

A: Please ensure the Values field strictly adheres to the CSV specification.

  • Column Count Match: The number of comma-separated values you provide must exactly match the number of columns in the target table.
  • Special Characters: If your values contain commas or newlines, enclose the entire value in double quotes.
  • Multi-row Insertion: If you want to insert multiple rows at once, use a newline character \n to separate each row's data.

Q: I received a 401 Unauthorized or 403 Forbidden error. Why is this happening?

A: This is usually related to your API credentials. Please check the following:

  • Correct API Token: Confirm that the Coda API token you configured in GoInsight is valid and has not been revoked.
  • Token Permissions: Ensure that the API token you generated has sufficient permissions to perform the action you are attempting. For example, a read-only token cannot be used to create or delete rows.
  • Document Access Rights: Confirm that the account used to generate the API token has access to the Coda document you specified in the node.

7. Official Documentation

For a more in-depth understanding of all the features and details of the Coda API, please refer to the official documentation:

Coda Official API Documentation

Was This Page Helpful?
Discussion

Leave a Reply.

Your email address will not be published. Required fields are marked*

loading...
No Results