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

Bulk Import Legacy Credentials Into Nango From a Google Sheet

2026-05-14
5 min read

The Scenario

You inherited 50 OAuth access tokens from a legacy integration layer that the team built two years ago. The tokens live in a spreadsheet. The connection IDs are in column A, the provider config keys are in column B, the access tokens are in column C. Nobody has touched this file in eight months. And the directive is: migrate all of it into Nango before the end of sprint.

You've read the Nango docs for adding connections via the API. You understand what needs to happen. The part you don't want to spend a week on is writing a script that loops through 50 rows, makes a POST request for each, handles errors gracefully, and writes the result status back to the sheet so you know which ones failed.

The bad version:

  • Write a Python script or curl loop to iterate the spreadsheet, POST to the Nango create connection endpoint for each row
  • Handle auth errors, malformed tokens, and provider-specific validation failures mid-loop with no visibility into which rows triggered which errors
  • Run it, get 11 errors, manually figure out which rows failed, fix them, re-run and pray you're not double-inserting the successful ones

Fifty rows sounds like a small number until you're debugging row 34 at 7 PM because the error message is "invalid_grant" and you don't know if that means the token is expired or the provider config key is wrong.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Google Sheet. It reads your spreadsheet and talks to Nango directly. Open the sheet with your legacy credentials, launch SheetXAI from the sidebar, and run this prompt.

For each row in my sheet with a connection_id in column A, provider_config_key in column B, and access_token in column C, add it as a connection in Nango and write the result status in column D

What You Get

  • SheetXAI iterates every row in sequence
  • For each row: sends a create connection request to Nango with the specified fields
  • Column D receives SUCCESS or ERROR for each row
  • Failed rows include the error reason so you know whether it's a bad token, an unknown provider key, or a Nango API issue
  • No row is skipped silently — every row gets a status

What If the Data Is Not Quite Ready

Some rows are missing a provider config key and should be skipped

For each row in my sheet with a connection_id in column A and access_token in column C, only process rows where column B has a non-empty provider config key — skip blank rows and write SKIPPED in column D for those

The connection IDs contain whitespace or formatting artifacts that need stripping first

Before adding connections to Nango, trim any leading or trailing whitespace from the connection_id values in column A and the provider_config_key values in column B, then process each row and write the result status in column D

Some tokens are expired and should be validated against a known expiry column before sending

For each row in my sheet, check if the date in column D is before today — if so, write EXPIRED in column E and skip that row; for all other rows, add the connection to Nango using columns A, B, and C, then write the Nango response status in column E

Clean expired rows, validate keys, bulk-import the valid ones, and summarize the results

Skip any row where column D shows an expiry date before today or column B is empty — write SKIPPED in column E for those; for all valid rows, add to Nango as connections and write SUCCESS or ERROR in column E; then in a Summary tab write the total count attempted, successful, and failed

One prompt that handles the pre-flight filtering and the import in one shot.

Try It

Get the 7-day free trial of SheetXAI and open the Google Sheet with your legacy credentials, then ask it to bulk-register the rows as Nango connections. Also see how to export your full connection inventory once the migration is done, or bulk-update connection metadata to tag them after import.

Stop memorizing formulas.
Tell your spreadsheet what to do.

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

Learn more