Celiq for Sheets
Query your governed metrics from inside Google Sheets with the =CELIQ() function.
Why use it: Type
=CELIQ("what was CAC last month?") in any cell and get the governed value โ the same number Orion would answer, not a hand-rolled SQL guess.Where to find it: Manual install via Apps Script (Developer Preview). A Google Workspace Marketplace listing is coming soon.
Who can use it: Anyone with a Celiq API key. The add-on respects the same permissions as your key.
Celiq for Sheets brings your semantic layer into the spreadsheet you already live in. Instead of exporting CSVs or rebuilding metrics by hand, you ask a question in plain English and Celiq returns the governed answer โ backed by the same reveals, definitions, and freshness checks that power Orion and Discover.
The add-on is built on Google Apps Script, so there is nothing to install on your machine and no browser extension required. It calls the Celiq REST API behind the scenes and drops the resulting value straight into your cell.
How it works
When you type =CELIQ("your question here") into a cell, the add-on:
- Sends your question to the Celiq value endpoint,
POST /api/v1/value, authenticated with your API key. - Routes through Orion โ the question runs through the same answer pipeline as the rest of Celiq, so it uses your governed reveals and definitions.
- Extracts the primary value โ Celiq strips Orion's prose and returns just the numeric value (and a formatted version) suitable for a spreadsheet cell.
- Writes the result into the cell. The formula stays live, so you can copy it, reference it in other formulas, and refresh it whenever you need fresh numbers.
Because the value comes from your semantic layer, the number in your spreadsheet is the same number your team sees in Discover, Mosaics, and Slack. There is one definition of CAC, and it lives in your reveals โ not in a forgotten tab.
Installation (Developer Preview)
Celiq for Sheets is currently available as a manual install.
A Google Workspace Marketplace listing is coming soon.
Manual install (available now)
Open Apps Script
Open any Google Sheet. Go to Extensions โ Apps Script. Delete any existing code in the editor.
Paste the Celiq function
Paste the following code:
function CELIQ(question) {
var apiKey = PropertiesService.getUserProperties()
.getProperty('CELIQ_API_KEY');
if (!apiKey) {
return 'Set your API key first: Extensions โ Celiq โ Settings';
}
var response = UrlFetchApp.fetch('https://app.celiq.co/api/v1/value', {
method: 'post',
contentType: 'application/json',
headers: { 'Authorization': 'Bearer ' + apiKey },
payload: JSON.stringify({ question: question, format: 'number' })
});
var data = JSON.parse(response.getContentText());
return data.value || data.text || 'No value found';
}
Save and name the project
Click Save (the floppy-disk icon). Name the project Celiq when prompted.
Return to your sheet
Go back to your spreadsheet. In any cell, type =CELIQ("what was revenue last week?"). On first run, approve the permission prompt that appears.
Set your API key
Before your first query, set your Celiq API key:
- Get your API key from app.celiq.co/lumen under API Access.
- In Apps Script, go to Project Settings โ Script Properties.
- Add a property: key =
CELIQ_API_KEY, value = your key.
The key is stored in Google's secure per-user property store โ it is never written into the spreadsheet itself, so it is safe to share the sheet with teammates.
Marketplace listing
We're working on a one-click install via the Google Workspace Marketplace. Once published, installation will be available directly from Extensions โ Add-ons โ Get add-ons โ no manual setup required.
Get your API key
The add-on authenticates with a standard Celiq API key โ the same kind used by the REST API.
- Open Celiq and go to app.celiq.co/lumen under API Access.
- Click New key, give it a descriptive name (for example, "Finance โ Google Sheets"), and choose its scope.
- Copy the key immediately โ it is shown only once.
- Add it as a Script Property
CELIQ_API_KEYin Apps Script (see Set your API key above).
Keys are workspace-scoped and inherit that key's permissions, Data Keys, and Data Gates. A value returned in Sheets reflects exactly what the key's owner is allowed to see.
Usage
The add-on adds one custom function: CELIQ.
=CELIQ("what was revenue last month?")Some examples:
=CELIQ("what was CAC last month?") โ 38.5
=CELIQ("total revenue this quarter") โ 1284000
=CELIQ("return rate for the last 30 days") โ 0.072
=CELIQ("how many new customers in May?") โ 1240You can reference the result like any other cell value:
=CELIQ("revenue this month") / CELIQ("revenue last month") - 1What the endpoint returns
Under the hood the function calls POST /api/v1/value, which returns a Sheets-optimised payload:
{
"value": 38.50,
"formatted": "$38.50",
"label": "CAC",
"period": "last_month",
"reveal": "orders_customers",
"freshness": "2026-06-12"
}By default the function writes the numeric value into the cell so it can participate in further math. If the question has no extractable number, Celiq returns a short text answer instead, and the cell shows that text.
Supported question types
Celiq for Sheets works best with questions that resolve to a single metric value:
- A metric over a period โ "what was revenue last month?", "CAC this quarter"
- A count โ "how many orders yesterday?", "new customers in May"
- A rate or ratio โ "return rate last 30 days", "conversion rate this week"
- A comparison expressed as one number โ "revenue change vs last month"
Questions that naturally produce a table (for example, "revenue by channel") return only the primary or first numeric value. For multi-row results, use the REST API POST /query endpoint, or build a Mosaic and reference it there.
Refresh values
Custom-function results recalculate when the formula's inputs change, but a question like "revenue last month" has no spreadsheet inputs โ so the value will not auto-refresh on its own. To pull fresh numbers:
- Open Celiq โ Refresh all Celiq cells to force every
=CELIQ()formula in the workbook to recalculate. - Or edit and re-enter an individual formula to refresh just that cell.
The freshness field returned by the API tells you the date of the underlying data, so you always know how current a number is.
Rate limits
The add-on shares the rate limits of your API key. Each call to =CELIQ() is one request to POST /api/v1/value, and requests are limited per API key. If you have a large grid of formulas, use Refresh all Celiq cells sparingly rather than recalculating constantly. If you hit the limit, requests return a 429 and the cell shows a rate-limit message; wait a moment and refresh again.
A spreadsheet with hundreds of =CELIQ() cells will issue hundreds of API calls on a full refresh. For dashboards that need many values at once, build a Mosaic in Celiq and pull from there, or query POST /query once and lay the results out yourself.
Limitations
- One value per cell โ
=CELIQ()returns a single value (or a short text answer), not a range or table. - No auto-refresh on a schedule โ values refresh on demand via the Celiq menu or by re-entering the formula.
- Permission-bound โ results never exceed what the API key is allowed to see; a question outside the key's reveals may return no value.
- Question quality matters โ vague questions ("how are we doing?") may not resolve to a number. Be specific about the metric and the period.
Related
| Goal | Guide |
|---|---|
| Use the full REST API | API reference |
| Bring existing definitions into Celiq | Import from Looker or dbt |
| Understand reveals and the semantic layer | Forge |
| Ask questions inside Celiq | Orion |