searchAndReplaceString Step
Description:
The Search Replace String workflow step searches the supplied string for configured search-and-replace mappings and stores the resulting string in the specified Variable or Global variable.
The step supports:
- Searching text within a string.
- Defining mappings of search and replacement strings.
- Processing multiline text.
- Storing the resulting text in a Variable or Global variable.
- Reusing the processed value in subsequent workflow steps.
- Text transformation within workflow automation.
- Returning a True or False result for subsequent workflow processing.
Inputs
- Input string to be search and replace – The Input string to be search and replace property specifies the text that should be processed.
- Mapping of search and replace strings – The Mapping of search and replace strings property specifies the search-and-replacement mappings to apply to the input string.
- Variable/Global to store the search and replace string – The Variable/Global to store the search and replace string property specifies the Variable or Global variable in which the processed string should be stored.
Returns
- True – The True return path can be connected to the next workflow activity after the search-and-replace operation succeeds.
- False – The False return path can be used for error handling or an alternative workflow path if the operation fails.
Usage:
The Search Replace String step is typically placed after text has been collected, generated, or retrieved within a workflow.
The input string can contain workflow-generated content, template text, form values, or other text available to the process. The configured search-and-replace mappings are then applied, and the resulting string is stored in the specified Variable or Global variable.
A typical workflow pattern is:
Get/Build Text → Search Replace String → Use Result
The resulting value can then be used by later workflow steps to:
- Populate Variables.
- Build email content.
- Generate notifications.
- Prepare messages.
- Transform template text.
- Create workflow output.
- Pass processed text to another activity.
- Perform additional text processing.

Typical Workflow Suggestions:
Replace Template Placeholders
Use the step to replace placeholders in workflow-generated text.
Example:
Build Template → Search Replace String → Send Email
Input:
Dear {{CustomerName}},
Your request {{RequestID}} has been approved.{{CustomerName}} → Acme Corporation
{{RequestID}} → REQ-1045Prepare an Email Message
Use Search Replace String to transform a reusable message template into personalized email content.
Example:
Get Customer Data → Search Replace String → Send Email
Template:
Hello {{Name}},
Your order {{OrderNumber}} is now {{Status}}.Generate Notifications
Use the step to prepare notification text from a standard template.
Example:
Process Request → Search Replace String → Send Notification
Input:
Request {{RequestID}} for {{CustomerName}} requires attention.Transform Form Values
Use values collected from a form as the source for replacements.
Example:
Form Submission → Search Replace String → Process Request
A template can contain placeholders for form fields, allowing the workflow to generate standardized text from submitted information.
Prepare Text for Another Workflow Step
Search-and-Replace String can serve as an intermediate step in text processing.
Example:
Retrieve Data → Search and Replace String → AI Processing
The step can normalize or customize the text before passing it to a subsequent processing activity.
Create Standardized Messages
Use a common text template and dynamically replace selected values.
Example:
Ticket {{TicketNumber}} has been assigned to {{AssignedUser}}.
Priority: {{Priority}}Replace Multiple Values
A single operation can use a mapping containing multiple search-and-replace pairs.
For example:
{{Customer}} → Acme Corporation
{{Region}} → North
{{Priority}} → High
{{Status}} → ApprovedProcess Multiline Text
Because the input property uses the multilineTextBox data type, the step can be used with multiline text.
For example:
Order Information
-----------------
Order: {{OrderNumber}}
Customer: {{CustomerName}}
Status: {{Status}}
Total: {{Total}}Create Workflow Reports
Use the step to populate a text-based report template.
Example:
Collect Results → Search Replace String → Save/Send Report
Template:
Daily Processing Report
Processed: {{ProcessedCount}}
Successful: {{SuccessCount}}
Failed: {{FailureCount}}Prepare Integration Payload Text
Use the step to construct text required by a downstream integration when the integration expects a string value.
Example:
Retrieve Data → Search Replace String → External Integration
The processed result can be stored in a Variable and supplied to the integration step.
Build Dynamic Workflow Messages
Use workflow Variables and replacement mappings to create context-specific messages.
Example:
Workflow {{WorkflowName}}
Instance {{InstanceID}}
Status {{Status}}
Owner {{Owner}}Normalize Text Before Processing
Use Search Replace String as a preparation step before subsequent text processing.
Example:
Get Source Text → Search Replace String → Text Processing
Specific known strings can be replaced before the text is passed to the next workflow activity.
Store the Processed Result for Reuse
The result is explicitly configured to be stored in a Variable or Global variable.
This makes the processed value available to later workflow activities.
A typical pattern is:
Search Replace String → Store Result → Multiple Subsequent Steps
Example:
Let’s build and execute the “searchAndReplaceStringDef” example.
- Create a new definition called “searchAndReplaceStringDef” and open the definition in designer mode.
- Drag a “searchAndReplaceString” step to the canvas.
- Connect the dots between the “Start” and “searchAndReplaceString” steps, as shown above.
- Select the line between the steps to configure the “Connection Properties”. The default property values are “None, True, False, Error, and Evaluate”. Depending on the step’s purpose, additional values are available for configuration.
- Define a variable or a global to store the result.
- Click the “searchAndReplaceString” step to configure its “Required” properties. Provide a name for the step and the input string. Click the button to map the search and replace string values. Provide a variable or a global to store the result. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- Click the button to map the search and replace string values. A pop-up window appears for configuration. Click the Add Row (+) button to insert an empty row. Enter the “search and replace” string values. Click the Save button. You can insert multiple “search and replace” values by using the Add Row button.

