# How to classify spreadsheet rows with AI (and enrich a CSV without your own GPT key)

A spreadsheet of companies, leads, or reviews is only half-useful until a few extra columns exist: industry, city, a yes/no B2B flag, sentiment, a 1–10 fit score, a one-line summary, a translation. Doing that by hand does not scale. Writing your own OpenAI script means an API key, retries, and a schema that does not fall apart mid-file.

[AI Table Enricher](https://apify.com/datatools-ai/ai-table-enricher) is a small Actor on the Apify Store that does that job. You give it the rows you already have (JSON, a public CSV or Google Sheet, or another Apify dataset), describe each new column in plain English, and get the same table back with those columns filled in. You do not need your own OpenAI key.

I built this Actor for DataTools AI. The walkthrough below uses the real prefilled example: 12 companies and five new columns. In our test that run finished in about seven seconds and cost **$0.037**.

## Who this is for

- Ops and data people who need to classify or tag a spreadsheet (industry, topic, sentiment, language).
- Sales and RevOps teams who want a city, a country code, a B2B flag, or a short firmographic line on a lead list.
- Anyone who already has a dataset on Apify and needs a few structured AI columns before the next step.

It is not a web scraper. If you need to fetch new pages, use a different tool and then pass that dataset in.

## 1. Open the Actor and run the prefilled example

Open [AI Table Enricher](https://apify.com/datatools-ai/ai-table-enricher) and click **Try for free**. The input is already filled with 12 companies and these columns:

- `industry` (enum — a fixed list of categories)
- `city` (text, extracted from the address)
- `country_code` (text, ISO 3166-1 alpha-2)
- `is_b2b` (boolean)
- `one_liner_es` (text — a one-line Spanish summary)

Press **Start**. When the run finishes, open the **Output** tab and export CSV, Excel, or JSON.

## 2. Point it at your own table

Replace the example with exactly one source:

- a JSON array of objects (`rows`),
- `csvUrl` — a public CSV, or a Google Sheet via **File → Share → Publish to web → CSV**,
- `datasetId` — the dataset of another Apify Actor (a Maps scrape, a store crawl, a lead list).

Then describe the columns you want. Each column needs a name, a plain-English instruction, and a type (`text`, `enum`, `number`, or `boolean`). Enum columns take an `options` list.

```json
[
  {
    "name": "industry",
    "instruction": "Classify the company's industry.",
    "type": "enum",
    "options": [
      "Software & Internet",
      "Fintech",
      "Retail & E-commerce",
      "Food & Beverage",
      "Healthcare",
      "Manufacturing & Industrial",
      "Construction & Materials",
      "Automotive",
      "Travel & Hospitality",
      "Education",
      "Professional Services",
      "Other"
    ]
  },
  {
    "name": "city",
    "instruction": "Extract the city from the address.",
    "type": "text"
  },
  {
    "name": "is_b2b",
    "instruction": "Does the company mainly sell to other businesses?",
    "type": "boolean"
  }
]
```

Optional but useful:

- `inputFields` — send only those keys to the model (keep the rest of the row out of the prompt).
- `extraContext` — a short rule such as “If the review is empty, return null.”
- `maxRows` — cap a first test so you do not enrich a whole file by accident.

A compact run against a Sheet of reviews looks like this:

```json
{
  "csvUrl": "https://docs.google.com/spreadsheets/d/e/YOUR_ID/pub?output=csv",
  "columns": [
    {
      "name": "sentiment",
      "instruction": "Sentiment of the review text",
      "type": "enum",
      "options": ["positive", "neutral", "negative"]
    },
    {
      "name": "topic",
      "instruction": "Main topic of the review in 1-3 words",
      "type": "text"
    }
  ],
  "inputFields": ["review_text"],
  "extraContext": "If the review is empty, return null."
}
```

## 3. What you get back

Every input row is returned with the new columns merged in. Types are validated: enums stay in the list you provided, numbers are numbers, booleans are booleans. If the model cannot decide, the value is `null` instead of a guess. Failed rows are not charged.

Here are two rows from a real run of the prefilled example (input on the left-hand fields, AI columns added):

```json
[
  {
    "company": "Rappi",
    "website": "rappi.com",
    "description": "Latin American on-demand delivery app for food, groceries and pharmacy.",
    "address": "Calle 93 #19-58, Bogotá, Colombia",
    "industry": "Food & Beverage",
    "city": "Bogotá",
    "country_code": "CO",
    "is_b2b": null,
    "one_liner_es": "Aplicación de entrega a demanda para comida y productos."
  },
  {
    "company": "Deloitte",
    "website": "deloitte.com",
    "description": "Professional services network providing audit, consulting, tax and advisory services.",
    "address": "1 New Street Square, London EC4A 3HQ, United Kingdom",
    "industry": "Professional Services",
    "city": "London",
    "country_code": "GB",
    "is_b2b": true,
    "one_liner_es": "Red de servicios profesionales en auditoría y consultoría."
  }
]
```

Rappi’s `is_b2b` came back `null`. That is expected: a consumer delivery app with a business line is not a clean yes or no, and the Actor leaves it empty rather than forcing a label. Spot-check important fields before you treat them as a system of record.

From the Output tab you can download the file or push it to Google Sheets, Make, Zapier, or n8n with Apify’s integrations. A `RUN_SUMMARY` record in the key-value store shows rows processed, failures, and token usage.

## Cost (pay-per-event)

- **$0.003** per enriched row
- **$0.001** Actor start fee, once per run
- **100 rows = $0.30** in row charges, plus the $0.001 start fee (**$0.301** total)
- 1,000 rows = $3.00 + $0.001 = **$3.001**
- The prefilled 12-row example: 12 × $0.003 + $0.001 = **$0.037**
- Rows the Actor fails to enrich are free

You are not billed a separate OpenAI invoice. Model cost is included in the event price. Set a maximum cost per run in the Apify run options if you want a hard cap.

## Honest limits

- The model can still be wrong. Treat industry labels, scores, and employee estimates as assistance, not as ground truth.
- Only send the fields you need (`inputFields`). This Actor is meant for company, product, or similar tables you already have — not for personal data.
- A CSV or Sheet must be publicly reachable at the URL you pass.
- Very long text fields are truncated to 3,000 characters per field before being sent to the model.
- Row data (only the fields you select) is sent to the OpenAI API. According to OpenAI’s policy, API data is not used to train their models by default and is retained for up to 30 days for abuse monitoring. Do not send data you are not allowed to share with a third-party processor. The Actor does not store your data outside your own Apify storage.

## A simple workflow

1. Publish a Sheet as CSV, or export a CRM list.
2. Run the Actor with `maxRows` on 10–20 rows and check the new columns.
3. If the labels look right, run the full file and export the result back to Sheets or your next tool.

The prefilled example is the fastest way to see the shape of the output: [AI Table Enricher on Apify Store](https://apify.com/datatools-ai/ai-table-enricher).

Related tools from the same brand: [Career Site Jobs + AI Hiring Signals](https://apify.com/datatools-ai/career-site-jobs-hiring-signals) if you want official ATS job boards and a hiring-signals summary, and the rest of the [DataTools AI Store page](https://apify.com/datatools-ai).

---

*Written with AI assistance by the DataTools AI brand account and checked against the Actor’s public documentation (input schema, pricing, and a real sample from the default 12-row example). Not a paid placement.*

