Text Helper
The Text Helper piece in ZBrain Flow provides comprehensive text manipulation and transformation capabilities for your workflows. This versatile component allows you to perform a wide range of text operations including concatenation, replacement, splitting, pattern matching, format conversion, and conditional text handling. With Text Helper, you can efficiently process and modify text content to prepare data for other systems, standardize formats, extract specific information, or transform content between different markup languages without requiring custom code.
How to Use Text Helper in ZBrain Flow?
Step 1: Select Text Helper as Your Connection
Click on the '+' button in the Flow and search for Text Helper.
Select Text Helper.
Decide on the action you need, then select it. ZBrain Flow provides several options:
Concatenate – Join two or more text strings together.
Replace – Substitute specific text patterns with alternatives.
Split – Divide text into segments based on a delimiter.
Find – Locate specific substrings using regex or text matching.
Markdown to HTML – Convert markdown formatting to HTML.
HTML to Markdown – Convert HTML to markdown format.
Remove HTML Tags – Strip HTML markup to extract plain text.
Slugify – Convert text to URL-friendly format.
Use Default Value if Input is Empty – Provide fallback values for empty inputs.
How to Join Text Strings?
Step 1: Add Text Items
In the ‘Texts’ section, enter the first text string you want to join.
Click ‘Add Item’ for each additional text string you want to include.
Remove unwanted items using the ‘Remove’ option.
Step 2': Specify Separator (Optional)
In the ‘Separator’ field, enter any character or text you want to place between the concatenated strings. Common separators include spaces, commas, or line breaks.
Leave empty if you want the strings joined without any separator.
How to Replace Text Patterns?
Step 1: Enter Source Text
In the ‘Text’ field, enter the original text where you want to make replacements.
Step 2: Define Search Pattern
In the ‘Search Value’ field, enter what you want to find and replace. You can use plain text or regular expressions for more complex pattern matching.
Step 3: Specify Replacement
In the ‘Replace Value’ field, enter the text that should replace the found patterns.
Leave this empty if you want to delete the matched content instead of replacing it.
Step 4: Choose Replacement Scope
Toggle ‘Replace Only First Match’ on if you want to replace just the first occurrence.
Leave it off to replace all instances of the search pattern.
How to Divide Text into Segments?
Step 1: Enter Source Text
In the ‘Text’ field, enter the content you want to divide into smaller parts.
Step 2: Specify Delimiter
In the ‘Delimiter’ field, enter the character or pattern that marks where to split the text. Common delimiters include commas, line breaks, spaces, or semicolons.
How to Search for Text Patterns?
Step 1: Enter Source Text
In the ‘text’ field, enter the content you want to search within.
Step 2: Specify Search Expression
In the ‘Expression’ field, enter what you want to find in the text. You can use plain text for exact matches or regular expressions for complex pattern matching.
How to Convert Markdown to HTML?
Step 1: Enter Markdown Content
In the ‘Markdown Content’ field, paste or enter the markdown text you want to convert.
Step 2: Select Markdown Flavor
From the ‘Flavor of Markdown’ dropdown, choose the specification to follow. The default is GitHub flavor, which supports most common markdown features.
Step 3: Configure Conversion Options
Minimum Header Level: Set the smallest heading size for the conversion.
Support Tables: Toggle on to properly convert markdown tables.
No Header ID: Toggle on to prevent automatic ID generation for headers.
Simple Line Breaks: Toggle on to convert single line breaks to <br> tags.
Open Links in New Window: Toggle on to add target="_blank" to links to make the browser open the link in a new tab or window.
How to Convert HTML to Markdown?
Step 1: Enter HTML Content
In the ‘HTML Content’ field, paste or enter the HTML code you want to convert.
After configuration, this action will transform your HTML code into equivalent markdown syntax that can be used in subsequent workflow steps.
How to Remove HTML Tags from Content?
Step 1: Enter HTML Content
In the ‘HTML content’ field, paste or enter the HTML-formatted text you want to clean.
After configuration, this action will remove all HTML markup tags from your content, leaving only the plain text. The resulting clean text can be used in subsequent workflow steps where you need content without formatting elements.
How to Create URL-friendly Slugs?
Step 1: Enter Source Text
In the ‘Text’ field, enter the content you want to convert to a slug.
After configuration, this action will transform your text into a URL-friendly slug by:
Converting to lowercase
Replacing spaces with hyphens
Removing special characters
The resulting slug can be used for creating clean URLs, file names, or ID strings in subsequent workflow steps.
How to Set Default Value for Empty Inputs?
Step 1: Configure Primary Input
In the ‘Enter value’ field, provide the primary input you want to check.
Step 2: Specify Fallback Value
In the ‘Default Value’ field, enter the text to use if the primary input is empty. This fallback will be returned whenever the primary input is blank, null, or undefined.
After configuration, this action will check if your primary input contains any value. If it does, that value passes through unchanged. If it's empty, the default value is used instead, ensuring your workflow always has valid data to work with.
Last updated