# Coda

**What is the Coda Node?**

The Coda node in StackAI enables seamless integration with Coda, allowing you to automate document management, data updates, and workflow actions directly within your StackAI flows. With this node, you can create, update, and manage Coda docs, pages, tables, and rows, streamlining your business processes and boosting productivity.

***

**How to Use the Coda Node?**

To use the Coda node, simply add it to your StackAI workflow and select the desired action. Connect your Coda account using a valid connection ID, then configure the required inputs and settings for your chosen action. The node will execute the action and return the results, which can be used in downstream nodes for further automation.

***

**Example of Usage**

Suppose you want to add a new row to a Coda table whenever a new lead is captured. You would use the "Upsert Rows" action, provide the required Doc ID, Table ID, and row data, and connect the output to your reporting or notification nodes.

***

**Most Commonly Used Actions in the Coda Node**

Below are the most popular and useful Coda actions available in StackAI, along with detailed input, configuration, and output explanations:

***

#### 1. List Docs

**Description:** Retrieve a list of all Coda docs accessible to your account.

* **Inputs:**
  * None required.
* **Configurations:**
  * **connection\_id** (Required): Your Coda connection ID.
* **Outputs:**
  * **docs**: Array of document objects, each containing doc ID, name, and other metadata.

**Example:**

```json
{
  "action_configurations": { "connection_id": "<your-coda-connection-id>" },
  "action_input_parameters": {}
}
```

***

#### 2. Create Doc

**Description:** Create a new Coda document.

* **Inputs:**
  * **title** (Required): The name of the new document.
* **Configurations:**
  * **connection\_id** (Required): Your Coda connection ID.
* **Outputs:**
  * **doc\_id**: The unique ID of the created document.
  * **name**: The name of the document.

**Example:**

```json
{
  "action_configurations": { "connection_id": "<your-coda-connection-id>" },
  "action_input_parameters": { "title": "Project Plan" }
}
```

***

#### 3. List Tables

**Description:** List all tables in a specified Coda doc.

* **Inputs:**
  * **doc\_id** (Required): The ID of the Coda document.
* **Configurations:**
  * **connection\_id** (Required): Your Coda connection ID.
* **Outputs:**
  * **tables**: Array of table objects with table IDs and names.

**Example:**

```json
{
  "action_configurations": { "connection_id": "<your-coda-connection-id>" },
  "action_input_parameters": { "doc_id": "abc123" }
}
```

***

#### 4. Upsert Rows

**Description:** Add or update rows in a Coda table.

* **Inputs:**
  * **doc\_id** (Required): The ID of the Coda document.
  * **table\_id** (Required): The ID of the table within the document.
  * **rows** (Required): Array of row objects to insert or update.
* **Configurations:**
  * **connection\_id** (Required): Your Coda connection ID.
* **Outputs:**
  * **row\_ids**: Array of IDs for the upserted rows.

**Example:**

```json
{
  "action_configurations": { "connection_id": "<your-coda-connection-id>" },
  "action_input_parameters": {
    "doc_id": "abc123",
    "table_id": "table456",
    "rows": [{ "Name": "John Doe", "Email": "john@example.com" }]
  }
}
```

***

#### 5. Get Row

**Description:** Retrieve a specific row from a Coda table.

* **Inputs:**
  * **doc\_id** (Required): The ID of the Coda document.
  * **table\_id** (Required): The ID of the table.
  * **row\_id** (Required): The ID of the row to retrieve.
* **Configurations:**
  * **connection\_id** (Required): Your Coda connection ID.
* **Outputs:**
  * **row**: Object containing the row data.

**Example:**

```json
{
  "action_configurations": { "connection_id": "<your-coda-connection-id>" },
  "action_input_parameters": {
    "doc_id": "abc123",
    "table_id": "table456",
    "row_id": "row789"
  }
}
```

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stackai.com/workflow-builder/apps/coda.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
