Skip to content

Built-in Functions

Batcher.ai supports two categories of functions: AI functions specific to the platform, and standard spreadsheet functions compatible with Excel syntax.


The core function that sends a prompt to an AI model and returns the response.

Syntax:

=LLM(prompt, "config_name")
ParameterDescriptionRequiredExample
promptText prompt or cell reference to send to the AI modelYes"Why is the sky blue?" or A2
config_nameName of the AI configuration to useYes"default", "chatgpt", "perplexity"

Usage patterns:

Direct prompt in cell:

=LLM("Write a product description for wireless headphones", "default")

Using a cell reference as prompt:

=LLM(A2, "default")

Combined with CONCAT for dynamic prompts:

=LLM(CONCAT("Translate to French: ", A2), "chatgpt")

Inline CONCAT (saves a column):

=LLM(CONCAT("Write a description for ", A2, " in the category ", B2), "default")

Note: "default" uses the free built-in model included with Batcher.ai. To use other providers like ChatGPT, Claude, or Gemini, first create a configuration with your API key in the AI Providers & Configuration page.


Some AI models can analyze images. Include an HTTPS image URL in your prompt — Batcher.ai automatically detects image URLs and sends them as visual content to the model.

Supported image formats: jpg, jpeg, png, gif, webp, bmp, svg, tiff, avif

Example:

A2: https://example.com/products/headphones.jpg
B2: =LLM(CONCAT("Generate an SEO alt-text for this product image: ", A2), "default")

Vision must be enabled in the configuration settings of the AI model you are using. See AI Providers & Configuration for details.


Combines multiple text strings and cell references into a single value.

=CONCAT("Hello ", A2, ", welcome to ", B2)

This is the most frequently used function alongside LLM(), as it allows building dynamic prompts from spreadsheet data.

Removes leading and trailing spaces from text.

=TRIM(A2)

Splits a text string using a delimiter and returns the element at the specified index.

=SPLITSTR(A2, ",", 1)
ParameterDescriptionExample
textThe text to splitA2 or "a,b,c"
delimiterThe character(s) to split on","
indexWhich element to return (0-based)0 for first, 1 for second

Common pattern — extracting URLs from a comma-separated list:

A2: https://url1.com, https://url2.com, https://url3.com
B2: =TRIM(SPLITSTR(A2, ",", 0)) → https://url1.com
C2: =TRIM(SPLITSTR(A2, ",", 1)) → https://url2.com
D2: =TRIM(SPLITSTR(A2, ",", 2)) → https://url3.com

Returns one value if a condition is true, another if false.

=IF(A2="SKIP", B2, C2)

Evaluates multiple conditions and returns the value for the first true condition.

=IFS(A2="", "empty", LEN(A2)<10, "short", TRUE, "ok")

Batcher.ai supports standard Excel-compatible functions through the PhpSpreadsheet engine. Here are the most commonly used:

=SUM(A1:A10) Sum of values in range
=AVERAGE(A1:A10) Average of values
=MIN(A1:A10) Minimum value
=MAX(A1:A10) Maximum value
=COUNT(A1:A10) Count of numeric values
=ROUND(A1, 2) Round to 2 decimal places
=LEN(A1) Length of text
=UPPER(A1) Convert to uppercase
=LOWER(A1) Convert to lowercase
=LEFT(A1, 5) First 5 characters
=RIGHT(A1, 3) Last 3 characters
=MID(A1, 2, 5) 5 characters starting at position 2
=SUBSTITUTE(A1, "old", "new") Replace text
=VLOOKUP(value, range, col, FALSE) Vertical lookup
=ROW() Current row number
=COLUMN() Current column number

For a complete list of supported functions, refer to the PhpSpreadsheet function reference.


Standard references like A2, B3 automatically adjust when formulas are expanded to other rows. When the AI Assistant applies a formula from row 2 to rows 3, 4, 5, etc., A2 becomes A3, A4, A5.

Use $ to lock a reference so it does not change when the formula is expanded:

  • $A$1 — Both column and row are locked
  • $A1 — Column locked, row adjusts
  • A$1 — Row locked, column adjusts

Example: Reference a fixed instruction cell while iterating over data rows:

=LLM(CONCAT($B$1, " : ", A2), "default")

Here $B$1 always points to the same instruction cell, while A2 adjusts per row.


Formulas can reference the output of other formulas to create multi-step pipelines:

A2: Raw product name
B2: =CONCAT("Enrich this product: ", A2)
C2: =LLM(B2, "default")
D2: =CONCAT("Write SEO description based on: ", C2)
E2: =LLM(D2, "chatgpt")

When processing, Batcher.ai resolves dependencies automatically — column C is processed before column D because D depends on C’s output.

Important: Do not nest LLM() inside another LLM(). Each AI call must be in its own cell. Use CONCAT() to reference previous results and build the next prompt.