All workflows
Google Sheets logoAnthropic logo

Research data cleaning with a decision log

Cleans a research dataset by fixed rules and writes down every change, exclusion and unresolved value as it makes it.

Every day2 apps8 steps

Apps it connects

Authenticate each one once and the workflow is ready to run.

What it does

Each integration step this workflow runs, in order, what it is for, and the conditions and loops that decide when it runs.

  1. 1Google SheetsRead rowsReads every row and heading of your 'Raw' tab, which is the only tab read and is never written to.
  2. For each tabName

    1. 2Google SheetsCreate tabCreates the 'Clean', 'Cleaning log', 'Needs review' and 'Runs' tabs when they do not exist yet, reusing them otherwise.
  3. 3Google SheetsCreate tab
  4. 4Google SheetsAppend rowWrites the rows of the three rebuilt tabs, appends each run's summary line to 'Runs', and marks a failed tab incomplete.
  5. For each output

    1. 5Google SheetsClear tabEmpties the 'Clean', 'Cleaning log' and 'Needs review' tabs before each rebuild so no stale rows survive from an earlier run.
    2. 6Google SheetsAppend row
    3. For each outputRow

      1. 7Google SheetsAppend row
  6. If writeMethodsNote

    1. 8AnthropicGenerate model responseAsks the AI to write the methods paragraph for the 'Runs' tab from the run's counts alone, never seeing participant data.

How it works

What happens on each run, in plain English.

Once a day, the raw tab of your research spreadsheet is cleaned by fixed rules into an analysis-ready dataset, with a written record of how it got that way. Values are trimmed and normalised, blanks collapse to one token, numbers, dates and identifiers are parsed, and free text is mapped to your controlled vocabulary. Rows are excluded for duplicates, withheld consent, failed attention checks, speeding, straightlining, missing required values or timestamps outside your collection window, each logged with its reason.

You end up with a 'Clean' tab, a 'Cleaning log' with one line per decision, a 'Needs review' tab, and a 'Runs' tab holding your participant-flow history with a methods paragraph written by AI from the counts alone. Your raw tab is never written to. A rule that cannot decide does not decide: an ambiguous date or an unknown answer is left as it arrived and sent for a person to resolve. If a write fails partway, the run stops and marks that tab incomplete.

researchdata cleaningreproducibilityaudit trailsurveygoogle sheetsprovenance

Start from a workflow that already works.

Add "Research data cleaning with a decision log" to your workspace, connect its apps, and make it yours.

Free plan, no credit card