This example uses a fictitious IT services company. Company proximity information appears in the custom middle pane tab of a company record. It contains two CRM cards that help salespeople identify companies they might want to plan to visit along with a trip to the company they’re currently viewing.
We recommend installing this sample in a Sandbox account.
- Update to latest CLI version by running
npm install -g @hubspot/cli@latest
- Run
hs init
if you haven’t already done so to create a config file for your parent account - Run
hs auth
to authenticate your account. Alternatively, select your pre-authenticated account withhs accounts use
In the folder where you want this sample to be cloned, create a new project by running hs project create --templateSource="HubSpot/ui-extensions-examples" --location="mapbox-api" --name="mapbox-api" --template="mapbox-api"
- Obtain Mapbox access token
- Add token as a secret:
hs secrets add MAPBOX_ACCESS_TOKEN
Import sample companies into your HubSpot account:
- Inside your HubSpot account, click the settings gear icon.
- In the left sidebar menu under Data Management, choose Import & Export.
- Click the Go to import button, then on the following screen click Start an import.
- Choose Import file from computer, then one file, then one object, then select the companies object.
- Select the
companies.csv
file in this project and click Next and then Finish to finish the import.
Now in the CLI, enter into this newly created folder by cd mapbox-api
. You will need to run npm install
in both the /src/app/extensions
and /src/app/app.functions
directories to install the dependencies for this project.
Run hs project upload
. Alternatively, if you’d like to build on this project, run hs project dev
to kickoff the dev process and see changes reflected locally as you build.
In the main menu select Contacts > Companies to view company records. Click on any of the sample companies and navigate to the custom tab to access the sample. If you haven't customized the tabs before follow step #4 from this guide.