Roboteka
Roboteka · Robots · Replace substring

Replace substring

The "Replace substring" robot changes every occurrence of the search text to a new value in Bitrix24 (Alaio) business processes and robots. It works without regular expressions: a plain text replacement, case-sensitive by default. It returns the result and the number of replacements made.

The robot performs a simple text replacement — no regular expression knowledge or special-character escaping is needed, unlike with the regex robots. The input is the source string, the substring to find, the replacement value (empty just deletes the match), and the Case-sensitive flag: Y by default, with N the search ignores letter case. All occurrences are replaced at once. Typical use cases: put the current company name into a template text; swap commas for dots before storing a number; strip a service label from a request subject. It returns the resulting string and the number of replacements made — with zero replacements the string comes back unchanged, which is handy to check in the condition of the next step of the business process.

What input parameters does the robot accept?

Parameter Type Required? Default
Source string text yes
What to find string yes
Replacement (empty — delete) string
Case-sensitive (Y/N, default Y) string

What does the robot return?

Parameter Type
Result text
Replacements made int

Scenario: cleaning a request subject

  1. A deal receives an email subject with a [SPAM?] label
  2. The robot replaces the substring [SPAM?] with an empty value
  3. The cleaned subject is written to a deal field and the replacement count drives a condition

Related robots