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

Create GoSquared Smart Groups From Segment Definitions in a Google Sheet

2026-05-13
4 min read
See the Excel version →

The Scenario

You are a CRM analyst. You have a Google Sheet with 8 segment definitions — each row has a name, a filter property, an operator, and a value. These are the audience segments your marketing team approved last week: "Enterprise Trial Users," "Churned Last 30 Days," "High Event Count Free Tier," and five others.

Someone has to turn these 8 rows into 8 GoSquared Smart Groups. That someone is you. The GoSquared UI lets you create one Smart Group at a time, manually entering filter criteria through a form for each one.

The slow version:

  • You open GoSquared, navigate to Smart Groups, click "Create New"
  • You enter the name from row 1, set the filter property, pick the operator from a dropdown, type the value
  • You save, go back, click "Create New" again
  • Row 4 has a compound filter — two conditions with AND — and the UI form only lets you add one at a time
  • You get through five groups, realize you named row 3 wrong, go back and fix it, lose your place
  • An hour later you have 6 of 8 groups created and a meeting in ten minutes.

The fast version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your spreadsheet that creates GoSquared Smart Groups from your sheet data through the API, so you do not have to click through the GoSquared form eight times.

Open the SheetXAI sidebar and type:

Create GoSquared Smart Groups from this sheet: column A is the group name, column B is the filter property, column C is the operator, column D is the filter value. Create all 8 groups and write the resulting GoSquared Smart Group ID into column E for each row.

SheetXAI reads all 8 rows, calls the GoSquared Smart Groups API once per row, and writes the group IDs back to the sheet as confirmation. Eight groups created, eight IDs logged, without touching the GoSquared UI.

What You Get

Eight Smart Groups created in GoSquared, with a confirmation record in the sheet:

  • 8 Smart Groups created, one per row, with the names, properties, operators, and values from the sheet
  • Smart Group ID column — the GoSquared ID for each group written back to column E
  • No form-clicking — the UI-only process replaced by one prompt

The IDs in column E matter later. When you need to export the members of these groups or reference them in a downstream operation, you already have the IDs in the sheet without having to look them up.

What If the Data Is Not Quite Ready

Segment definition sheets are rarely in a form the API accepts without some interpretation.

When the operator values use human-readable names instead of API values

The sheet uses operators like "is equal to" and "is greater than," but GoSquared's API expects "eq" and "gt."

Before creating each Smart Group, translate the operator in column C from human-readable format to GoSquared API format: 'is equal to' → 'eq', 'is not equal to' → 'neq', 'is greater than' → 'gt', 'is less than' → 'lt', 'contains' → 'contains'. Then create all 8 Smart Groups and write the IDs into column E.

When some rows have compound filters

Rows 5 and 6 each need two filter conditions joined with AND — the sheet has the second condition in columns F and G.

Create GoSquared Smart Groups from this sheet. For rows where column F has a value, combine the filter from columns B–D with a second filter from columns F–G using AND logic. For rows where column F is blank, create a single-filter Smart Group. Write the group ID into column H for each row.

When you want to verify each group was created correctly

After creating the groups, you want to read them back from GoSquared to confirm the filter criteria were saved as expected.

Create GoSquared Smart Groups from this sheet: name in column A, filter property in column B, operator in column C, value in column D. After creating all 8, fetch each group back from GoSquared by ID and write the confirmed filter description into column F. If the confirmed filter does not match the definition in columns B–D, write 'MISMATCH' in column F instead.

When the list changes and you need to create new groups and skip existing ones

You have run this before. Groups 1–5 already exist. Only rows 6–8 need to be created.

Check whether each Smart Group name in column A already exists in GoSquared. If it does, write the existing group ID in column E and skip creation. If it does not, create the Smart Group and write the new ID in column E. Process all 8 rows.

The pattern: define the segments in the sheet, create them in GoSquared, confirm the IDs. One prompt replaces the entire UI workflow.

Try It

Get the 7-day free trial of SheetXAI and ask it to create GoSquared Smart Groups from any sheet of segment definitions. The GoSquared integration is included in every SheetXAI plan. See also how to export Smart Group members into a sheet or the GoSquared in Google Sheets overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

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

Learn more