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

Run Proxied Nango API Calls and Write Results to a Google Sheet

2026-05-14
5 min read

The Scenario

You're a data engineer and you're three hours into building a usage report when you hit the wall. You need contact counts from HubSpot for 30 different customer connections — each one managed in Nango. Getting those counts means making a proxied API call for each connection, and you have the connection IDs and provider config keys in a spreadsheet, but no clean way to loop through them and write results back without writing a script.

This isn't a one-time report. It runs monthly. And the person who asked for it has already asked twice why last month's version took three days to produce.

The bad version:

  • Write a Python script that reads the spreadsheet, iterates the rows, calls the Nango proxy endpoint for each connection, extracts the contact count from the HubSpot response, and writes it back to the correct cell
  • Handle authentication errors for connections that have expired or been revoked mid-run
  • Debug the 6 rows where the response schema was slightly different from what you expected and the count extraction fails

By the time the script works reliably, you've spent longer writing it than the report itself will take to review.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your Google Sheet. It reads your connection data and uses Nango's proxy to make authenticated API calls on your behalf. Launch SheetXAI from the sidebar and run this prompt.

For each row in my sheet with a Nango connection_id in column A and provider_config_key in column B, use the Nango proxy to GET /contacts/v1/lists/all/contacts/all and write the total contact count into column C

What You Get

  • SheetXAI iterates every row in sequence
  • For each row: uses the connection_id and provider_config_key to make a proxied GET request through Nango to HubSpot
  • Extracts the total contact count from the response
  • Writes the count into column C
  • Rows where the proxy call fails (expired connection, rate limit, wrong endpoint) get an error note in column C so you know exactly which ones need attention

What If the Data Is Not Quite Ready

Some connections have been revoked and should be flagged before making API calls

For each row in my sheet, first verify the Nango connection in column A is still valid — write INVALID in column C and skip the proxy call for any that aren't; for valid connections, proxy GET /contacts/v1/lists/all/contacts/all and write the contact count in column C

You need to pull multiple metrics per connection, not just contact count

For each row in my sheet with a connection_id in column A and provider_config_key in column B, use the Nango proxy to call HubSpot and write the total contact count in column C and the total deal count from /deals/v1/pipelines in column D

The endpoint path differs by provider — some rows use HubSpot, others use Salesforce

For each row in my sheet, use the provider_config_key in column B to determine which endpoint to call via Nango proxy — if it says hubspot, GET /contacts/v1/lists/all/contacts/all; if it says salesforce, GET /services/data/v55.0/query?q=SELECT+COUNT()+FROM+Contact; write the result count in column C for each row

Validate connections, make proxied calls for valid ones, write counts, and flag any connection where the count dropped more than 20% since last month

For each row with a connection_id in column A, verify the connection is active and proxy GET the contact count from HubSpot into column C; then compare column C to the previous month count in column D — write FLAG in column E for any row where the new count is more than 20% lower than the previous count, and OK otherwise

One prompt that validates, fetches, and runs the comparison logic in a single pass.

Try It

Get the 7-day free trial of SheetXAI and open the Google Sheet with your Nango connection IDs, then ask it to proxy the API calls and write the results. For setup context, see how to export your full connection inventory or bulk-import credentials as connections if you're still migrating to Nango.

Stop memorizing formulas.
Tell your spreadsheet what to do.

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

Learn more