List of GPT Functions
Discover all available functions for GPT AI model in AI for Workspace, along with simple examples and an extensive list of paramaters.
Prerequisites
You have opened a Google spreadsheet and selected Extensions > AI for Workspace. To enable GPT functions, you must be the Creator of the spreadsheet.
GPT function
The simplest function to start using GPT in Google Sheets. Outputs the result in a single cell.
How to use
Syntax | =GPT(prompt, [value], [temperature], [model]) |
---|---|
Copy/paste example | =GPT(“Write a tagline for a cafe .“) |
⚠️ Localization | In some locales, you might need to use ”;” to separate parameters instead of ”,“ |
Output | A response to your prompt in a single cell |
Parameters
Parameter | Definition |
---|---|
prompt (cannot be empty) | Instruction provided to the AI to generate a result in a single cell. The prompt parameter
can be: * A string: |
(optional) value | Text, cell or range you want your prompt to apply to |
(optional) temperature, model | temperature is a number between 0 and 1. Use it to control creativity. Go to temperature and model to learn more. |
GPT_LIST/GPT_HLIST function
GPT_List: List the responses in a column / GPT_HLIST: List the responses in a horizontal list of items.
How to use
Syntax | =GPT_LIST(prompt, [value], [temperature], [model]) |
---|---|
Copy/paste example | =GPT_LIST(“Top 5 Google product names.“) |
⚠️ Localization | In some locales, you might need to use ”;” to separate parameters instead of ”,“ |
Output | As many responses to your prompt as you asked, one response per cell |
Parameters
Parameter | Definition |
---|---|
prompt (cannot be empty) | Instruction provided to the AI to generate a result in a single cell. The prompt parameter
can be: * A string: |
(optional) value | Text, cell or range you want your prompt to apply to |
(optional) temperature, model | temperature is a number between 0 and 1. Use it to control creativity. Go to temperature and model to learn more. |
GPT_SPLIT/GPT_HSPLIT function
GPT_SPLIT: Splits text based on input / GPT_HSPLIT: This function is used to horizontally split data
How to use
Syntax | =GPT_SPLIT(text, split_by, [temperature], [model]) |
---|---|
Copy/paste example | =GPT_SPLIT(“Unlock the Power of GPT: The Google Sheets Add-on that streamlines your workflows”, “nouns”) |
⚠️ Localization | In some locales, you might need to use ”;” to separate parameters instead of ”,“ |
Output | Input text is split as requested, one element per cell |
Parameters
Parameter | Definition |
---|---|
text (cannot be empty) | Input text to split. The text parameter can be: * A string: |
split_by (cannot be empty) | How to split the text. Examples: * sections * paragraphs * sentences * punctuation * nouns * adjectives |
(optional) temperature, model | temperature is a number between 0 and 1. Use it to control creativity. Go to temperature and model to learn more. |
GPT_HSPLIT: The GPT_HSPLIT function is used to horizontally split data
GPT_FILL function
Fills or cleans a range
How to use
Syntax | =GPT_FILL(examples, [inputs], [temperature], [model]) |
---|---|
Copy/paste example | =GPT_FILL(S4:U5,S6:S14) |
⚠️ Localization | In some locales, you might need to use ”;” to separate parameters instead of ”,“ |
Output | The empty part of the range will be filled based on the examples provided |
Parameters
Parameter | Definition |
---|---|
examples | Range containing complete examples that the AI should learn from |
(optional) inputs | Range containing incomplete data that the AI should complete from the examples |
(optional) temperature, model | temperature is a number between 0 and 1. Use it to control creativity. Go to temperature and model to learn more. |
GPT_TRANSLATE function
Translates text from one language into another. Works better if you specify the source language.
How to use
Syntax | =GPT_TRANSLATE(text, [target_language], [source_language], [instructions],[temperature], [model]) |
---|---|
Copy/paste example | =GPT_TRANSLATE(“Happy New Year!”, “spanish”) |
⚠️ Localization | In some locales, you might need to use ”;” to separate parameters instead of ”,“ |
Output | The requested translation in a single cell |
Parameters
Parameter | Definition |
---|---|
text (cannot be empty) | Input text to translate. The text parameter can be: * A string: |
(optional) target_language | Language of the output. Examples: “spanish”, “chinese”, “french”. Defaults to “english”. |
(optional) source_language | Language of the input. Example: “english” |
(optional) instructions | Additional instructions for the translation. Can include a dictionary of translations. |
(optional) temperature, model | temperature is a number between 0 and 1. Use it to control creativity. Go to temperature and model to learn more. |
GPT_SUMMARIZE function
Summarizes text according to a given format.
How to use
Syntax | =GPT_SUMMARIZE(text, [format], [temperature], [model]) |
---|---|
Copy/paste example | =GPT_SUMMARIZE(“some long content here”) |
⚠️ Localization | In some locales, you might need to use ”;” to separate parameters instead of ”,“ |
Output | A summary in the requested format in a single cell |
Parameters
Parameter | Definition |
---|---|
text (cannot be empty) | Input text to summarize. The text parameter can be: * A string: |
(optional) format | Format of the summary. Examples:
|
(optional) temperature, model | temperature is a number between 0 and 1. Use it to control creativity. Go to temperature and model to learn more. |
GPT_EXTRACT function
Extracts data (like email addresses or company names) from a text. Outputs extracted values in a cell.
How to use
Syntax | =GPT_EXTRACT(text, to_extract, [temperature], [model]) |
---|---|
Copy/paste example | =GPT_EXTRACT(“The major AI players in the market are OpenAI, Google & Amazon”, “companies”) |
⚠️ Localization | In some locales, you might need to use ”;” to separate parameters instead of ”,“ |
Output | The extracted entities as values in a single cell |
Parameters
Parameter | Definition |
---|---|
text (cannot be empty) | Input text to extract from. The text parameter can be: * A string: |
to_extract (cannot be empty) | Text, cell or horizontal range specifying what you want to extract. Examples:
|
(optional) temperature, model | temperature is a number between 0 and 1. Use it to control creativity. Go to temperature and model to learn more. |
GPT_TABLE function
Outputs the results in a table. Very practical when the output is a table.
How to use:
Syntax | =GPT_TABLE(prompt, [head], [inputs], [temperature], [model]) |
---|---|
Copy/paste example | =GPT_TABLE(“top 10 most eaten fruits and their nutrition data”) |
⚠️ Localization | In some locales, you might need to use ”;” to separate parameters instead of ”,“ |
Output | A response to your prompt according to the information extracted from the image The best applicable category |
Parameters
Parameter | Definition |
---|---|
prompt (cannot be empty) | Instruction to generate a table. The prompt parameter can be: * A string: |
(optional) head | Range containing at least one row. the first row should be headers, the following rows can be used to specify examples If left empty, headers will be generated automatically. |
(optional) inputs | Range containing partial rows to complete with GPT_TABLE categories (cannot be empty) |
(optional) temperature | temperature is a number between 0 and 1. Use it to control creativity. Go to temperature and model to learn more. |
GPT_CLASSIFY
Classifies a given text into a single category.
How to use:
Syntax | =GPT_CLASSIFY(value, categories, [temperature], [model]) |
---|---|
Copy/paste example | =GPT_CLASSIFY(“banana”, “fruit, vegetable”) |
⚠️ Localization | In some locales, you might need to use ”;” to separate parameters instead of ”,“ |
Output | A response to your prompt according to the information extracted from the image The best applicable category |
Parameters
Parameter | Definition |
---|---|
prompt (cannot be empty) | Input text to classify. The value parameter can be: * A string: |
(optional) inputs | Comma-separated categories or range of categories to choose from. Only the most relevant category will be returned. |
(optional) temperature | temperature is a number between 0 and 1. Use it to control creativity. Go to temperature and model to learn more. |
GPT_TAG
Applies user-defined tags to text or automatically suggests relevant tags if none are specified.
How to use:
Syntax | =GPT_TAG(value, [tags], [top_k], [temperature], [model]) |
---|---|
Copy/paste example | =GPT_TAG(“I love chocolate”, “food, positive, negative”) |
⚠️ Localization | In some locales, you might need to use ”;” to separate parameters instead of ”,“ |
Output | The applicable tags as csv in a single cell |
Parameters
Parameter | Definition |
---|---|
value (cannot be empty) | Input text to tag. The value parameter can be: * A string: |
tags (optional) | Comma-separated tags or range of tags applicable. If left empty, GPT_TAG will automatically come up with the tags |
top_k (optional) | Maximum number of tags to return |
(optional) temperature | temperature is a number between 0 and 1. Use it to control creativity. Go to temperature and model to learn more. |
GPT_FORMAT
Formats dates, currencies, addresses, names, etc. Fixes capitalization. And so much more.
How to use:
Syntax | =GPT_FORMAT(input, target_format, [source_format], [temperature], [model]) |
---|---|
Copy/paste example | = GPT_FORMAT(“14 February 71”, “iso”) |
⚠️ Localization | In some locales, you might need to use ”;” to separate parameters instead of ”,“ |
Output | The converted input in a single cell unless it is converted a table, which outputs a table |
Parameters
Parameter | Definition |
---|---|
input (cannot be empty) | Input text to format. The value parameter can be: * A string: “14 February 1971” * A cell: |
target_format (cannot be empty) | Target format for the input. Examples: “iso”, “currency iso”, “international phone number”, “lowercase/uppercase/camelcase/snake case/title case/sentence case”… |
(optional) source_format | temperature is a number between 0 and 1. Use it to control creativity. Go to temperature and model to learn more. |
GPT_EDIT
Applies the given task to the given text. The default task is to fix grammar and spelling.
How to use:
Syntax | =GPT_EDIT(text, [task], [temperature], [model]) |
---|---|
Copy/paste example | =GPT_EDIT(“For sum reezon thoose nunsberz arnt addin up”) |
⚠️ Localization | In some locales, you might need to use ”;” to separate parameters instead of ”,“ |
Output | The edited text in a single cell |
Parameters
Parameter | Definition |
---|---|
text (cannot be empty) | Input text to edit. The text parameter can be: * A string: |
task (optional) | Text, cell or range specifying how the text should be edited. Defaults to fixing grammar and spelling. Other examples: * “Make it funnier” * “Make it shorter” * “Make it sound formal” * “Add an ending” |
(optional) temperature | temperature is a number between 0 and 1. Use it to control creativity. Go to temperature and model to learn more. |
GPT_MATCH
Matches the values of two columns by similarity.
How to use:
Syntax | =GPT_MATCH(search_keys, lookup_range, [confidence], [stats], [top_k]) |
---|---|
Copy/paste example | =GPT_MATCH(A1:A10,B1:B4) |
⚠️ Localization | In some locales, you might need to use ”;” to separate parameters instead of ”,“ |
Output | A column of the best matches to each value in the range |
Parameters
Parameter | Definition |
---|---|
search_keys(cannot be empty) | The values that you want to look for in the range |
lookup_range (cannot be empty) | The range in which to look for values that are similar to search keys |
confidence (optional) | Set a similarity threshold: only values with a superior similarity score are matched. Must be comprised between 0 and 1 |
stats(optional) | “true” to display similarity scores |
top_k (optional) | Number of matching values to return per search_key (default: 1 - only the best match) |
GPT_SPAM
Classify if the given text is spam or non-spam.
How to use:
Syntax | =GPT_SPAM(text,[temperature], [model]) |
---|---|
Copy/paste example | =GPT_SPAM(“Your text here”) |
⚠️ Localization | In some locales, you might need to use ”;” to separate parameters instead of ”,“ |
Output | Spam text in single cell |
Parameters
Parameter | Definition |
---|---|
text (cannot be empty) | Input text to edit. The text parameter can be: * A string: |
(optional) temperature | temperature is a number between 0 and 1. Use it to control creativity. Go to temperature and model to learn more. |
GPT_FORMULA
Description about your Google Sheet formulas
How to use:
Syntax | =GPT_FORMULA(prompt,[temperature], [model]) |
---|---|
Copy/paste example | =GPT_FORMULA(“I want to multiply the values in cells A2 and B2”) |
⚠️ Localization | In some locales, you might need to use ”;” to separate parameters instead of ”,“ |
Output | Google Sheet formulas |
Parameters
Parameter | Definition |
---|---|
prompt (cannot be empty) | Input formula description. The prompt parameter can be: * A string:
|
(optional) temperature | temperature is a number between 0 and 1. Use it to control creativity. Go to temperature and model to learn more. |
More functions coming soon
…
Temperature and Model
These parameters are present in most GPT functions. They are always optional.
For example with the GPT function, you can set:
- the temprature to
0.1
- the model to
"gpt-4o"
You can also set these values from the sidebar very easily. In this case, they become the default values for all future executions.
Parameter | Definition |
---|---|
(optional) temperature | Number between 0 and 1 that governs the creativity of the model: * 0 - strictly follow the prompt * 0.5 - slightly creative * 1 - very creative Note: In some locales, you might need to use “0,5” instead of “0.5” |
(optional) model | Technical name of the model surrounded by quotes. The technical names are listed in the Model menu of the Default Settings section of the sidebar. |