The Scenario
You ran a deduplication audit. It took three days. You have a Google Sheet with 45 OneDesk ticket IDs in column A, each one confirmed as a duplicate that needs to be removed. Column B has one of two values: "delete" or "keep". The "keep" rows are the canonical versions — the ones that stay. The "delete" rows are the duplicates.
Your helpdesk administrator handed you the sheet and said: "These are good to go. Just make sure nothing marked keep gets touched."
The bad version:
- Open OneDesk and search for the first ticket ID in column A
- Verify column B says "delete" before doing anything
- Delete the ticket, confirm the deletion dialog
- Go back to the spreadsheet, note what happened in column C, move to the next row
- At row 12, realize you deleted something that was marked "keep" because you were looking at the wrong row
Forty-five deletions. One wrong move and you have deleted a canonical ticket that someone spent three days deciding to preserve. The audit trail that justifies each deletion lives in column B. You need column C to record the outcome so there's a log of what was done.
The stakes are high enough that nobody wants to do this by hand.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Google Sheet. It reads the ticket IDs, checks the keep/delete flag for each row, acts accordingly, and logs the outcome per row.
Delete every OneDesk ticket whose ID is in column A of this sheet where column B says "delete". Skip any row where column B says "keep". Write "deleted" or "skipped" into column C for every row.
The keep flag is honored. The outcome is logged. Nothing happens to a row that isn't explicitly marked for deletion.
What You Get
- Every ticket marked "delete" removed from OneDesk
- Every ticket marked "keep" untouched
- Column C populated with "deleted" or "skipped" for every row
- Any deletion that fails logged with the error message instead of silently dropped
What If the Data Is Not Quite Ready
You want to log the HTTP response status, not just deleted/skipped
Your administrator wants to review the raw API responses, not just a summary label.
Go through the Stale Tickets sheet and attempt to delete each OneDesk ticket ID in column A where column B says delete. Skip rows where column B says keep. Write the HTTP response status code into column C for each attempt so failures are distinguishable from successes.
Some IDs in column A have leading or trailing whitespace from the export
The CSV export added spaces around some IDs. OneDesk lookups are failing for those rows.
Delete OneDesk tickets from column A where column B says delete. Trim any whitespace from the ticket IDs before submitting. Skip rows where column B says keep. Write "deleted", "skipped", or the error into column C.
A third outcome is possible — some tickets were already deleted by someone else
The audit took three days. A few duplicates may have already been removed manually. You need those distinguished from errors.
Delete OneDesk tickets in column A where column B says delete. Skip rows where column B says keep. Write the outcome into column C: "deleted" if successful, "skipped" if keep, "already deleted" if the API returns 404, or the error message for any other failure.
Full safe-deletion pass with whitespace cleanup, three-state outcome, and summary
Go through the Stale Tickets sheet. For each row where column B says delete: trim whitespace from the ticket ID in column A, attempt deletion in OneDesk. For rows where column B says keep, write "skipped" into column C and move on. Outcomes in column C: "deleted", "skipped", "already deleted" for 404s, or the error message for anything else. After all rows, write a summary at the top of the sheet showing total deleted, skipped, already-deleted, and failed.
The audit trail is complete. The log exists. No canonical ticket was touched.
Try It
Get the 7-day free trial of SheetXAI and open the cleanup audit sheet from your last deduplication pass — tell it to run the deletions, honor the keep flags, and write the outcome log. Also worth reading: how to bulk-create tickets from a migration sheet, and the hub overview of all four methods for connecting OneDesk to Google Sheets.
