# Recipe: automate with RPA

> Build and run an RPA workflow that processes a CSV file from start to finish.

This recipe walks through building a Robotic Process Automation (RPA) workflow with a coding agent: it reads a CSV file, transforms each row, and writes a result file. It shows the full loop from your prompt to a workflow you can run, and what to look for along the way.

## Prerequisites

- A coding agent set up for UiPath work, with an authenticated session (see [Install and set up](install-and-set-up.md)).
- A working folder containing a sample `input.csv`.

## Build the workflow

1. Open your coding agent in the folder that holds your sample file.
2. Describe the task:

   "Build an RPA workflow that reads each row of `input.csv`, calculates a total for each row, and writes the totals to `output.csv`."

3. Review what the agent produces, including how it reads the file and how it handles empty or malformed rows.
4. Check for the common gaps before you accept it: placeholder steps standing in for real logic, the wrong activity for a step, or hard-coded values that should be inputs (see [Reviewing and validating output](reviewing-agent-output.md)).
5. Ask the agent to run the workflow.
6. Open `output.csv` and confirm the totals are correct.
7. Refine in conversation, for example by adding error handling or a new calculated column.

**Result:** a runnable RPA workflow that turns `input.csv` into a correct `output.csv`, reviewed for stubs and correct logic.

:::note
Exact activities, file structure, and run commands vary by agent and prompt. Confirm success from the output file and your own review, not from the agent's "done" message.
:::
