Problem: I needed to find Company URLs from company names to sync contacts to companies in HubSpot.
Solution:
- Use, “https://autocomplete.clearbit.com/v1/companies/suggest?query=” along with the company name to fetch data on the company
- Create this function in Google Sheet scripts:
function FETCH(url) {
var response = UrlFetchApp.fetch(url);
Logger.log(response.getContentText());
var out = JSON.parse(response.getContentText());
return out[0][“domain”];
} - Run the function using: fetch(Field of URL)