Looks up each company on your list in a business database and appends its size, industry, founding year and head office as columns.
Uses
Datagma
Google 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.
sheetUrl to blank.Set sheetUrl to blank.companyTab to Companies.Set companyTab to Companies.factsTab to Company facts.Set factsTab to Company facts.maxRowsRead to 200.Set maxRowsRead to 200.maxLookups to 25.Set maxLookups to 25.sheetUrl and save it as sheetAddress.Trim sheetUrl and save it as sheetAddress.companyTab and save it as sourceTab.Trim companyTab and save it as sourceTab.factsTab and save it as resultsTab.Trim factsTab and save it as resultsTab.checkedOn.Get today's date and save it as checkedOn.alreadyDone to an empty list.Set alreadyDone to an empty list.logWasRead to false.Set logWasRead to false.logErrorIf a step below fails, save the error as logErrorresultsTab in sheetAddress. Save it as logColumn.Read column 2 of resultsTab in sheetAddress. Save it as logColumn.logColumn.values and save it as logCount.Count the items in logColumn.values and save it as logCount.logCount as text.Show in the output: Rows already on the facts tab: logCount as text.alreadyDone to logColumn.values.Change alreadyDone to logColumn.values.logWasRead to true.Change logWasRead to true.logError as text.Show in the output: Could not read the facts tab: logError as text.logWasRead is noIf logWasRead is nosheetAddress. Save it as sheet.Read the rows of sheetAddress. Save it as sheet.lookedUp to 0.Set lookedUp to 0.skippedNoName to 0.Set skippedNoName to 0.skippedAlready to 0.Set skippedAlready to 0.failedCount to 0.Set failedCount to 0.row in sheet.rows:For each row in sheet.rows:lookedUp is greater than or equal to maxLookups multiplied by 1If lookedUp is greater than or equal to maxLookups multiplied by 1row.Company and save it as companyName.Trim row.Company and save it as companyName.companyName is empty or companyName is nullIf companyName is empty or companyName is nullskippedNoName.Add 1 to skippedNoName.alreadyDone contains companyNameIf alreadyDone contains companyNameskippedAlready.Add 1 to skippedAlready.row.Domain and save it as companyDomain.Trim row.Domain and save it as companyDomain.lookupValue to companyName.Set lookupValue to companyName.companyDomain isn't empty and companyDomain is not nullIf companyDomain isn't empty and companyDomain is not nulllookupValue to companyDomain.Change lookupValue to companyDomain.lookupErrorIf a step below fails, save the error as lookupErrorlookupValue with Datagma. Save it as enriched.Enrich lookupValue with Datagma. Save it as enriched.wasFound to enriched.found is true.Set wasFound to enriched.found is true.companyFacts to enriched.company.Set companyFacts to enriched.company.foundText to No match.Set foundText to No match.companyFacts.name and save it as factName.Trim companyFacts.name and save it as factName.factName is nullIf factName is nullfactName to blank.Change factName to blank.companyFacts.industry and save it as factIndustry.Trim companyFacts.industry and save it as factIndustry.factIndustry is nullIf factIndustry is nullfactIndustry to blank.Change factIndustry to blank.companyFacts.employee_count and save it as factEmployees.Trim companyFacts.employee_count and save it as factEmployees.factEmployees is nullIf factEmployees is nullfactEmployees to blank.Change factEmployees to blank.companyFacts.company_size and save it as factSize.Trim companyFacts.company_size and save it as factSize.factSize is nullIf factSize is nullfactSize to blank.Change factSize to blank.companyFacts.founded and save it as factFounded.Trim companyFacts.founded and save it as factFounded.factFounded is nullIf factFounded is nullfactFounded to blank.Change factFounded to blank.companyFacts.headquarters and save it as factHeadquarters.Trim companyFacts.headquarters and save it as factHeadquarters.factHeadquarters is nullIf factHeadquarters is nullfactHeadquarters to blank.Change factHeadquarters to blank.companyFacts.website and save it as factWebsite.Trim companyFacts.website and save it as factWebsite.factWebsite is nullIf factWebsite is nullfactWebsite to blank.Change factWebsite to blank.companyFacts.linkedin_url and save it as factLinkedin.Trim companyFacts.linkedin_url and save it as factLinkedin.factLinkedin is nullIf factLinkedin is nullfactLinkedin to blank.Change factLinkedin to blank.factConfidence to blank.Set factConfidence to blank.wasFound is yesIf wasFound is yesfoundText to Matched.Change foundText to Matched.enriched.confidence and save it as factConfidence.Trim enriched.confidence and save it as factConfidence.factConfidence is nullIf factConfidence is nullfactConfidence to blank.Change factConfidence to blank.factName to blank.Change factName to blank.factIndustry to blank.Change factIndustry to blank.factEmployees to blank.Change factEmployees to blank.factSize to blank.Change factSize to blank.factFounded to blank.Change factFounded to blank.factHeadquarters to blank.Change factHeadquarters to blank.factWebsite to blank.Change factWebsite to blank.factLinkedin to blank.Change factLinkedin to blank.factsTab in sheetAddress.Add a row to factsTab in sheetAddress.lookedUp.Add 1 to lookedUp.failedCount.Add 1 to failedCount.companyName: lookupError as text.Show in the output: Could not look up companyName: lookupError as text.summary to Companies looked up: lookedUp as text.Set summary to Companies looked up: lookedUp as text.summary to summary. Already on the facts tab: skippedAlready as text.Change summary to summary. Already on the facts tab: skippedAlready as text.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.summary to summary. Lookups that failed: failedCount as text.Change summary to summary. Lookups that failed: failedCount as text.summary.Show in the output: summary.