🔄
Replace Text
base.text.replaceBase SetUtilityReplaces every occurrence of a find string with another value. Handy for sanitizing input, swapping placeholders, or cleaning up user text.
On the canvas
This is what Replace Text looks like when you place it on your flow. Each field below is something you configure in the inspector panel.
🔄Utility
Replace Text
base.text.replacetextrequired
{{message.content}}
findrequired
badword
replace
***
asrequired
cleaned
Config fields
| Field | Type | Req | What it does |
|---|---|---|---|
text{{message.content}} | text | yes | Source text 📝 |
findbadword | text | yes | Find |
replace*** | text | — | Replace with |
ascleaned | text | yes | Save as ✨ |
Sparks this piece adds
After this piece runs, these values are available as sparks in every node downstream.
{{replaced}}stringText after replaceOutput ports
outputUpdated text spark is ready
📐
In TypeScript, this would be…
Not something you need to write — just a look at what Kitcord does for you.
TypeScript
const cleaned = text.replaceAll("badword", "***");
// {{cleaned}}More Utility pieces