Connect to OpenAI Assistants from Sheets and Excel
GPT for Sheets and GPT for Excel can connect to OpenAI Assistants, which provide a powerful way to customize OpenAI models for specific tasks.
To use an OpenAI Assistant:
Create an OpenAI Assistant
The following steps show how to create an Assistant from scratch. If you already have an Assistant, you can skip to Use an OpenAI Assistant in GPT for Work.
-
Log in to the OpenAI Platform.
-
Open the Assistants settings and click Create.
-
Configure the Assistant:
-
Name: Give your Assistant a name that describes its purpose.
-
System instructions: Provide detailed instructions for the Assistant's behavior and capabilities.
-
Model: Choose an appropriate model, for example
gpt-4o. Learn more.

-
-
If you want your Assistant to use specific files for reference, use the File search feature to attach them:
-
Enable File search and click Files.

-
In the file attachment screen, select the files and click Attach.

-
You have created the Assistant. You can now use the Assistant in GPT for Sheets and GPT for Excel.
Set an OpenAI API key for your space
G Sheets
MS Excel
-
Create an API key or request an API key from your AI provider platform admin. Learn more.
-
Sign in to the GPT for Work dashboard with your Google account.
-
In the sidebar, select API keys.
-
In the AI providers list, click the provider whose API key you want to set.

-
Set the API key:
-
In the text field, enter the key.
-
Click Check to verify that the key is valid.
-
Click Save.

-
-
Create an API key or request an API key from your AI provider platform admin. Learn more.
-
Sign in to the GPT for Work dashboard with your Microsoft account.
-
In the sidebar, select API keys.
-
In the AI providers list, click the provider whose API key you want to set.

-
Set the API key:
-
In the text field, enter the key.
-
Click Check to verify that the key is valid.
-
Click Save.

-
Select the OpenAI Assistant
G Sheets
MS Excel
Open a Google spreadsheet.
In the menu bar, select Extensions > GPT for Sheets and Docs > Open.

In the sidebar menu, select Bulk AI tools or GPT functions.
Expand the model switcher. You can find the Assistant under Use your API key or endpoint.

Select the Assistant.
GPT for Sheets now uses the Assistant to generate responses for bulk AI tools and GPT functions.
Open a Microsoft Excel workbook.
In the Home tab, click GPT for Excel Word.
infoYou can also select Home > Add-ins > My Add-ins > GPT for Excel Word.
In the sidebar menu, select Bulk AI tools or GPT functions.
Expand the model switcher. You can find the Assistant under Use your API key or endpoint.

Select the Assistant.
GPT for Excel now uses the Assistant to generate responses for bulk AI tools and GPT functions.