How To Enrich Data In A Google Sheets Spreadsheet With Diffbot

You’ve done your research—or at least, you’ve started by listing companies or people that you’re interested in. You might have a list of people and companies to research. Perhaps you have various things for each, with a mixture of companies’ names and websites, or people’s names and email addresses.

Diffbot can fill in the blanks for you, as long as your data is listed in a Google Sheets spreadsheet.

All you have to do is add Diffbot to your spreadsheet, then add =ENHANCE functions to find the data you need. There are two functions to pick from:

  • =ENHANCE_ORGANIZATION to find details about companies from their name or website URL, with an additional location and/or description to help Diffbot hone in on the right company.
  • =ENHANCE_PERSON to find details about people from their name or email address, optionally along with their employer, location, and description to help find the right person.

Here’s how it works.

 

New to Diffbot in Google Sheets? Check out our Diffbot + Spreadsheets guide first to get started, then come back here for step-by-step instructions on enriching data in Google Sheets.

Enrich company data in Google Sheets with Diffbot

First, list the data you’re starting with in your spreadsheet, with perhaps one column for the name and another for the website (for companies) or email (for people). Make sure the data is on the left columns, and that there’s no important data to the right on your sheet, as otherwise Diffbot won’t be able to fill in the details.

Next, think through the data you want Diffbot to find. Maybe you need to add each company’s phone number or addresses to your CRM. Or perhaps you’re looking for the largest companies represented in your customer list, so annual sales or market cap are of more interest. Add a column to your spreadsheet for each data point—and check Diffbot’s visual search or its Ontology list for the correct field names.

Then, build the Diffbot query you need and put it in the first column you added for Diffbot. Pick the correct formula (=enhance_organization for companies), then enter the fields you want Diffbot to find in a comma separated list in quotes (say, “ceo,location,phoneNumbers” to find the CEO’s name, company headquarters, and primary phone number). After that, tell Diffbot first the column with the name, then the column with the website URL, and finally the location and description fields if you included them.

Here’s the full example query we’re using, with the name and URL in the leftmost columns:

=ENHANCE_ORGANIZATION(“ceo,homepageUri,foundingDate.str,employees,location,marketcap,phoneNumbers.string”,A2,B2)

Diffbot will then fill in each column to the right with the data you told it to find. Make sure the formula gets the results you want on the first row, then add the same formula to every row with data on your spreadsheet. Moments later, Diffbot will have your entire spreadsheet enriched with the company details you needed, without any copying and pasting from each firm’s website.

TIP: If you only have the company name for some firms, and websites for others, you might want to have Diffbot find the company name and website each time. It’s a bit redundant—but it’ll keep you from merging data in your finished list.

Now you can dig further. Say you found the CEO’s name—you could use Diffbot’s person search to grab their contact info, or you could find a list of subsidiaries in the first search then pull details on each of them in a separate sheet.

Enrich contact info in Google Sheets with Diffbot

The same tricks work for finding info on a list of contacts. Say you have a list of email addresses, and would like to add their full contact info to a database. Or maybe you have a mix of people’s names, companies, and emails, and would like to clean everything up.

Diffbot’s =ENHANCE_PERSON formula can do that for you.

Much like with the Enhance Organization formula, list the contact details you have on the left. The more, the better: If you have Diffbot search for Tim Cook, it might not find details about Apple’s CEO; add his email address, though, and you’re certain to get the right person.

Also, you’ll likely want to have Diffbot find contact’s name, email address, and company again. Even if you already have some data, it might be out of data, and Diffbot can get you up to date. And, when you go to import Diffbot’s details into another app like your CRM, it’ll be easier if you have one list with all the details together.

So, as with companies, first tell the Diffbot formula the fields you want to collect, consulting Diffbot’s Ontology list to find all the fields it can find. Then tell Diffbot where the contacts’ name, email, and optionally company, location, and more are in your spreadsheet. Then let it run, and it’ll fill in all the details you need.

Here’s the formula to use, say, if you wanted Diffbot to find people’s name, email, current employer, title, and age:

=ENHANCE_PERSON(“name,emailAddresses.contactString,employments.employer.name,description,age”,A2,B2,C2)

Want to import the results into another app? Select and copy the rows and columns that Diffbot filled in, paste them into a new sheet, then export that sheet as a CSV file (File -> Download -> Comma Separated Values) and import it into your CRM or other app.

Enhance everything.

Now, the next time you need to research companies and people, don’t turn to Google first. Instead, list everything in Google Sheets, and use Diffbot’s formulas to do the heavy lifting for you, enhancing your data automatically.