---
name: "tables_import"
area: "tables"
title: "Import a CSV"
price: "$0.001 per row imported"
method: "POST"
url: "https://api.conecto.chat/v1/tools/tables_import"
mcp_server: "https://api.conecto.chat/mcp/tables"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/tables/tables_import"
---

# Import a CSV (`tables_import`)

Adds the rows of a CSV in the file store to a table, or makes a new table from it.

Rows from a CSV in the file store: into an existing table (CSV headers matched to column names; unknown headers listed and skipped) or, with new_table, into a new table with a text column per header. Every row is checked first; nothing is added if one is wrong.

Price: $0.001 per row imported. A call that fails costs nothing.

## Use it when

Rows arrive as a CSV: a supplier's price list, an export from another tool.

- For contacts, companies or deals from a CSV, use [crm_save_contacts](https://conecto.chat/tools/crm/crm_save_contacts.md).

## Say this to your agent

> Luis saved our parts price list as a CSV. Turn it into a table.

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `file_id` | string | yes | Exactly 36 characters. |  |  |
| `table` | string | no | The table's name (or its table_id). 1 to 80 characters. |  |  |
| `new_table` | string | no | 1 to 80 characters. |  |  |

## Example

Written for Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon.

MCP: call `tables_import` on the MCP server `https://api.conecto.chat/mcp/tables` with these arguments:

```json
{
  "file_id": "9b1d3f5a-7c9e-4b2d-8f4a-6c8e0b2d4f7a",
  "new_table": "Parts prices"
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/tables_import \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_id": "9b1d3f5a-7c9e-4b2d-8f4a-6c8e0b2d4f7a", "new_table": "Parts prices"}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "tables_import",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.003",
  "balance_usd": "$19.75",
  "result": {
    "table": "Parts prices",
    "added": 3,
    "skipped_columns": []
  }
}
```

`result`: table: its name; added: how many rows; skipped_columns: CSV headers with no column to go in.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `invalid_input` | 400 | A value does not fit its column, or a required column is empty; the message names the row and the column. | Send values of the column's type: numbers, dates like 2026-10-22, one of a select's options. |
| `invalid_input` | 400 | A column has no name or a name in use, an unknown type, a select without options, or a currency that is not a 3-letter code. | Give each column its own name, a type from the list, and options for select columns. |
| `invalid_input` | 400 | Both or neither of table and new_table were given, or the CSV has no header row. | Give one of them, and a CSV whose first line names the columns. |
| `not_found` | 404 | No file has that file_id, or no table has that name. | Find the file with files_list and the table with tables_list. |
| `too_many_rows` | 413 | The CSV has more rows than one call imports. | Split the file and import each part. |
| `name_taken` | 409 | A table has the new_table name already. | Pick another name, or import into it with table. |
| `limit_reached` | 409 | The table would hold more than 100,000 rows. | Delete rows, or start another table. |

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [tables_create](https://conecto.chat/tools/tables/tables_create.md): Creates a table with typed columns: text, numbers with decimals or a currency, checkboxes, dates, choices, emails, links, phone numbers or files. $0.001 a call.
- [tables_list](https://conecto.chat/tools/tables/tables_list.md): Every table with its columns and how many rows it has. Free up to 1,000,000 reads a month.
- [tables_change_columns](https://conecto.chat/tools/tables/tables_change_columns.md): Adds, renames or removes columns; rows keep their values through a rename. $0.001 a call.
- [rows_add](https://conecto.chat/tools/tables/rows_add.md): Adds up to 500 rows, each checked against its columns; if one is wrong, none is added. $0.001 per row added.
- [rows_update](https://conecto.chat/tools/tables/rows_update.md): Changes values in up to 500 rows by row number; only the columns given change, and null clears a cell. $0.001 per row changed.
- [rows_upsert](https://conecto.chat/tools/tables/rows_upsert.md): Updates the rows whose key column matches and adds the rest, so a list from anywhere syncs without reading the table first. $0.001 per row added or updated.
- [rows_query](https://conecto.chat/tools/tables/rows_query.md): Rows matching filters, all or any of them, sorted by up to 3 columns, a page at a time. Free up to 1,000,000 reads a month.
- [rows_summarize](https://conecto.chat/tools/tables/rows_summarize.md): Counts rows, and sums, averages, minimums and maximums of number columns, overall and per group, in one call. Free up to 1,000,000 reads a month.
- [rows_delete](https://conecto.chat/tools/tables/rows_delete.md): Deletes rows by their numbers, for good. Free.
- [tables_export](https://conecto.chat/tools/tables/tables_export.md): A CSV of a table, or of the rows matching filters, saved in the file store with a download link. $0.001 a call.
- [tables_delete](https://conecto.chat/tools/tables/tables_delete.md): Deletes a table and all its rows, for good. Free.
