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

Bulk Delete Stale Nango Connections From a Google Sheet

2026-05-14
5 min read

The Scenario

Your platform team deactivated 75 customer accounts last month. The Nango connection IDs for those accounts are sitting in a spreadsheet column. The connections are still live in Nango, consuming space and showing up in your connection inventory. Someone from infrastructure flagged it in a Slack message this morning: clean these up before the next audit.

You've verified the list is correct. The task is mechanical but the volume is the problem.

The bad version:

  • Write a script to loop through the 75 connection IDs, call the Nango delete endpoint for each, handle errors, write results back to the sheet
  • Run it in staging first, realize the script breaks on row 18 because that connection ID has a trailing newline from a copy-paste
  • Fix it, run it in production, get 8 errors you have to manually investigate

What should be a 10-minute cleanup becomes a half-day affair of script iteration.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your Google Sheet. It reads your data and talks to Nango directly. With the connection IDs already in column A, launch SheetXAI from the sidebar and run this prompt.

Delete every Nango connection whose ID appears in column A of my sheet and write the deletion status (DELETED or ERROR) into column B for each row

What You Get

  • SheetXAI iterates every row in column A
  • For each connection ID: sends a delete request to Nango
  • Column B receives DELETED for successful deletions, ERROR with a reason for anything that fails (connection not found, permission error, etc.)
  • Every row accounted for — no silent skips, every error visible immediately

What If the Data Is Not Quite Ready

Some connection IDs in the list are duplicated and should only be deleted once

Delete each unique connection ID from column A in Nango — skip any duplicates after the first occurrence and write DUPLICATE SKIPPED in column B for those rows; write DELETED or ERROR for all other rows

You want to preview which connections would be deleted before actually deleting them

For each connection ID in column A, check if it exists in Nango and write EXISTS or NOT FOUND in column B — do not delete anything yet, just validate the list so I can review before proceeding

Some connections should be preserved — they're flagged in column B as KEEP

Delete each Nango connection in column A where column B does not say KEEP — write DELETED or ERROR in column C for processed rows, and PRESERVED in column C for any row where column B says KEEP

Validate the full list, skip invalid IDs, delete the rest, and write a summary of how many were cleaned up versus how many errored

First check each connection ID in column A against Nango — write NOT FOUND in column B for any that don't exist; for valid connections, delete them and write DELETED in column B; for any errors, write ERROR with the reason; then below the data write the total count deleted, total not found, and total errors

One prompt that validates, deletes, and summarizes without a second pass.

Try It

Get the 7-day free trial of SheetXAI and open the Google Sheet with your stale connection IDs, then ask it to bulk-delete the list from Nango. After cleanup, run an export of your remaining connection inventory to confirm the audit trail is clean.

Stop memorizing formulas.
Tell your spreadsheet what to do.

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

Learn more