Back to Hex in Google Sheets
SheetXAI logo
Hex logo
Hex · Google Sheets Guide

Trigger a Hex Project Run From a Google Sheet and Write Back the Status

2026-05-14
5 min read

The Scenario

It's Thursday morning, 8:40 AM. You run a weekly revenue attribution Hex project — it joins three warehouse tables, applies a model, and produces the numbers finance uses for the Friday board pack. The project runs fine in Hex. The problem is that you're not the one who needs to confirm it ran.

Finance tracks the refresh status in a Google Sheet: project ID in column A, status in column B, run ID in column C. Every week, someone on your team runs the project in Hex, then goes back to the Sheet and manually types "completed" into column B and pastes in the run ID from the Hex URL.

The bad version:

  • Open Hex, find the project, click Run, wait for the progress bar to finish.
  • Copy the run ID from the browser URL or the run history panel.
  • Switch to the Google Sheet, find the right row, type the status string, paste the run ID.

This is a three-minute task that somehow eats fifteen minutes every week — between tab-switching, mistyped statuses, and the occasional confusion about which row the current run belongs to. You're a data analyst. The attribution model is the interesting part. The copy-paste ritual is not.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your Google Sheet that reads the data you're working with and talks to Hex on your behalf. You describe what you need and it handles the API calls, the polling, and the writebacks.

Open the SheetXAI sidebar and paste this prompt:

Trigger a run for the Hex project ID in cell A1, wait for it to complete, and write the run status and run ID into cells B1 and C1.

SheetXAI fires the run against the project ID it reads from A1, polls the Hex API until the run reaches a terminal state, and writes the status string and run ID into exactly the cells you named.

What You Get

  • B1 receives the run status as returned by the Hex API — typically "COMPLETED", "FAILED", or "ERRORED" — written the moment the run finishes.
  • C1 receives the run ID, which finance can use to confirm the exact run in Hex without needing Hex access.
  • If the run fails, the status is written as-is so the failure is visible in the Sheet rather than silently omitted.
  • The prompt is repeatable — next week, same row structure, same prompt.

What If the Data Is Not Quite Ready

The project ID is formatted inconsistently across rows

Some rows in column A have the full UUID, some have leading or trailing spaces, and one has a label like "Attribution v2 — abc123" instead of the bare ID.

Before triggering, read column A and extract the UUID from each cell — strip any whitespace and any label prefix before the last space. Then trigger the run for the cleaned project ID from A1 and write the status and run ID into B1 and C1.

There are multiple projects to run in sequence

The Sheet has project IDs in A1 through A5, each representing a different model that needs to run before Friday.

For each project ID in column A (rows 1 through 5), trigger a Hex run in order — do not start the next run until the previous one has completed. Write the status and run ID into columns B and C for each row.

The status column already has an entry from last week

Finance wants only this week's run reflected in the Sheet, but column B has "COMPLETED" from last Thursday and column C still has the old run ID.

Clear cells B1 and C1, then trigger the Hex project ID from A1, wait for it to finish, and write the new status and run ID back into B1 and C1.

Clean the project list, run all jobs, and summarize failures in one shot

Column A has 8 project IDs with inconsistent formatting. Some ran last week and have "COMPLETED" in column B. Only trigger the ones that are blank in column B, and after all runs finish, write a summary line in E1 counting how many succeeded and how many failed.

Strip whitespace from all values in column A. For each row where column B is empty, trigger the Hex project run. Wait for each run to complete before starting the next. Write the status and run ID into columns B and C. When all runs are done, write "X completed, Y failed" into cell E1.

The pattern: combine the cleanup, the conditional trigger, and the summary into a single ask — rather than running three separate prompts in sequence.

Try It

Get the 7-day free trial of SheetXAI and open the Google Sheet where you track Hex project runs, then ask it to trigger column A and write the results back. If you manage multiple weekly jobs, see also Batch-Update SQL Cells Across Hex Projects or return to the Hex integration overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more