botnest
Documentation
Guide

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.

Passing data between steps →

Build text from template

Builds text from your template and data from earlier steps. It does not call an AI model.

  1. Write a template and insert chips, for example Question: ${message.text}. Line breaks are preserved.
  2. 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.

  1. 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.
  2. 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.
  3. 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.

  1. 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.
  2. 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.

  1. Enter text or a template, then choose an algorithm and a result name.
  2. 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.

  1. Choose the time zone and output format.
  2. Check the time zone when building schedules and reminders: the same instant has different local times.

Format date

Formats a date as text.

  1. Supply the source date, then choose the time zone and format.
  2. 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.

  1. Supply a date, an amount and a unit, for example a number of hours.
  2. 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.

  1. Supply the text and name the result.
  2. Characters inside the text stay in place. Useful before comparing a user's answer.

Uppercase text

Converts text letters to uppercase.

  1. Supply the text and name the result.
  2. For example, Hello becomes HELLO. Use the source field if you need the original spelling.

Lowercase text

Converts text letters to lowercase.

  1. Supply the text and name the result.
  2. For example, HELLO becomes hello. Useful before a comparison where case should not matter.

Capitalize text

Capitalizes the first letter and lowercases the rest.

  1. Supply the text and name the result.
  2. Check names and abbreviations: the case of the remaining letters changes.

Title case text

Capitalizes each word.

  1. Supply the text and name the result.
  2. Check names and abbreviations: mechanical case conversion is not suitable for every text.

Replace text

Replaces a specified text fragment with another.

  1. Set the source text, search fragment and replacement. An empty replacement removes the fragment.
  2. Check the exact search text. This is text replacement, not a free-form AI instruction.

Add numbers

Adds two numbers.

  1. Enter the left and right numbers or insert them as chips.
  2. Set precision if needed. Use a variable block to retain a counter between runs.

Subtract numbers

Subtracts the right number from the left.

  1. Set both numbers; order matters: 10 − 3 gives 7.
  2. Set precision and the result name if needed.

Multiply numbers

Multiplies two numbers.

  1. Supply both factors, such as price and quantity.
  2. Choose result precision. Convert text containing a currency symbol to a number first.

Divide numbers

Divides the left number by the right.

  1. Set the dividend, divisor and result precision.
  2. 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.

  1. Set both numbers. For example, 7 divided by 3 leaves a remainder of 1.
  2. The right number must not be zero. Useful for parity checks or repeating steps.

Minimum of two numbers

Selects the smaller of two numbers.

  1. Supply two numeric values.
  2. 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.

  1. Supply two numeric values.
  2. For example, choosing the larger of a calculation and zero prevents a negative result.