> ## Documentation Index
> Fetch the complete documentation index at: https://forest-docs-prd-616-workflow-webhook-trigger.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Display Hubspot companies

This example shows you how to create a smart collection to list the companies of your Hubspot account.

{/* markdown-link-check-enable */}

## Requirements

* An admin backend running on forest-express-sequelize
* [superagent](https://www.npmjs.com/package/superagent) npm package
* a Hubspot account

## How it works

### Directory: /forest

This directory contains the `hubspot-companies.js` file where the collection is declared.

### Directory: /routes

This directory contains the `hubspot-companies.js` file where the serializer for the collection and logic to get records is defined.&#x20;

Companies information are obtained by making a [get all companies](https://developers.hubspot.com/docs/methods/companies/get-all-companies) call to the Hubspot API.

<Info>
  The Hubspot API key is defined in the `.env` file and requested through the expression `process.env.HUBSPOT_API`.
</Info>
