The Scenario
A product analyst just discovered that the post-purchase campaign sequence in MSG91 Segmento has been sitting idle for a month — not because it's misconfigured, but because nobody imported the historical purchase events that would trigger it. The data has been accumulating in an Excel workbook the whole time: 1,200 rows, user IDs in column A, product SKUs in column B, purchase amounts in column C, timestamps in column D. The events need to go into Segmento today so the campaign can start firing.
The bad version:
- Read the MSG91 Segmento API documentation to understand the create event payload format.
- Write a script that reads the workbook row by row, formats each event as the correct JSON structure, and posts it to the API.
- Discover that SKU and amount need to go into a nested
propertiesobject — restructure the script. - Run it, hit a 400 on row 7, debug.
That's a half-day engineering task. This wasn't supposed to require engineering.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Excel workbook. It reads every row and calls the MSG91 Segmento create event API for you — no script, no JSON formatting, no queue.
For each row in this sheet, create a user event in MSG91 Segmento using the user ID from column A, event type 'purchase' with the product SKU from column B and amount from column C as properties.
What You Get
- One Segmento event is created per row — user ID, event type, and all specified properties submitted in the correct payload format.
- Results are returned per row: success confirmation or the error code and reason for rows that fail to post.
- 1,200 rows are posted in a single pass, without managing pagination or a script loop.
What If the Data Is Not Quite Ready
Some user IDs are blank — skip those rows
For each row in this workbook where column A is not blank, create a user event in MSG91 Segmento with event type 'purchase', the product SKU from column B and amount from column C as properties, and write the result to column E.
The event name varies by row
For each row, create an MSG91 Segmento event using the user ID from column A, the event name from column B, and the JSON properties from column C — write the API response status to column D.
Timestamp needs to be included
For each row, create an MSG91 Segmento user event using the user ID in column A, event type 'purchase', the SKU from column B and amount from column C as properties, and the timestamp from column D — write the result to column E.
Deduplicate by user ID and SKU, then bulk-post — one prompt
Deduplicate this workbook by the combination of user ID in column A and SKU in column B keeping the row with the highest amount in column C, then for each remaining row create an MSG91 Segmento event with event type 'purchase' and the SKU and amount as properties, writing the result to column E.
The deduplication and the API posting happen in one instruction — no cleanup step, no separate tool.
Try It
Get the 7-day free trial of SheetXAI and open the workbook with your historical user events, then ask it to post them all to MSG91 Segmento so your campaign triggers can fire against real data. See the sibling spoke on exporting Segmento event types or return to the MSG91 hub.
