Import a CSV
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.
{
"file_id": "9b1d3f5a-7c9e-4b2d-8f4a-6c8e0b2d4f7a",
"new_table": "Parts prices"
}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.
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
| Name | Type | What it is |
|---|---|---|
file_idRequired | string | Exactly 36 characters. |
table | string | The table's name (or its table_id). 1 to 80 characters. |
new_table | string | 1 to 80 characters. |
The call
Over MCP, call tables_import on https://api.conecto.chat/mcp/tables. Over REST:
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.
| Code | When | What to do |
|---|---|---|
invalid_input400 | 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_input400 | 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_input400 | 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_found404 | 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_rows413 | The CSV has more rows than one call imports. | Split the file and import each part. |
name_taken409 | A table has the new_table name already. | Pick another name, or import into it with table. |
limit_reached409 | The table would hold more than 100,000 rows. | Delete rows, or start another table. |
More Tables tools
All 12 tools- Create a table
tables_createCreates 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 - List tables
tables_listEvery table with its columns and how many rows it has.Free* - Change columns
tables_change_columnsAdds, renames or removes columns; rows keep their values through a rename.$0.001 a call - Add rows
rows_addAdds up to 500 rows, each checked against its columns; if one is wrong, none is added.$0.001 per row added - Change rows
rows_updateChanges values in up to 500 rows by row number; only the columns given change, and null clears a cell.$0.001 per row changed - Add or update rows by a key
rows_upsertUpdates 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 - Find rows
rows_queryRows matching filters, all or any of them, sorted by up to 3 columns, a page at a time.Free* - Summarize rows
rows_summarizeCounts rows, and sums, averages, minimums and maximums of number columns, overall and per group, in one call.Free*
Give this to your agent.
Set up Conecto from https://conecto.chat/SKILL.md