Quickstart guide for developing with projects (BETA)
Use the guide below to get started with a project template that you can deploy to HubSpot. By the end of this walkthrough, you’ll have built and deployed a private app to your HubSpot account that will add a custom CRM card to the middle pane of your contact records.
Before you get started, make sure you’ve reviewed the setup guide to configure your local environment and set up a development sandbox if needed. You can also view the projects overview guide for more information about project file structure, the build and deploy process, and how to manage projects in HubSpot once deployed.
To create your project locally:
- Navigate to the folder where you set up your local environment during the setup process.
- If you’re using an editor like Visual Studio Code, you can open this folder by navigating to File > Open, then selecting the folder.
- If you’re using the terminal, you can navigate into the folder using the
cdcommand. For example, if you created the folder within your
Documentsfolder, your command might be
cd Documents/myProjects. If you’re not sure where you are in the terminal, you can run
pwdto show your current directory.
- In the terminal, run
hs project create.
If you encounter an error that reads
A hubspot.config.yml file could not be found, ensure that you’re in the folder where you originally ran
hs init. If you haven’t run that, view the setup guide before proceeding.
- Then, follow the terminal prompts to set up your project:
- Enter a name for your project, then press Enter.
- Set the location for your project. By default, the location will be set to the current directory. Press Enter.
- Select whether to start the project from scratch or from the Getting Started template. For this guide, use the arrow keys to select Getting Started, then press Enter.
A project folder will then be created for you, and you can view the project files and folders. For a full overview of project files included in the Getting Started template, view the projects overview.
With your project created, you can now upload it to your HubSpot account. During the upload process, your project will automatically build and deploy, and then be viewable within the account. You can later update your project’s auto-deploy setting to prevent HubSpot from automatically deploying a successful build.
- In the terminal, ensure you're in the project folder by running
cd projectFolderName. Then, run
hs project upload.
- The terminal will display the project’s upload progress, including any errors.
Using this guide, your project should upload successfully. However, in general if you encounter an error during the build or deploy process, you can view a project’s build history in your HubSpot account.
View your project in HubSpot to view its build history, version, and settings.
- In your HubSpot account, navigate to CRM Development.
- In the left sidebar menu, select Projects. On the Projects page, you can view all your projects, along with their version number and deploy status.
- Click the name of your project.
- On the Builds tab, you can view the project's build history. You can also view more information about the app by clicking View in private apps under Deployed Build.
- To view the CRM card in HubSpot:
- Navigate to a contact record.
- In the middle pane of the contact record, click the Custom tab.
- View the Example CRM Card card in the middle pane.
If you want to add another third party dependency to your project, or if you need to upgrade the version of the HubSpot NodeJS client library, check out the guide on managing NPM dependencies in a serverless function.
Thank you for your feedback, it means a lot to us.