- The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

- Save the process definition, create a new instance, and execute it. Render the process instance. Click the process step to view its properties. When the workflow reaches the Search Replace String step, FlowWright processes the supplied string using the configured search-and-replace mappings. The resulting string is stored in the specified Variable or Global variable.

Tips:
- Keep search strings specific enough to avoid unintended replacements.
- Use consistent placeholder naming in reusable templates.
- Use meaningful placeholder names such as
{{CustomerName}},{{OrderNumber}}, and{{Status}}. - Keep replacement mappings organized when multiple values are being replaced.
- Test the mapping with representative input text before deploying the workflow.
- Verify that every expected placeholder has an appropriate replacement value.
- Check the input for unexpected or missing values before the step executes.
- Use a Variable or Global variable with a meaningful name for the processed result.
- Reuse standardized templates where the same type of text is generated repeatedly.
- Use multiline input when processing structured or multi-line text.
- Avoid ambiguous search strings that could unintentionally match portions of other words or values.
- Test mappings against realistic text containing repeated occurrences of the same search value.
- Verify the resulting Variable or Global value before using it in downstream activities.
- Consider connecting the False return path to appropriate error handling.
- Keep replacement mappings maintainable when templates evolve.
- Test the workflow after changing a template or its replacement mappings.
- When processing user-supplied content, test unexpected characters and formatting.
- Do not assume matching behavior such as case sensitivity, regular-expression support, or replacement ordering unless confirmed by the FlowWright implementation.
- If the same replacement is required across multiple workflows, consider using a consistent mapping/template convention.
- Keep sensitive information out of generated text when the resulting Variable will subsequently be exposed to users or external systems.
Notes:
- The Search Replace String step is defined in the Development category with the internal name
searchandreplacestring, label “Search and replace the string”, and display name “Search Replace String.” - The step is implemented by
FlowWright.Workflow.SearchandreplacestringinFlowWright.Workflow.dlland is defined as a Process step with 2 incoming connections and 2 outgoing connections. - The step defines three required properties:
-
inputString– Input string to be searched and replaced -
mappingString– Mapping of search and replace strings -
variableToStoreValue– Variable/Global to store the search and replace string
-
- The first property uses the
multilineTextBoxdata type, implemented byFlowWright.DataTypes.ClsMultilineBox. - The mapping property uses the
enterSearchReplaceStringdata type, implemented byFlowWright.DataTypes.ClsEnterSearchReplaceString. - The result destination uses the
stringdata type, implemented byFlowWright.DataTypes.ClsTextBox. - The step provides two return values:
- False
- True
Feature Comparison:
| Feature | SearchAndReplaceString | SearchAndReplaceFile |
|---|---|---|
| Purpose | Search and replace text within a string | Search and replace text within a file |
| Category | Development | Development |
| Internal Name | searchandreplacestring |
searchandreplacefile |
| Display Name | Search Replace String | Search replace in File |
| Label | Search and replace the string | Search and replace file contents |
| Implementation | FlowWright.Workflow.Searchandreplacestring |
FlowWright.Workflow.Searchandreplacefile |
| DLL | FlowWright.Workflow.dll |
FlowWright.Workflow.dll |
| Step Type | Process | Process |
| Incoming Connections | 2 | 2 |
| Outgoing Connections | 2 | 2 |
| Number of Inputs | 3 | 3 |
| Input 1 | Input string to be search and replace | Input file path to be search and replace |
| Input 2 | Mapping of search and replace strings | Output file path |
| Input 3 | Variable/Global to store the search and replace string | Mapping of search and replace strings |
| Input 1 Type | multilineTextBox |
string |
| Input 2 Type | enterSearchReplaceString |
string |
| Input 3 Type | string |
enterSearchReplaceString |
| All Inputs Required? | Yes | Yes |
| Result Destination | Variable/Global | Output file |
| Return Paths | True / False | True / False |
Definition Sample:
You may download the sample definition(s) from the link provided and later import them into your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Note: Verify and complete any missing configuration after importing the sample, including:
- Input string.
- Search-and-replace mappings.
- Variable or Global variable used to store the result.
- Workflow Variable references.
- Environment-specific settings.
- Downstream True and False workflow paths.
After verifying the configuration, save the Process Definition before execution.
Click here to download the sample file.