Installing HubSpot Lead Capture
Installing the Liferay connector HubSpot Lead Capture requires integrating a Liferay client extension and a Spring Boot micro-service client extension. Follow the steps to install and configure the connector.
-
Open Liferay Marketplace.
-
Search for HubSpot Lead Capture.
-
Click Get App.
-
Download the
.zipfile to your computer. -
Deploy HubSpot Lead Capture either locally or to Liferay Cloud.
Deploying HubSpot Lead Capture Self-Hosted
When running locally, both HubSpot client extensions must be deployed manually, and the Spring Boot backend framework requires an environment variable to start.
Deploying the Connector
-
Unzip the file downloaded from Marketplace. It contains these files:
-
liferay-hubspot-etc-spring-boot.zip: deployable artifact of the spring boot application. -
liferay-hubspot-batch.zip: deployable artifact of the HubSpot Lead Capture application. -
liferay-hubspot-form-fragment.zip: importable fragment of the HubSpot Lead Capture application.
-
-
Copy these files into
[Liferay Home]/osgi/client-extensions:-
liferay-hubspot-etc-spring-boot.zip -
liferay-hubspot-batch.zip
-
Don’t deploy the main .zip file downloaded from Marketplace.
Retrieving the Client Secret
To enable the Spring Boot application to authenticate with Liferay, retrieve the Client Secret from the OAuth 2.0 application.
-
In your Liferay instance, access the Control Panel → OAuth 2 Administration.
-
Click Liferay HubSpot Etc Spring Boot OAuth Application Headless Server.
-
Locate and copy your Client Secret.
Configuring the Connector
To synchronize data between Liferay and HubSpot using a Spring Boot application, generate a HubSpot private app access token.
-
Log into HubSpot and generate the private app access token.
-
The connector expects two environment variables: one contains your HubSpot token value; the other contains your Client Secret:
export LIFERAY_HUBSPOT_TOKEN=your-hubspot-token export LIFERAY_HUBSPOT_ETC_SPRING_BOOT_OAHS_CLIENT_SECRET=your-liferay-secret -
(Optional) Set an environment variable environment containing the default base URL:
export LIFERAY_HUBSPOT_URL=https://api.hubapi.com
Liferay automatically detects and deploys the files as client extensions.
Importing the Fragment and Running the Microservices
-
Open the Site Menu (
), go to Design → Fragments. -
Follow the steps to import the fragment:
liferay-hubspot-form-fragment.zip
-
Unzip
liferay-hubspot-etc-spring-boot.zip.NoteThe Spring Boot application is provided as a
.JARfile insideliferay-hubspot-etc-spring-boot.zip. -
Run the Spring Boot application:
java -jar liferay-hubspot-etc-spring-boot.jar
Deploying HubSpot Lead Capture to Liferay Cloud
-
Unzip the file downloaded from Marketplace.
-
Use Liferay Cloud CLI tool to deploy the files:
-
liferay-hubspot-etc-spring-boot.zip -
liferay-hubspot-batch.zip
-
-
Set the required environment variable(s) into your Liferay Cloud project following the steps of configuring the connector.
-
Open the Site Menu (
), go to Design → Fragments. -
Follow the steps to import the fragment:
liferay-hubspot-form-fragment.zip
-
Once deployed, the Spring Boot application starts automatically.
Key Deployment Differences
| Local Environment | Liferay Cloud |
|---|---|
| Client Extensions copied manually | Client Extensions deployed via CLI tool |
| Spring Boot started manually | Spring Boot starts automatically |
| Environment variables set in shell | Environment variables set in Cloud configuration |