Text, JSON and calculations
Templates, structured data, numbers and dates.
Use the result in a later step¶
These blocks prepare data; they do not send it to a person. Connect the output to the next step and insert the result as a chip.
A text template builds a string, JSON parsing extracts structured data, math blocks calculate, and date blocks work with time. A model answer requires a separate AI block.
Build text from template¶
Builds text from your template and data from earlier steps. It does not call an AI model.
- Write a template and insert chips, for example Question: ${message.text}. Line breaks are preserved.
- Name the result and use it in an AI prompt, a message or another text field.
Parse JSON¶
Turns JSON text into data whose individual fields can be used later.
- Supply the JSON source and name the result, for example json_data. Add the keys you want to extract in the expanded block; their chips remain visible when collapsed.
- For {"is_rent_offer": true}, add is_rent_offer and use ${json_data.is_rent_offer} in a condition. Use a dotted path for a nested field, such as user.name.
- With a key list, the result contains only selected fields; a missing value becomes null. Without a list, the whole JSON is retained. This extracts data rather than validating types; check the result's _error field for parsing failures.
Build text from list¶
Builds one text from a list of products, table rows or other items.
- Supply a list and an item template, such as ${n}. ${name}, where n is the item number and name is an item field. Use ${item} for a simple value.
- Choose a separator, such as a line break. Limit item count or text length if needed, then pass the result to a message block.
Calculate hash¶
Calculates a fingerprint of text, useful for comparing records or finding duplicates.
- Enter text or a template, then choose an algorithm and a result name.
- The same input and algorithm produce the same hash. This is not encryption or a way to hide passwords.
Current date and time¶
Returns the current date and time.
- Choose the time zone and output format.
- Check the time zone when building schedules and reminders: the same instant has different local times.
Format date¶
Formats a date as text.
- Supply the source date, then choose the time zone and format.
- Use an unambiguous date including the year and time when relevant. This block formats dates; it does not interpret phrases such as tomorrow evening.
Shift date¶
Shifts a date by a chosen amount of time.
- Supply a date, an amount and a unit, for example a number of hours.
- Choose the time zone and result format. Use a negative amount to move backwards.
Trim whitespace¶
Removes whitespace and line breaks from the edges of text.
- Supply the text and name the result.
- Characters inside the text stay in place. Useful before comparing a user's answer.
Uppercase text¶
Converts text letters to uppercase.
- Supply the text and name the result.
- For example, Hello becomes HELLO. Use the source field if you need the original spelling.
Lowercase text¶
Converts text letters to lowercase.
- Supply the text and name the result.
- For example, HELLO becomes hello. Useful before a comparison where case should not matter.
Capitalize text¶
Capitalizes the first letter and lowercases the rest.
- Supply the text and name the result.
- Check names and abbreviations: the case of the remaining letters changes.
Title case text¶
Capitalizes each word.
- Supply the text and name the result.
- Check names and abbreviations: mechanical case conversion is not suitable for every text.
Replace text¶
Replaces a specified text fragment with another.
- Set the source text, search fragment and replacement. An empty replacement removes the fragment.
- Check the exact search text. This is text replacement, not a free-form AI instruction.
Add numbers¶
Adds two numbers.
- Enter the left and right numbers or insert them as chips.
- Set precision if needed. Use a variable block to retain a counter between runs.
Subtract numbers¶
Subtracts the right number from the left.
- Set both numbers; order matters: 10 − 3 gives 7.
- Set precision and the result name if needed.
Multiply numbers¶
Multiplies two numbers.
- Supply both factors, such as price and quantity.
- Choose result precision. Convert text containing a currency symbol to a number first.
Divide numbers¶
Divides the left number by the right.
- Set the dividend, divisor and result precision.
- The divisor must not be zero. Check it with a condition if it comes from user input.
Remainder¶
Returns the remainder when the left number is divided by the right.
- Set both numbers. For example, 7 divided by 3 leaves a remainder of 1.
- The right number must not be zero. Useful for parity checks or repeating steps.
Minimum of two numbers¶
Selects the smaller of two numbers.
- Supply two numeric values.
- For example, cap a result by choosing the smaller of a calculation and the allowed maximum.
Maximum of two numbers¶
Selects the larger of two numbers.
- Supply two numeric values.
- For example, choosing the larger of a calculation and zero prevents a negative result.