The upsert pattern: search, router, filters
Search for the email first. If a row comes back, update it; if nothing comes back, add one. Two filters make the router choose.
PROCEDURE: add a Router after the trigger with two paths (Add a Row, Update a Row). Insert Google Sheets > Search Rows before the router with filter email = mapped email. In Update a Row, replace the hard-coded row number with the search output's row number. Filters: Add path - 'row number does not exist'; Update path - 'row number exists'. Routes evaluate top to bottom; without filters both run. Test: a new email routes to Add. Functions (math, text, date, arrays, if/else) handle rules like budget thresholds. History shows each run's status, operations, duration and a per-step advanced log for debugging.
The first pattern that makes an automation safe to leave running.

