Improved — exporting to Braze overwrites by name instead of piling up duplicates
Re-exporting a Stripo email to Braze used to create a second copy unless you hand-fed it the template map from the previous run. Now it overwrites by default: before creating, orbit_export_stripo_email_to_braze lists your existing Braze templates and updates any whose name matches the email being exported, so running the same program twice leaves one clean template per email rather than a pile of duplicates.
What shipped
•Overwrite by name is the default — the exporter lists existing Braze email templates once per batch and UPDATES any whose name matches the Stripo email's name, instead of always creating. Re-export the same forty-email program as many times as you like and you get forty templates, not eighty. Each row reports operation (create or update) and matched_by (id, name, or none) so you can see exactly what happened.
•Precedence is explicit — a braze_template_map you pass still wins per email id (the most precise control), then a name match, then create-new. Two switches cover the edges: force_create makes fresh templates on purpose even when a same-named one exists, and dedupe_by_name:false skips the existence check entirely.
•Safe by construction — if two Braze templates already share a name the export updates the first and flags the duplicate so you can tidy it, rather than guessing silently; and if the one-time listing call fails the export degrades to create rather than sinking the batch.