SheetAI

SheetAI Function Reference

Complete reference of all available functions in SheetAI App. Looking for usage examples? Click here.

SHEETAI

Examples

The main AI function. Outputs the result in a single cell. Use it for content generation, data analysis, summarization, and any general-purpose AI task.

Syntax

=SHEETAI(prompt, response_token, temperature, model, cache, use_translation, target_language, api_key)

Copy/paste example

=SHEETAI("write a tagline for salon")

In some locales, you might need to use ; to separate parameters instead of ,

ParameterDefinition
prompt*Text, cell, or range containing the prompt. Examples: "Write a tagline for an ice cream shop." or A1
response_tokenMaximum number of tokens for the response. Defaults to 1000.
temperatureNumber between 0 and 1 that governs creativity. 0 = strict (default 0.4), 1 = very creative.
modelAI model to use. Defaults to "t" (gpt-3.5-turbo). See supported models below.
cachetrue/false. Defaults to true. Saves API credits for repeated prompts. Set to false for different responses from the same prompt.
use_translationSet to true to enable built-in translation.
target_languageLanguage to translate to when use_translation is true.
api_keyOptional. Override the saved API key for this call.

SHEETAI_LIST

Examples

Like SHEETAI, but outputs results in a column. Very practical when the output is a list of items, ideas, or variations.

Syntax

=SHEETAI_LIST(prompt, response_token, temperature, model, cache, api_key)

Copy/paste example

=SHEETAI_LIST("Give me 5 good short ads about spreadsheets.")

In some locales, you might need to use ; to separate parameters instead of ,

ParameterDefinition
prompt*Text, cell, or range containing the prompt.
response_tokenMaximum number of tokens. Defaults to 1000.
temperatureCreativity (0-1). Defaults to 0.4.
modelAI model. Defaults to "t" (gpt-3.5-turbo).
cachetrue/false. Defaults to true.
api_keyOptional API key override.

SHEETAI_TABLE

Examples

Like SHEETAI, but outputs results in a table format. Very practical when you need structured data with rows and columns.

Syntax

=SHEETAI_TABLE(prompt, response_token, temperature, model, cache, api_key)

Copy/paste example

=SHEETAI_TABLE("top 10 most eaten fruits and their nutrition data")

In some locales, you might need to use ; to separate parameters instead of ,

ParameterDefinition
prompt*Text, cell, or range containing the prompt. You can include headers in the prompt to control column structure.
response_tokenMaximum number of tokens. Defaults to 1000.
temperatureCreativity (0-1). Defaults to 0.7.
modelAI model. Defaults to "t" (gpt-3.5-turbo).
cachetrue/false. Defaults to true.
api_keyOptional API key override.

SHEETAI_FILL

Examples

Magically fill or clean a range from a few examples. Provide complete examples and the function learns the pattern to fill in the rest.

Syntax

=SHEETAI_FILL(examples, partial, response_token, temperature, model, cache, api_key)

In some locales, you might need to use ; to separate parameters instead of ,

ParameterDefinition
examples*Range containing complete examples that AI should learn from.
partialRange containing incomplete data that AI should complete from the examples.
response_tokenMaximum number of tokens. Defaults to 1000.
temperatureCreativity (0-1). Defaults to 0.4.
modelAI model. Defaults to "t" (gpt-3.5-turbo).
cachetrue/false. Defaults to true.
api_keyOptional API key override.

SHEETAI_TAG

Examples

Applies user-defined tags to a given text. The AI analyzes the content and returns the most relevant tags from your list.

Syntax

=SHEETAI_TAG(text, tags, response_token, temperature, model, cache, api_key)

Copy/paste example

=SHEETAI_TAG("I love chocolate", "food, positive, negative")

In some locales, you might need to use ; to separate parameters instead of ,

