text_processing.mdx
Overview
The Text processing component is designed to perform fundamental text manipulations within a workflow: merging multiple text inputs into a single string or splitting a single text input into multiple parts. It is a configurable utility that can be integrated into larger automation or data processing pipelines where text needs to be transformed or parsed dynamically.
This file documents the configuration options and usage of the text processing component, explaining how users can specify the operation mode (merge or split), the variables involved, delimiters, and output handling.
Functionality and Configuration Details
The component supports two primary methods:
1. Method: Split
Purpose: To split a string variable into multiple substrings based on specified delimiter(s).
Configuration:
Split_ref: The variable name containing the text to split. Supports quick variable insertion by typing
/.Delimiters: The character(s) or string(s) used as delimiter(s) to divide the text.
Output: The result is stored in a global variable specified by the user, making it accessible for subsequent components.
2. Method: Merge
Purpose: To merge multiple text elements or variables into a single string according to a user-defined template.
Configuration:
Script: A template string specifying how to combine variables. Supports quick variable insertion via
/.Delimiters: Delimiters can be included in the template or separately defined to control how texts are concatenated.
Output: The merged text is assigned to a global variable for use downstream.
Detailed Explanation of Configuration Properties
Configuration | Description | Applicable Method(s) |
|---|---|---|
Method | Selects the operation mode: | Split, Merge |
Split_ref | Variable containing text to be split. Visible only when | Split |
Script | Template for merging texts into a single string. Visible only when | Merge |
Delimiters | String(s) used to split or join text parts. | Split, Merge |
Output | Name of the global variable where the result is stored. | Split, Merge |
Usage Examples
Example 1: Splitting a Text String
Scenario: You have a CSV string "apple,banana,orange" and want to split it into an array of fruits.
Method: Split
Split_ref: csv_fruits (contains the CSV string)
Delimiters:
,Output: fruit_list
Result:
The variable fruit_list will contain ["apple", "banana", "orange"].
Example 2: Merging Text Variables with a Template
Scenario: You want to merge first name and last name variables into a full name string.
Method: Merge
Script:
/first_name/ + " " + /last_name/Delimiters: (not necessary if included in the script)
Output:
full_name
Result:
If first_name = "John" and last_name = "Doe", then full_name will be "John Doe".
Implementation Details and Notes
The component uses variable placeholders that can be quickly inserted by typing
/, improving user efficiency in defining dynamic inputs.When splitting, the component expects the input to be a single string and outputs a list or array of strings.
When merging, the component uses a template string that can include multiple variables and literals, allowing flexible text construction.
Delimiters are critical to correctly parse or join strings and should be chosen based on the input format or desired output.
The output variable is global within the workflow, enabling seamless data passing between components.
Interaction with Other System Components
The Text processing component typically functions as a utility module within a larger workflow or automation pipeline.
It consumes input variables that may be generated by upstream components (e.g., data extraction or form inputs).
Its output variables can be referenced by downstream components for further processing, reporting, or decision-making.
The component's configuration UI supports dynamic variable insertion for ease of integration with existing workflows.
It acts as a bridge between raw textual data manipulation and structured data handling in the system.
Visual Diagram: Text Processing Component Flowchart
flowchart TD
A[Start: Input Variables] --> B{Select Method}
B --> |Split| C[Split Text]
B --> |Merge| D[Merge Text]
C --> E[Use Split_ref Variable]
C --> F[Apply Delimiters to Split]
D --> G[Use Script Template]
D --> H[Apply Delimiters if needed]
E --> I[Split text into parts]
F --> I
G --> J[Substitute variables in template]
H --> J
I --> K[Store Result in Output Variable]
J --> K
K --> L[Output Available for Next Components]
Summary
The text_processing.mdx file documents a versatile text manipulation component capable of splitting and merging text based on user configurations. It provides a simple yet powerful interface for text transformations, enabling integration within complex workflows via global variables and templated input. This component acts as a crucial utility in processing textual data streams efficiently and flexibly.