# Batch Transform

> Built-in agent tool that processes a CSV file row by row and adds AI-generated columns based on a task you define.

## What it does

Batch Transform is a built-in tool that processes a CSV file row by row and adds AI-generated columns to it. You give it a source CSV, a task that describes what to do for each row, and the columns you want to add. It returns a new file with those columns populated.

You attach Batch Transform to an [Autonomous Agent](node-agent.md) as a tool. The agent calls the tool while reasoning, passing it the source file and the task, and uses the transformed file in the rest of its work.

The node is labeled **Batch Transform** in the palette, in the built-in tools category.

## When to use this

Use Batch Transform when an agent needs to enrich or classify the rows of a CSV in bulk, and each row needs the same AI-driven treatment.

Typical tasks:

- Classify each row into a category and write the label to a new column.
- Extract a value from a free-text field into its own column.
- Score, summarize, or tag each row based on its existing columns.

For pulling structured data out of a single document rather than transforming tabular rows, connect a [Document extraction](node-extract.md) resource instead. To analyze the content of files that are not row-oriented CSVs, use the **Analyze Files** built-in tool.

## Adding the tool

Add the tool to the canvas, then connect it to an agent.

1. Select an [Autonomous Agent](node-agent.md) node, or add one if your flow doesn't have it yet.
2. Open the node palette and select the **Built-in tools** category.
3. Select **Batch Transform**. Flow adds the node to the canvas.
4. Draw an edge from the Batch Transform node to the agent's tool handle.
5. Select the **Batch Transform** node to open its properties panel and configure it.

**Result:** The Batch Transform tool is connected to the agent. The agent can now call it while reasoning.

![Batch Transform node connected to an Autonomous Agent's tool handle, with the properties panel open showing the Source, Batch Transform Task, Output columns, and Web search grounding fields.](https://dev-assets.cms.uipath.com/assets/images/maestro/flow-batch-transform-b559a71b.webp)

## Configuration reference

Configure these fields in the **Batch Transform Settings** section of the properties panel.

| Field | Required | Default | Description |
|---|---|---|---|
| **Source (file)** | Yes | None | CSV file to transform. Reference a file produced upstream in the flow, or one the agent supplies when it calls the tool. |
| **Batch Transform Task** | Yes | None | Instructions the tool applies to each row. Describe what to analyze, what to extract, and how to populate the output columns. |
| **Output columns** | Yes | None | Columns the tool adds to the file. Define at least one column with a name and description, and add up to 10 columns. |
| **Column name** | Yes | None | Header for the new column in the output file. |
| **Description** | Yes | None | Content the column should contain. The tool uses this value to decide what to write for each row, so be specific about the expected format. |
| **Web search grounding** | No | **Enabled** | Whether the tool can use web search to ground or enrich its results. Select **Disabled** to use only the source file and task. |

## Inputs and outputs

### Input

Batch Transform takes its input from the fields you configure: the source CSV, the task, the output columns, and the web search grounding setting. Because it runs as a tool, the calling agent supplies these values when it invokes the tool during a run.

### Output

Batch Transform returns a file: the source CSV with the output columns appended and populated. Access it at `$vars.<nodeName>.output`, where `<nodeName>` is the name of the Batch Transform node.

```javascript
$vars.batchTransform1.output
```

If the tool fails, the node populates an `error` object instead. Refer to [Error handling](flow-error-handling.md) for the error shape and how to route on it.

```json
{
  "output": "file. The source CSV with the configured output columns added and populated.",
  "error": "object. Populated only on failure. See Error handling."
}
```

## Example

### Triage a CSV of support tickets

An agent receives a CSV of support tickets and needs each ticket categorized and prioritized before it routes them.

Connect a Batch Transform tool to the agent and configure it as follows.

**Source (file):** the tickets CSV, for example a file passed in from the start of the flow.

**Batch Transform Task:**

```
For each ticket, read the Subject and Body columns. Classify the ticket into exactly one category: billing, technical, or account. Then assign a priority of high, medium, or low based on the urgency expressed in the text.
```

**Output columns:**

- `Category`: one of billing, technical, or account, based on the ticket's subject and body.
- `Priority`: one of high, medium, or low, reflecting the urgency of the ticket.

When the agent calls the tool, Batch Transform returns the original CSV with a `Category` and a `Priority` column added for every row. The agent then uses that enriched file, available at `$vars.batchTransform1.output`, in the rest of its task.

## Related pages

- [Agent](node-agent.md)
- [Document extraction](node-extract.md)
- [Error handling](flow-error-handling.md)