ParameterDefinition
text*Text, cell, or range to tag.
tags*Comma-separated tags or range of tags applicable to the text.
response_tokenMaximum number of tokens. Defaults to 1000.
temperatureCreativity (0-1). Defaults to 0.4.
modelAI model. Defaults to "t" (gpt-3.5-turbo).
cachetrue/false. Defaults to true.
api_keyOptional API key override.

SHEETAI_CLASSIFY

Examples

Classifies a given text into a single category from your list. Only the most relevant category is returned.

Syntax

=SHEETAI_CLASSIFY(text, categories, response_token, temperature, model, cache, api_key)

Copy/paste example

=SHEETAI_CLASSIFY("banana", "fruit, vegetable")

In some locales, you might need to use ; to separate parameters instead of ,

ParameterDefinition
text*Text, cell, or range to classify.
categories*Comma-separated categories or range of categories to choose from.
response_tokenMaximum number of tokens. Defaults to 1000.
temperatureCreativity (0-1). Defaults to 0.4.
modelAI model. Defaults to "t" (gpt-3.5-turbo).
cachetrue/false. Defaults to true.
api_keyOptional API key override.

SHEETAI_EXTRACT

Examples

Extracts specific data (like email addresses, company names, dates) from text. Outputs as comma-separated values.

Syntax

=SHEETAI_EXTRACT(text, to_extract, response_token, temperature, model, cache, api_key)

Copy/paste example

=SHEETAI_EXTRACT("I worked 12 years at Amazon.com and Apple", "companies")

In some locales, you might need to use ; to separate parameters instead of ,

ParameterDefinition
text*Text, cell, or range to extract data from.
to_extract*What to extract. Examples: "email addresses", "company names", "dates", "phone numbers".
response_tokenMaximum number of tokens. Defaults to 1000.
temperatureCreativity (0-1). Defaults to 0.4.
modelAI model. Defaults to "t" (gpt-3.5-turbo).
cachetrue/false. Defaults to true.
api_keyOptional API key override.

SHEETAI_TRANSLATE

Examples

Translates text from one language into another. Works best when you specify the source language.

Syntax

=SHEETAI_TRANSLATE(text, target_language, response_token, temperature, model, cache, api_key)

Copy/paste example

=SHEETAI_TRANSLATE("Cool off with our delicious treats!", "spanish")

In some locales, you might need to use ; to separate parameters instead of ,

ParameterDefinition
text*Text, cell, or range to translate.
target_language*Language of the output. Examples: "spanish", "chinese", "french", "hindi".
response_tokenMaximum number of tokens. Defaults to 1000.
temperatureCreativity (0-1). Defaults to 0.4.
modelAI model. Defaults to "t" (gpt-3.5-turbo).
cachetrue/false. Defaults to true.
api_keyOptional API key override.

SHEETAI_SUMMARIZE

Examples

Creates concise summaries of longer text. Distills key points and main ideas from articles, documents, and any content.

Syntax

=SHEETAI_SUMMARIZE(text, response_token, temperature, model, cache, api_key)

In some locales, you might need to use ; to separate parameters instead of ,

ParameterDefinition
text*Text, cell, or range to summarize.
response_tokenMaximum number of tokens. Defaults to 1000.
temperatureCreativity (0-1). Defaults to 0.4.
modelAI model. Defaults to "t" (gpt-3.5-turbo).
cachetrue/false. Defaults to true.
api_keyOptional API key override.

SHEETAI_IMAGE

Examples

Generates AI images directly in your spreadsheet cells from text descriptions.

Syntax

=SHEETAI_IMAGE(prompt, size, temperature, cache, provider, api_key)

Copy/paste example

=SHEETAI_IMAGE("a cat wearing sunglasses")

In some locales, you might need to use ; to separate parameters instead of ,

ParameterDefinition
prompt*Text description of the image to generate.
sizeImage dimensions. Defaults to "256x256". Options: "256x256", "512x512", "1024x1024".
temperatureCreativity (0-1). Defaults to 0.4.
cachetrue/false. Defaults to true.
providerImage generation provider. Defaults to "openai".
api_keyOptional API key override.

