Use Exa inside Google Sheets to research the web, generate tables, and fill missing data.
Install the add-on from the Google Workspace Marketplace.
This repo contains the Google Apps Script code for the Exa AI Google Sheets add-on.
- Generate full research tables from one prompt
- Fill blank cells in an existing table
- Continue a table by adding new rows
- Use
=EXA(...)formulas for quick one-cell answers - Refresh many Exa formula cells at once
- Convert Exa formulas to normal values
The easiest way is to install the public add-on:
- Open the Exa AI add-on in the Google Workspace Marketplace.
- Click Install.
- Open a Google Sheet.
- Go to Extensions -> Exa AI -> Open Sidebar.
- Add your Exa API key from the Exa dashboard.
You are ready to use Exa in Google Sheets.
Exa Agent is the easiest way to use Exa in Sheets.
Open the sidebar, then go to Exa Agent.
Use Generate table when you want Exa to create a new table.
Example prompt:
Find top 40 AI companies and return company name, website URL, CEO, founding date, headquarters, and a short description.
Exa researches the web and writes the table into your sheet.
By default, the table starts at your selected cell. You can choose another start cell in More options.
Use Fill cells when you already have a table and want Exa to fill missing data.
- Select blank cells in your sheet.
- Open Exa Agent.
- Choose Fill cells.
- Click Fill selected cells.
Exa uses the table around your selection as context.
You can also select blank rows under a table. Exa will try to continue the table with new rows that match the same columns.
Use =EXA(...) when you want one answer in one cell.
=EXA("Return only the CEO name", A2)
The second value, like A2, is the context. You can drag the formula down a column to run it for many rows.
More examples:
=EXA("Return only the company website URL", A2)
=EXA("Return only the headquarters", A2)
=EXA("Return only the LinkedIn URL", A2)
Use Batch when you want to work with many Exa formula cells at once.
Batch can:
- refresh selected cells with Exa formulas
- convert selected Exa formulas into normal values
Convert formulas to values when you want to keep the current results and stop the formulas from running again.
The add-on also includes lower-level custom functions:
| Function | What it does |
|---|---|
EXA(prompt, context) |
Simple one-cell enrichment |
EXA_SEARCH(query, ...) |
Search the web and return URLs |
EXA_ANSWER(prompt, ...) |
Ask Exa for an answer |
EXA_CONTENTS(url) |
Get page content from a URL |
EXA_FINDSIMILAR(url, ...) |
Find pages similar to a URL |
Most users should start with Exa Agent or =EXA(...).
This project uses Google Apps Script and clasp.
- Node.js 14 or newer
- A Google account
- An Exa API key
Install dependencies:
npm ciLog in to Google:
npm run loginCreate a new Apps Script project:
npm run createPush the local files to Apps Script:
npm run pushRun tests:
npm testIf you do not want to use clasp, you can copy the files manually.
- Open a Google Sheet.
- Go to Extensions -> Apps Script.
- Copy
Code.gsinto the Apps ScriptCode.gsfile. - Create an HTML file named
Sidebar.html. - Copy
Sidebar.htmlfrom this repo into that file. - Save the project.
- Refresh the Google Sheet.
- Go to Extensions -> Exa AI -> Open Sidebar.
- Add your Exa API key.
For normal use, install the Marketplace add-on instead.
Code.gs- Apps Script backend, custom functions, Exa API calls, and sheet writesSidebar.html- sidebar UI for Settings, Exa Agent, and Batchappsscript.json- Apps Script manifest and OAuth scopes__tests__/- Jest testsscripts/bump-version.js- version bump helper
made with ❤️ by exa