A sales director I worked with wanted to know how many of our subscribers were for-profit vs. non-profit. Simple question. But we hadn't asked during sign-up, so the data wasn't there. The "easy" answer was to pay a service to append it. The expensive answer.

ZoomInfo is the go-to data appending service, and it's genuinely good. But sometimes you need data it doesn't offer,  and you don't want to pay for a full subscription to fill in a few fields. Like which insurance providers does a healthcare company work with? ZoomInfo won't have that.

Let's build it with Claude and a Google Apps Script. The script will take a list of companies and feed it into Claude's API to return what data we're looking for. We'll rank that on a confidence scale, and if confidence is low enough, we'll have Claude do some web searching to find it for us. 

What You'll Need

1. A Google Sheet (create a new one)

2. Google Apps Script (built into Google Sheets — no install required)

3. An Anthropic API key with access to claude-sonnet-4-6

How the Sheet Is Structured

The script uses two tabs:

Companies tab

Put company names in column A, starting at row 2. On the first run, the script writes headers and fills in everything else. You never need to touch columns B onward.

Research Fields tab

Each row defines one data point to look up, the expected format, and instructions for Claude.

The Companies tab is where your data lives after it's been appended. Claude also returns a confidence score for each result. High confidence means you can trust it and move on. Low confidence flags the rows worth a second look, so you're not chasing bad data downstream. Notes are added to a column explaining why the confidence is low.

How the Research Works

To stay within API rate limits and avoid running up token costs, the script takes two steps.

Step 1: Batched training data

Run Research processes companies in batches of five. Claude works from its training data and returns results for all five in a single response. No web search means no token bloat. 

Step 2: Web search, on demand

Once Run Research is complete, you can see which rows have low confidence scores. If you want Claude to go look those up on the web, run Research Low Confidence with Web Search. It takes all the rows marked with a low confidence score, runs a web search for each company, and tries to find the data you're looking for.

We run web searches only on low-confidence rows because web searches cost more tokens, running multiple in parallel costs even more, and you hit API limits fast. Step 1 won't cost as much and will get you solid results for well-known companies, Fortune 500s, major regional firms, and anything with a substantial web presence. For newer startups or less public companies, Claude's training data will be thinner; that's where the web search step earns its keep.

Running It

Subscribe to keep reading

This content is free, but you must be subscribed to Automation Almanac to continue reading.

Already a subscriber?Sign in.Not now

Keep Reading