The Scenario
Your IT team just got a request from the CISO: produce an audit of every Hex workspace user, flag anyone who hasn't logged in for 60 or more days, and deliver the list in an Excel workbook by end of week so IT can review candidates for deactivation. There are 80 users in the workspace.
Nobody wrote a user report when Hex was first rolled out. There is no existing export. There is a Hex API.
The bad version:
- Find the Hex API documentation for the users endpoint.
- Write a script to authenticate, paginate through all 80 users, extract name, email, role, and last login date.
- Calculate days since last login for each user, apply the 60-day flag, sort the results, paste them into the workbook.
You are a data platform admin, not a backend developer. Building a one-off audit script is the kind of task that gets estimated at two hours and takes two days once you factor in authentication debugging and pagination edge cases.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Excel workbook. It reads the workbook structure and talks to the Hex API — including the users endpoint — to pull the data you need and apply whatever logic you specify.
Open the SheetXAI sidebar and paste this prompt:
List all Hex workspace users and write their name, email, role, and last login date into my sheet — one user per row.
SheetXAI calls the Hex API, handles pagination across all 80 users, and writes the four fields into your workbook with headers in row 1.
What You Get
- Column A: display name.
- Column B: email address.
- Column C: workspace role — admin, member, viewer, or whatever the Hex API returns for this workspace.
- Column D: last login date in ISO 8601 format.
- All 80 users, no pagination logic on your end.
What If the Data Is Not Quite Ready
You need the 60-day flag applied inline
The CISO wants the deactivation candidates clearly marked in the workbook — not a separate filter step after the export.
Fetch all Hex users, calculate days since last login for each, flag anyone with more than 60 days inactive in column E as "Review for Deactivation", and sort by days inactive descending.
You only want admin-level users
For a different audit pass, the team wants to see only users with admin roles — not the full member list.
List all Hex workspace users and write only those with admin roles into my sheet — include name, email, and last login date.
You need to cross-reference against an HR offboarding list
Column A of the "Offboarded" worksheet has email addresses of employees who left the company in the last 90 days. You want to flag any Hex user whose email appears on that list.
List all Hex workspace users and write name, email, and role into columns A through C of my sheet. For each user, check the Offboarded worksheet column A. If the email matches, write "Offboarded — deactivate" in column D. Otherwise leave column D blank.
Full audit: pull users, calculate inactivity, cross-reference offboarded list, and sort by risk in one pass
You want every user, days since last login, the 60-day flag, the offboarding cross-reference, and the results sorted so the highest-risk accounts are at the top of the workbook — ready to hand to the CISO without any manual sorting.
Fetch all Hex workspace users. Calculate days since last login and write into column E. Flag "Review — 60+ days inactive" in column F for anyone over the threshold. Cross-reference each email against the Offboarded worksheet column A and write "Offboarded" in column G if matched. Sort the output by column E descending. Write all results starting from row 2 with headers in row 1.
One prompt produces an audit-ready workbook rather than a raw data dump you'd need to annotate by hand.
Try It
Get the 7-day free trial of SheetXAI and open a blank Excel workbook, then ask it to pull your Hex user directory and apply whatever flags or cross-references your IT team needs. For a related governance workflow, see Export Hex Collections and Sharing Settings Into an Excel workbook or the Hex integration overview.
