- Install the package
npm i get-all-hubspot-companies
- How to use it in your file (ex: paste it in an index.js file and then run node index.js):
const { getAllHubspotCompanies } = require('get-all-hubspot-companies');
const asyncFunction = async () => {
const hubspotCompanies = await getAllHubspotCompanies(apiKey);
// or
const hubspotCompanies = await getAllHubspotCompanies(apiKey, ['name', 'id']);
};
asyncFunction();
- Additional information:
- You can provide an array of strings with the company's properties you wish to have in the response from Hubspot. Otherwise default properties will be returned.
IP Pilot: