> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superjoin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SUPERGPT Functions for Sheets

> Discover all available functions in SUPERGPT for Sheets, along with simple examples and an extensive list of paramaters.

<Check> Only available on Google Sheets </Check>

Prepare to transform your Google Sheets experience with the groundbreaking <b>SUPERGPT Functions!</b> 🌟 Powered by OpenAI's advanced language model, these tools enable you to conduct natural language processing, generate text, perform sentiment analysis, and even create code right in your spreadsheets. 🚀 Unlock new insights and enhance decision-making with these capabilities, streamlining your workflows for peak productivity. Dive into a new realm of possibilities and elevate your spreadsheet game with SUPERGPT functions!

<Accordion title="Prerequisites" defaultOpen>
  You have opened a Google spreadsheet and selected <b>Extensions > Superjoin > Enable SUPERGPT functions.</b>
  To enable SUPERGPT functions, you must be the Creator of the spreadsheet.
</Accordion>

## How to use SUPERGPT Functions on Google Sheet?

<iframe width="560" height="415" src="https://www.youtube.com/embed/8Cewnx-dXj0?si=biZOZnr4ewCF3D1G" title="Pull data from HubSpot to Google Sheets" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen style={{ width: "100%", borderRadius: "0.5rem" }} />

## SUPERGPT function

The simplest function to start using SUPERGPT in Google Sheets. Outputs the result in a single cell.

<Frame>
  <img src="https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/GPTFunction/SUPERGPT.png?fit=max&auto=format&n=tR1QsuikxI8kxuAE&q=85&s=0cbefd51018fecbb4ef99e9ecc678532" width="1417" height="233" data-path="images/GPTFunction/SUPERGPT.png" />
</Frame>

**How to use**

| Syntax             | =SUPERGPT(prompt, \[value], \[temperature], \[model]) |
| ------------------ | ----------------------------------------------------- |
| Copy/paste example | `=SUPERGPT("Write a tagline for an ice cream shop.")` |
| 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. <br /> The prompt parameter can be: <br /> - A string: `"Write a tagline for an ice cream shop."` <br /> - A cell: `A1` <br /> -A range of cells: `A1:C3` |
| value (optional)         | Text, cell or range you want your prompt to apply to                                                                                                                                                                            |
| temperature (optional)   | temperature is a number between 0 and 1. Use it to control creativity.                                                                                                                                                          |

## SUPERGPT\_LIST function

Like the SUPERGPT function, but even more user-friendly for quickly generating results in a list format.

<Frame>
  <img src="https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/GPTFunction/supergpt_list.png?fit=max&auto=format&n=tR1QsuikxI8kxuAE&q=85&s=969f4c3517891046caed2d6424c303c1" width="1410" height="425" data-path="images/GPTFunction/supergpt_list.png" />
</Frame>

**How to use**

| Syntax             | =SUPERGPT\_LIST(prompt, \[value], \[temperature], \[model])          |
| ------------------ | -------------------------------------------------------------------- |
| Copy/paste example | `=SUPERGPT_LIST("Give me 5 good short ads about spreadsheets.")`     |
| 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 list. <br /> The prompt parameter can be: <br /> - A string: `"Give me 5 good short ads about spreadsheets."` <br /> - A cell: `A1` <br /> -A range of cells: `A1:C3` |
| value (optional)         | Text, cell or range you want your prompt to apply to                                                                                                                                                               |
| temperature (optional)   | temperature is a number between 0 and 1. Use it to control creativity.                                                                                                                                             |

## SUPERGPT\_FILL function

Fill in a range with generated results that follow the pattern of the example rows you choose!

<Frame>
  <img src="https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/GPTFunction/Fill.png?fit=max&auto=format&n=tR1QsuikxI8kxuAE&q=85&s=46ed4a92e6b13822f2282447cd502b49" width="1247" height="492" data-path="images/GPTFunction/Fill.png" />
</Frame>

**How to use**

| Syntax             | =SUPERGPT\_FILL(examples, \[inputs], \[temperature])                      |
| ------------------ | ------------------------------------------------------------------------- |
| Copy/paste example | `=SUPERGPT_FILL(S4:U5,S6:S14)`                                            |
| Output             | The empty part of the range will be filled based on the examples provided |

**Parameters**

| Parameter                  | Definition                                                                        |
| -------------------------- | --------------------------------------------------------------------------------- |
| examples (cannot be empty) | Range containing complete examples that the AI should learn from (example: S4:U5) |
| inputs (optional)          | Range containing incomplete data that the AI should complete from the examples    |
| temperature (optional)     | temperature is a number between 0 and 1. Use it to control creativity.            |

## SUPERGPT\_TABLE function

Like SUPERGPT, but outputs the results in a table. Very practical when the output is a table

<Frame>
  <img src="https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/GPTFunction/SUPERFPT_TABLE.png?fit=max&auto=format&n=tR1QsuikxI8kxuAE&q=85&s=007f593903f836182868e3c1e7e944bd" width="1470" height="489" data-path="images/GPTFunction/SUPERFPT_TABLE.png" />
</Frame>

**How to use**

| Syntax             | =SUPERGPT\_TABLE(prompt, \[head], \[inputs], \[temperature])                              |
| ------------------ | ----------------------------------------------------------------------------------------- |
| Copy/paste example | `=SUPERGPT_TABLE("top 10 most eaten fruits and their nutrition data", A1:D1, A2:A5, 0.8)` |
| Output             | The response to your prompt in the shape of a table                                       |

**Parameters**

| Parameter                | Definition                                                                                                                                                                                            |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| prompt (cannot be empty) | Instruction to generate a table. <br /> The prompt parameter can be: <br /> - A string: `"top 10 most eaten fruits and their nutrition data"` <br /> - A cell: `A1` <br /> -A range of cells: `A1:C3` |
| head (optional)          | 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.                        |
| inputs (optional)        | Range containing partial rows to complete with SUPERGPT\_TABLE                                                                                                                                        |
| temperature (optional)   | temperature is a number between 0 and 1. Use it to control creativity.                                                                                                                                |

## SUPERGPT\_EDIT function

Applies the given task to the given text. The default task is to fix grammar and spelling.

<Frame>
  <img src="https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/GPTFunction/Supergpt_edit.png?fit=max&auto=format&n=tR1QsuikxI8kxuAE&q=85&s=d622b29eba394cd1f126900dcbb94a00" width="1627" height="213" data-path="images/GPTFunction/Supergpt_edit.png" />
</Frame>

**How to use**

| Syntax             | =SUPERGPT\_EDIT(text, \[task], \[temperature])                                        |
| ------------------ | ------------------------------------------------------------------------------------- |
| Copy/paste example | `=SUPERGPT_EDIT("It is to cold in hear.", "Fix spelling and grammar mistakes.", 0.8)` |
| Output             | The edited text in a single cell                                                      |

**Parameters**

| Parameter              | Definition                                                                                                                                                                                                                            |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| text (cannot be empty) | Input text to edit. <br /> The text parameter can be: <br /> - A string: `"It is to cold in hear."` <br /> - A cell: `A1` <br /> -A range of cells: `A1:C3`                                                                           |
| task (cannot be empty) | Text, cell or range specifying how the text should be edited. Defaults to fixing grammar and spelling. Other examples: <br /> - "Make it funnier" <br /> - "Make it shorter" <br /> - "Make it sound formal" <br /> - "Add an ending" |
| temperature (optional) | temperature is a number between 0 and 1. Use it to control creativity.                                                                                                                                                                |

## SUPERGPT\_TAG function

Applies user-defined tags to text or automatically suggests relevant tags if none are specified.

<Frame>
  <img src="https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/GPTFunction/supergpt_tag.png?fit=max&auto=format&n=tR1QsuikxI8kxuAE&q=85&s=cbf28295b5e44efeb1568b9500e46e83" width="1982" height="493" data-path="images/GPTFunction/supergpt_tag.png" />
</Frame>

**How to use**

| Syntax             | =SUPERGPT\_TAG(value, \[tags], \[examples], \[top\_k], \[temperature]) |
| ------------------ | ---------------------------------------------------------------------- |
| Copy/paste example | `=SUPERGPT_TAG("I love chocolate", "food, positive, negative")`        |
| Output             | The applicable tags as csv in a single cell                            |

**Parameters**

| Parameter               | Definition                                                                                                                                            |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| value (cannot be empty) | Input text to tag. <br /> The value parameter can be: <br /> - A string: `"I love chocolate"` <br /> - A cell: `A1` <br /> -A range of cells: `A1:C3` |
| tags (optional)         | Comma-separated tags or range of tags applicable. If left empty, SUPERGPT\_TAG will automatically come up with the tags                               |
| top\_k (optional)       | Maximum number of tags to return                                                                                                                      |
| examples (optional)     | A table of examples in two columns. The first column should contain the inputs and the second column should contain the outputs.                      |
| temperature (optional)  | temperature is a number between 0 and 1. Use it to control creativity.                                                                                |

## SUPERGPT\_CLASSIFY function

Classifies a given text into a single category.

<Frame>
  <img src="https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/GPTFunction/supergpt_classify.png?fit=max&auto=format&n=tR1QsuikxI8kxuAE&q=85&s=26c173df5892c7155256fd5320716622" width="1984" height="404" data-path="images/GPTFunction/supergpt_classify.png" />
</Frame>

**How to use**

| Syntax             | =SUPERGPT\_CLASSIFY(value, categories, \[examples], \[temperature]) |
| ------------------ | ------------------------------------------------------------------- |
| Copy/paste example | `=SUPERGPT_CLASSIFY("banana", "fruit, vegetable")`                  |
| Output             | The best applicable category                                        |

**Parameters**

| Parameter                    | Definition                                                                                                                                       |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| value (cannot be empty)      | Input text to classify. <br /> The value parameter can be: <br /> - A string: `"banana"` <br /> - A cell: `A1` <br /> -A range of cells: `A1:C3` |
| categories (cannot be empty) | Comma-separated categories or range of categories to choose from. Only the most relevant category will be returned.                              |
| examples (optional)          | A table of examples in two columns. The first column should contain the inputs and the second column should contain the outputs.                 |
| temperature (optional)       | temperature is a number between 0 and 1. Use it to control creativity.                                                                           |

## SUPERGPT\_EXTRACT function

Extracts data (like email addresses or company names) from a text. Outputs as comma-separated values.

<Frame>
  <img src="https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/GPTFunction/supergpt_extract.png?fit=max&auto=format&n=tR1QsuikxI8kxuAE&q=85&s=31c38e491d9143cdbe843ac64c4d44c2" width="1667" height="495" data-path="images/GPTFunction/supergpt_extract.png" />
</Frame>

**How to use**

| Syntax             | =SUPERGPT\_EXTRACT(text, to\_extract, \[temperature])                                        |
| ------------------ | -------------------------------------------------------------------------------------------- |
| Copy/paste example | `=SUPERGPT_EXTRACT("I worked 5 years at Amazon.com and then 3 years at Apple", "companies")` |
| Output             | The extracted entities as comma-separated values in a single cell                            |

**Parameters**

| Parameter                     | Definition                                                                                                                                                                                                 |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| text (cannot be empty)        | Input text to extract data from. <br /> The text parameter can be: <br /> - A string: `"I worked 5 years at Amazon.com and then 3 years at Apple"` <br /> - A cell: `A1` <br /> -A range of cells: `A1:C3` |
| to\_extract (cannot be empty) | Text, cell or horizontal range specifying what you want to extract. Examples: <br /> - `"companies"` <br /> - `B3:E3`                                                                                      |
| temperature (optional)        | temperature is a number between 0 and 1. Use it to control creativity.                                                                                                                                     |

## SUPERGPT\_SUMMARIZE function

Summarizes text according to a given format (three sentences by default).

