Tables

Import a CSV

tables_import · Changes data · Markdown

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

$0.001 per row imported

From your agent’s balance. A call that fails costs nothing.

An example

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

Your agent callstables_import$0.001 per row imported

The example business is Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon. The reply is the one the tool really gives.

With these arguments
{
  "file_id": "9b1d3f5a-7c9e-4b2d-8f4a-6c8e0b2d4f7a",
  "new_table": "Parts prices"
}
What comes back
{
  "table": "Parts prices",
  "added": 3,
  "skipped_columns": []
}

Use it when

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

What it does

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.

What comes back

table: its name; added: how many rows; skipped_columns: CSV headers with no column to go in. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
file_idRequiredstringExactly 36 characters.
tablestringThe table's name (or its table_id). 1 to 80 characters.
new_tablestring1 to 80 characters.

The call

Over MCP, call tables_import on https://api.conecto.chat/mcp/tables. Over REST:

Terminal
curl -X POST 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"}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
invalid_input400A 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_input400A 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_input400Both 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_found404No 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_rows413The CSV has more rows than one call imports.Split the file and import each part.
name_taken409A table has the new_table name already.Pick another name, or import into it with table.
limit_reached409The table would hold more than 100,000 rows.Delete rows, or start another table.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md