SHEETAI_BRAIN

Examples

AI assistant with persistent memory and context. Stores and retrieves information across your spreadsheets.

Syntax

=SHEETAI_BRAIN(prompt, cache)

In some locales, you might need to use ; to separate parameters instead of ,

ParameterDefinition
prompt*Your prompt or question for the AI brain.
cachetrue/false. Defaults to true.

SHEETAI_API

Examples

Makes HTTP API calls directly from Google Sheets. Supports GET, POST, PUT, PATCH, DELETE with custom headers and request bodies. Use keyPath to extract specific values from JSON responses.

Syntax

=SHEETAI_API(url, method, headersJson, bodyJson, keyPath)

Copy/paste example

=SHEETAI_API("https://api.example.com/users/1", "GET", "", "", "data.name")

In some locales, you might need to use ; to separate parameters instead of ,

ParameterDefinition
url*The API endpoint URL.
methodHTTP method: "GET", "POST", "PUT", "PATCH", "DELETE". Defaults to "GET".
headersJsonJSON string of headers. Example: '{"Authorization": "Bearer token"}'.
bodyJsonJSON string of the request body for POST/PUT/PATCH.
keyPathDot notation path to extract a specific value. Example: "data.users[0].name".

SHEETAI_PJSON

Examples

Parses JSON strings and extracts specific values using dot notation and array indexing. Useful for working with API responses stored in cells.

Syntax

=SHEETAI_PJSON(jsonString, keyPath)

In some locales, you might need to use ; to separate parameters instead of ,

ParameterDefinition
jsonString*A cell containing a JSON string.
keyPath*Dot notation path to extract. Examples: "data.name", "results[0].id", "users[2].email".

GeminiAI

Use Google Gemini models directly in Google Sheets. Requires a Gemini API key.

Syntax

=GeminiAI(prompt, model, maxTokens, temperature, api_key)

Copy/paste example

=GeminiAI("explain quantum computing simply")

In some locales, you might need to use ; to separate parameters instead of ,

ParameterDefinition
prompt*Text, cell, or range containing the prompt.
modelGemini model. Defaults to "gemini-pro".
maxTokensMaximum tokens. Defaults to 1000.
temperatureCreativity (0-1). Defaults to 0.4.
api_keyYour Gemini API key.

Supported Models

Pass these as the model parameter in any SHEETAI function. Use shorthand codes or full names.

You can also use =SHEETAI_MODELS() in a cell to see the full list.

ShorthandFull Model NameProvider
"t" (default)gpt-3.5-turboOpenAI
"4"gpt-4OpenAI
"4o"gpt-4oOpenAI
"4o-m"gpt-4o-miniOpenAI
"o1-p"o1-previewOpenAI
"o1-m"o1-miniOpenAI
"t-16k"gpt-3.5-turbo-16kOpenAI
-grok-beta / grok-2-1212xAI
-grok-3xAI
"c3"claude-3-opus-20240229Anthropic
"c3s"claude-3-sonnet-20240229Anthropic
"c3h"claude-3-haiku-20240307Anthropic
-deepseek-chatDeepSeek
"g"gemini-2.0-flashGoogle

Common Optional Parameters

These parameters are shared across all SHEETAI functions and are always optional.

temperature

Number between 0 and 1 that controls creativity. 0 = strictly follow the prompt. 0.5 = slightly creative. 1 = very creative. In some locales, use 0,5 instead of 0.5.

response_token / maxTokens

Maximum number of tokens to generate. Must be a round number greater than 0. Defaults to 1000. Values over 500 in spreadsheet functions may risk a timeout. For long-form content, use the SheetAI Sidebar.

cache

true (default) or false. When enabled, saves API credits by caching responses for identical prompts. Set to false to get a different response from the same prompt each time.

api_key

Override the saved API key for a specific call. Useful when using multiple API keys or testing.

Need help?

Check the examples page for usage examples, or reach out at support@sheetai.app