quiet robot

Recipe: Clean up a messy spreadsheet

Fixes spacing, capitals, dates and phone numbers, removes duplicates, and sets aside the rows a person should look at. What it does, when to use it, how to make it yours, and what a run costs.

View as Markdown

Tidies a messy contact list: trims spaces, fixes capitals, puts every date and phone number in one format, removes empty rows and duplicates, and lists every change. Rows it can't fix for sure, like an email without an @, are set aside for a person instead of guessed. No AI and no key needed.

At a glanceNotes
LevelEveryday
CategoryData
ShapeA cleanup, a check, and a person for what's unclear
PlanFree and up
Needs a Claude keyNo
Limits it comes with1 loop, 900 seconds, $0.05
Clean up a messy spreadsheet, as it is on the canvas.Open the spreadsheet (Run command), Clean it up (Run command), Is it clean? (Decide), Anything unclear? (Decide), Look at the unclear rows (Approval), Save the clean sheet (Run command), Fix them first (Output). Arrows: Open the spreadsheet to Clean it up; Clean it up to Is it clean?; Is it clean? to Anything unclear? on Yes; Anything unclear? to Look at the unclear rows on Yes; Anything unclear? to Save the clean sheet on No; Look at the unclear rows to Save the clean sheet on Approved; Look at the unclear rows to Fix them first on Denied.YesYesNoApprovedDenied>_ RUN COMMANDOpen the spreadsheet>_ RUN COMMANDClean it upno internet◆ DECIDEIs it clean?◆ DECIDEAnything unclear?✋ APPROVALLook at the unclear rows>_ RUN COMMANDSave the clean sheet⚑ OUTPUTFix them first
Clean up a messy spreadsheet, as it is on the canvas.
Try it nowSimulateRun

Opens it in the Playground as a flow of your own. Simulate shows what a run costs. Run asks before it starts.

The steps

StepBlockWhat it does
Open the spreadsheetRun commandSaves a sample contact list with the usual mess: extra spaces, ALL CAPS, three date formats, four phone formats, an empty row and two duplicates.
Clean it upRun commandCleans every row, writes contacts-clean.csv, lists each change in changes.md, and puts rows it can't fix in needs-a-person.csv. The network is off for this step.
Is it clean?DecideChecks every date and phone number has one format and no one is listed twice.
Anything unclear?DecideYes when some rows were set aside for a person.
Look at the unclear rowsApprovalA person looks at the unclear rows, then approves saving the clean sheet without them, or denies to fix them first.
Save the clean sheetRun commandSays where the clean sheet and the list of changes are.

When to use it

  • A sign-up list, an export from an old system, or a sheet several people typed into.
  • You need the sheet clean before importing it into email, a CRM or accounting software.
  • You want a list of every change, so nothing changes without a trace.

Run it

The quick way: choose Try it now under the drawing. It opens the recipe in the Playground as a flow of your own, after you sign in if you aren't yet. Simulate opens it and shows the forecast, and Run opens it and asks before it starts, with what the run will likely cost. From the dashboard instead:

  1. In the dashboard sidebar, open Agent Playground → Recipes and find Clean up a messy spreadsheet. Choose Everyday to filter the list. In the builder, Recipes in the toolbar lists them too.
  2. Choose Use this recipe. It becomes a flow of your own, so changing it never changes the recipe.
  3. Choose Simulate to see the forecast, then Run.
  4. When the run waits for a person, approve or deny it from the banner, from Approvals, or from the approval email.

What you'll see: The run stops at Look at the unclear rows: two rows need a person (an email written as words, and a phone number without its area code). Approve from the banner or Approvals, then open Save the clean sheet. Six clean rows are left out of eleven.

Make it yours

  1. Replace sheet/contacts.csv in Open the spreadsheet with your own sheet (export it as CSV), or download it in that step.
  2. If your columns have other names, change them at the top of clean.py.
  3. Change the date or phone format in clean.py to the one your country uses.

What a run costs

These are the builder's own forecast for the recipe as it comes, with its limits, rounded. Simulate shows the same numbers for your version, and they change as you change the flow.

NotesTypical1 in 10 runsAt most
Sandbox time$0.001$0.002$0.01
How long it takesabout 2 minutesabout 3 minutes900 seconds

A typical run uses $0.0013 of sandbox time, so about 800 runs cost $1, and every plan includes $5 of usage a month. The time includes a person taking a minute or two to answer the approval. The clock, and the sandbox, keep running while the run waits. At most is the most a run could cost with these limits: it stops at $0.05 or 900 seconds, whichever comes first.

  • Agent PlaygroundQuickstart: build and run your first flow
  • Agent PlaygroundBlocks
  • Agent PlaygroundRecipes
  • SandboxesQuickstart: your first sandbox
  • SandboxesMCP server
  • SandboxesAPI reference
  • InsightsAll posts