Clean up a messy spreadsheet

Consistent names, dates, phone numbers and amounts in a new tab, with a count of each type of change.

  • You start it: When you start it

What it does

The task

Open the sheet sheet url and the tab tab name. Copy the data to a new tab named Clean, and do not change the original tab. Remove extra spaces, fix the capital letters in names, convert dates to YYYY-MM-DD, phone numbers to phone format, and amounts to numbers with no currency signs. Split full names into first and last name, and addresses into street, city and postcode. Add a tab named Changes with each type of change and its count. Mark each cell that you could not fix.

  • It works in Google Sheets, in the workspace you pick, and signs in with passwords from your Cuiar vault.
  • It runs once, when you start it.

What you give it

BlankWhat to giveExample
sheet urlThe Google Sheet to cleanhttps://docs.google.com/spreadsheets/d/1Cl2rHn6Bz/edit
tab nameThe tab with the dataCustomers export
phone formatThe phone format you want+44 20 7946 0000 (country code and spaces)

What you get back

An example run with the example values above. Your run uses your own data.

Clean tab: 2,316 rows, 14 columns. The original tab did not change.

Changes:

  • Extra spaces removed: 1,904 cells
  • Dates converted to YYYY-MM-DD: 2,201 (from 4 different formats)
  • Phone numbers changed to the +44 format: 1,877
  • Amounts with GBP or commas converted to numbers: 640
  • Names split: 2,316

Could not fix: 37 cells, marked in red (for example, the date 31/02/2025)

Run it in Cuiar

  1. 01

    Open it

    Click Use in Cuiar on this page. The side panel opens with the task in the composer.

  2. 02

    Fill in 3 blanks

    Type sheet url, tab name and phone format. Tab moves to the next blank.

  3. 03

    Run it

    Run sends it to the agent. Follow each step in the panel, and stop it at any time.

From the terminal

cuiar exec "Open the sheet https://docs.google.com/spreadsheets/d/1Cl2rHn6Bz/edit and the tab Customers export. Copy the data to a new tab named Clean, and do not change the original tab. Remove extra spaces, fix the capital letters in names, convert dates to YYYY-MM-DD, phone numbers to +44 20 7946 0000 (country code and spaces), and amounts to numbers with no currency signs. Split full names into first and last name, and addresses into street, city and postcode. Add a tab named Changes with each type of change and its count. Mark each cell that you could not fix."

Run it from your AI agent

Claude Code, Codex, Cursor and other MCP clients reach Cuiar at https://mcp.cuiar.com/mcp. Add the server one time, then ask for the task in plain words, or call run_task yourself.

1. Add Cuiar to Claude Code

claude mcp add --transport http cuiar https://mcp.cuiar.com/mcp

2. Ask your agent

Use the Cuiar tool run_task to run my "Clean up a messy spreadsheet" template with sheet url = https://docs.google.com/spreadsheets/d/1Cl2rHn6Bz/edit; tab name = Customers export; phone format = +44 20 7946 0000 (country code and spaces).

Setup for other agents: AI agents.

The tool call

{
  "name": "run_task",
  "arguments": {
    "task": "Open the sheet https://docs.google.com/spreadsheets/d/1Cl2rHn6Bz/edit and the tab Customers export. Copy the data to a new tab named Clean, and do not change the original tab. Remove extra spaces, fix the capital letters in names, convert dates to YYYY-MM-DD, phone numbers to +44 20 7946 0000 (country code and spaces), and amounts to numbers with no currency signs. Split full names into first and last name, and addresses into street, city and postcode. Add a tab named Changes with each type of change and its count. Mark each cell that you could not fix."
  }
}
All data templates