Replace Template Text
replace_template_text[write] Change a few exact pieces of text inside ONE slot of a template, leaving the rest of it untouched: for example a static sentence in seliee_template_index, a phone number in the footer, a class name.
Use it instead of edit_template_key when only part of a slot changes (that one has to send the whole slot again). seliee_template_key is the slot, with or without the seliee_template_ prefix.
replacements is a list (at most 20) of {find, replace, all?, regex?}, applied in order and all or nothing. find must match EXACTLY ONCE (copy enough surrounding text from get_template_key to make it unique)
unless all is true, which replaces every match; with regex true find is a regular expression (DOTALL) and replace may use \1. Nothing matching, or an ambiguous match, changes nothing and says which replacement failed.
The result is checked as Jinja: a change that would break the template's syntax is refused. dry_run shows the before/after of each change without saving. The old template is kept in the history.
The template is given by template_id or template_uuid; seliee_template_key and replacements are required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| template_id | No | ||
| replacements | No | ||
| template_uuid | No | ||
| seliee_template_key | No |