<Frame>
  <img src="https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/GPTFunction/supergpt_summarize.png?fit=max&auto=format&n=tR1QsuikxI8kxuAE&q=85&s=f86c6e8cf3ad6604cbe099a5412970ef" width="1666" height="644" data-path="images/GPTFunction/supergpt_summarize.png" />
</Frame>

**How to use**

| Syntax             | =SUPERGPT\_SUMMARIZE(text, \[format], \[temperature])                                                                                                                                                                                             |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Copy/paste example | `=SUPERGPT_SUMMARIZE(A2:A10, “10 words or less”)`                                                                                                                                                                                                 |
| Output             | Returns a summary of the input text in the format specified. Note - If selecting to summarize a range of cells, the output will be a summary for each individual cell of the selected range, not a single summary of all cells included in range. |

**Parameters**

| Parameter              | Definition                                                                                                                                                   |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| text (cannot be empty) | Input text to summarize. <br /> The text parameter can be: <br /> - A string: `"Some long content"` <br /> - A cell: `A1` <br /> -A range of cells: `A1:C3`  |
| format (optional)      | Format of the summary. Examples: <br /> - `"key takeaways"` <br /> - `"action items"` <br /> - `"two paragraphs"` <br /> - `"100 words"` <br /> - `"tweets"` |
| temperature (optional) | temperature is a number between 0 and 1. Use it to control creativity.                                                                                       |

## SUPERGPT\_TRANSLATE function

Translates text from one language into another. Works better if you specify the source language.

<Frame>
  <img src="https://mintcdn.com/superjoin/tR1QsuikxI8kxuAE/images/GPTFunction/supergpt_translate.png?fit=max&auto=format&n=tR1QsuikxI8kxuAE&q=85&s=9ff67f7f5bb4b4d748218010e6f459b0" width="1604" height="368" data-path="images/GPTFunction/supergpt_translate.png" />
</Frame>

**How to use**

| Syntax             | =SUPERGPT\_TRANSLATE(text, \[target\_language], \[source\_language], \[instructions],\[temperature]) |
| ------------------ | ---------------------------------------------------------------------------------------------------- |
| Copy/paste example | `=SUPERGPT_TRANSLATE("Cool off with our delicious treats!", "spanish")`                              |
| Output             | The requested translation in a single cell                                                           |

**Parameters**

| Parameter                   | Definition                                                                                                                                                                    |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| text (cannot be empty)      | Input text to translate. <br /> The text parameter can be: <br /> - A string: `"Cool off with our delicious treats!"` <br /> - A cell: `A1` <br /> -A range of cells: `A1:C3` |
| target\_language (optional) | Language of the output. Examples: "spanish", "chinese", "french". Defaults to "english".                                                                                      |
| source\_language (optional) | Language of the input. Example: "english"                                                                                                                                     |
| instructions (optional)     | Additional instructions for the translation. Can include a dictionary of translations.                                                                                        |
| temperature (optional)      | temperature is a number between 0 and 1. Use it to control creativity.                                                                                                        |

## FAQs for SUPERGPT\_ Functions

<AccordionGroup>
  <Accordion title="Is there a token (or character) limit for SUPERGPT functions?">
    Yes, to ensure that SUPERGPT can provide a sufficient response, we have set a character limit of 2k tokens. This is about 8k characters for the prompt.
  </Accordion>

  <Accordion title="Do I need to have Superjoin open for SUPERGPT functions to work?">
    For SUPERGPT Functions to calculate, you will need to open the Superjoin sidebar at least once.
  </Accordion>

  <Accordion title="Who can use the SUPERGPT functions in my spreadsheet?">
    Anyone with Editor (Google Sheets Permissions) can use the SUPERGPT functions, however - all the usage will incur on the owner of the spreadsheet who first launched Superjoin.
  </Accordion>

  <Accordion title="Will SUPERGPT functions recalculate when I reload my sheet?">
    The SUPERGPT functions, similar to Google Sheet formulas, recalculate when you reload the sheet. To avoid these recalculations affecting your usage limits, you can use the button "Convert Formulas to Values" on Superjoin.
  </Accordion>
</AccordionGroup>
