Looks up each company on your list in a business database and appends its size, industry, founding year and head office as columns.

UsesDatagmaGoogle Sheets

Fill in the facts about the companies on your list

Every day, each company on your list that has not been looked up before is checked against Datagma's business database, and what its record holds is appended to a facts tab in the same Google Sheet: name on record, industry, headcount, size band, founding year, head office, website and LinkedIn page, plus how confident the match is.

No AI is involved and nothing comes from a web page. If the database has no match, the row says 'No match' and every fact column is left empty, because an invented founding year is worse than a blank once it reaches your CRM. Where your list gives a domain, the lookup uses that instead of the name. Your list is never written to or reordered. Each run reads the facts tab first and skips every company already on it, so no company is looked up twice, and if that tab cannot be read the run stops without writing anything.

Your sheet needs a list tab with a 'Company' heading and an optional 'Domain' column, plus a facts tab headed with the columns above.

Run every day.Run every day.
Set sheetUrl to blank.Set sheetUrl to blank.
Set companyTab to “Companies”.Set companyTab to “Companies”.
Set factsTab to “Company facts”.Set factsTab to “Company facts”.
Set maxRowsRead to 200.Set maxRowsRead to 200.
Set maxLookups to 25.Set maxLookups to 25.
Trim sheetUrl and save it as sheetAddress.Trim sheetUrl and save it as sheetAddress.
Trim companyTab and save it as sourceTab.Trim companyTab and save it as sourceTab.
Trim factsTab and save it as resultsTab.Trim factsTab and save it as resultsTab.
Get today's date and save it as checkedOn.Get today's date and save it as checkedOn.
Set alreadyDone to an empty list.Set alreadyDone to an empty list.
Set logWasRead to false.Set logWasRead to false.
If a step below fails, save the error as logErrorIf a step below fails, save the error as logError
Try
Google SheetsGoogle SheetsRead column 2 of resultsTab in sheetAddress. Save it as logColumn.Read column 2 of resultsTab in sheetAddress. Save it as logColumn.
Count the items in logColumn.values and save it as logCount.Count the items in logColumn.values and save it as logCount.
Show in the output: Rows already on the facts tab: logCount as text.Show in the output: Rows already on the facts tab: logCount as text.
Change alreadyDone to logColumn.values.Change alreadyDone to logColumn.values.
Change logWasRead to true.Change logWasRead to true.
On error
Show in the output: Could not read the facts tab: logError as text.Show in the output: Could not read the facts tab: logError as text.
If logWasRead is noIf logWasRead is no
Yes
Stop and report a problem: The facts tab could not be read, so this run cannot tell which companies it has already looked up and nothing has been written. Add a tab with the name in the 'factsTab' step whose first row reads: Checked on, Company, Looked up as, Match, Name on record, Industry, Employees, Company size, Founded, Headquarters, Website, LinkedIn, Confidence.Stop and report a problem: The facts tab could not be read, so this run cannot tell which companies it has already looked up and nothing has been written. Add a tab with the name in the 'factsTab' step whose first row reads: Checked on, Company, Looked up as, Match, Name on record, Industry, Employees, Company size, Founded, Headquarters, Website, LinkedIn, Confidence.
No
No steps
Google SheetsGoogle SheetsRead the rows of sheetAddress. Save it as sheet.Read the rows of sheetAddress. Save it as sheet.
Set lookedUp to 0.Set lookedUp to 0.
Set skippedNoName to 0.Set skippedNoName to 0.
Set skippedAlready to 0.Set skippedAlready to 0.
Set failedCount to 0.Set failedCount to 0.
For each row in sheet.rows:For each row in sheet.rows:
If lookedUp is greater than or equal to maxLookups multiplied by 1If lookedUp is greater than or equal to maxLookups multiplied by 1
Yes
Stop repeating.Stop repeating.
No
No steps
Trim row.Company and save it as companyName.Trim row.Company and save it as companyName.
If companyName is empty or companyName is “null”If companyName is empty or companyName is “null”
Yes
Add 1 to skippedNoName.Add 1 to skippedNoName.
Skip to the next item.Skip to the next item.
No
No steps
If alreadyDone contains companyNameIf alreadyDone contains companyName
Yes
Add 1 to skippedAlready.Add 1 to skippedAlready.
Skip to the next item.Skip to the next item.
No
No steps
Trim row.Domain and save it as companyDomain.Trim row.Domain and save it as companyDomain.
Set lookupValue to companyName.Set lookupValue to companyName.
If companyDomain isn't empty and companyDomain is not “null”If companyDomain isn't empty and companyDomain is not “null”
Yes
Change lookupValue to companyDomain.Change lookupValue to companyDomain.
No
No steps
If a step below fails, save the error as lookupErrorIf a step below fails, save the error as lookupError
Try
DatagmaDatagmaEnrich lookupValue with Datagma. Save it as enriched.Enrich lookupValue with Datagma. Save it as enriched.
Set wasFound to enriched.found is true.Set wasFound to enriched.found is true.
Set companyFacts to enriched.company.Set companyFacts to enriched.company.
Set foundText to “No match”.Set foundText to “No match”.
Trim companyFacts.name and save it as factName.Trim companyFacts.name and save it as factName.
If factName is “null”If factName is “null”
Yes
Change factName to blank.Change factName to blank.
No
No steps
Trim companyFacts.industry and save it as factIndustry.Trim companyFacts.industry and save it as factIndustry.
If factIndustry is “null”If factIndustry is “null”
Yes
Change factIndustry to blank.Change factIndustry to blank.
No
No steps
Trim companyFacts.employee_count and save it as factEmployees.Trim companyFacts.employee_count and save it as factEmployees.
If factEmployees is “null”If factEmployees is “null”
Yes
Change factEmployees to blank.Change factEmployees to blank.
No
No steps
Trim companyFacts.company_size and save it as factSize.Trim companyFacts.company_size and save it as factSize.
If factSize is “null”If factSize is “null”
Yes
Change factSize to blank.Change factSize to blank.
No
No steps
Trim companyFacts.founded and save it as factFounded.Trim companyFacts.founded and save it as factFounded.
If factFounded is “null”If factFounded is “null”
Yes
Change factFounded to blank.Change factFounded to blank.
No
No steps
Trim companyFacts.headquarters and save it as factHeadquarters.Trim companyFacts.headquarters and save it as factHeadquarters.
If factHeadquarters is “null”If factHeadquarters is “null”
Yes
Change factHeadquarters to blank.Change factHeadquarters to blank.
No
No steps
Trim companyFacts.website and save it as factWebsite.Trim companyFacts.website and save it as factWebsite.
If factWebsite is “null”If factWebsite is “null”
Yes
Change factWebsite to blank.Change factWebsite to blank.
No
No steps
Trim companyFacts.linkedin_url and save it as factLinkedin.Trim companyFacts.linkedin_url and save it as factLinkedin.
If factLinkedin is “null”If factLinkedin is “null”
Yes
Change factLinkedin to blank.Change factLinkedin to blank.
No
No steps
Set factConfidence to blank.Set factConfidence to blank.
If wasFound is yesIf wasFound is yes
Yes
Change foundText to “Matched”.Change foundText to “Matched”.
Trim enriched.confidence and save it as factConfidence.Trim enriched.confidence and save it as factConfidence.
If factConfidence is “null”If factConfidence is “null”
Yes
Change factConfidence to blank.Change factConfidence to blank.
No
No steps
No
Change factName to blank.Change factName to blank.
Change factIndustry to blank.Change factIndustry to blank.
Change factEmployees to blank.Change factEmployees to blank.
Change factSize to blank.Change factSize to blank.
Change factFounded to blank.Change factFounded to blank.
Change factHeadquarters to blank.Change factHeadquarters to blank.
Change factWebsite to blank.Change factWebsite to blank.
Change factLinkedin to blank.Change factLinkedin to blank.
Google SheetsGoogle SheetsAdd a row to factsTab in sheetAddress.Add a row to factsTab in sheetAddress.
Add 1 to lookedUp.Add 1 to lookedUp.
On error
Add 1 to failedCount.Add 1 to failedCount.
Show in the output: Could not look up companyName: lookupError as text.Show in the output: Could not look up companyName: lookupError as text.
Set summary to “Companies looked up: lookedUp as text”.Set summary to “Companies looked up: lookedUp as text”.
Change summary to “@summary. Already on the facts tab: skippedAlready as text”.Change summary to “@summary. Already on the facts tab: skippedAlready as text”.
Change summary to “@summary. Skipped, the row has no company: skippedNoName as text”.Change summary to “@summary. Skipped, the row has no company: skippedNoName as text”.
Change summary to “@summary. Lookups that failed: failedCount as text”.Change summary to “@summary. Lookups that failed: failedCount as text”.
Show in the output: summary.Show in the output: summary.