HubSpot Lead Capture

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.

  1. Open Liferay Marketplace.

  2. Search for HubSpot Lead Capture.

  3. Click Get App.

  4. Download the .zip file to your computer.

  5. Deploy HubSpot Lead Capture either locally or to Liferay Cloud.

  6. Configure the Liferay Connector to HubSpot.

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

  1. 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.

  2. Copy these files into [Liferay Home]/osgi/client-extensions:

    • liferay-hubspot-etc-spring-boot.zip

    • liferay-hubspot-batch.zip

Warning

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.

  1. In your Liferay instance, access the Control Panel → OAuth 2 Administration.

  2. Click Liferay HubSpot Etc Spring Boot OAuth Application Headless Server.

  3. 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.

  1. Log into HubSpot and generate the private app access token.

  2. 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
    
  3. (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

  1. Open the Site Menu (Menu icon), go to DesignFragments.

  2. Follow the steps to import the fragment:

    • liferay-hubspot-form-fragment.zip
  3. Unzip liferay-hubspot-etc-spring-boot.zip.

    Note

    The Spring Boot application is provided as a .JAR file inside liferay-hubspot-etc-spring-boot.zip.

  4. Run the Spring Boot application:

    java -jar liferay-hubspot-etc-spring-boot.jar
    

Deploying HubSpot Lead Capture to Liferay Cloud

  1. Unzip the file downloaded from Marketplace.

  2. Use Liferay Cloud CLI tool to deploy the files:

    • liferay-hubspot-etc-spring-boot.zip

    • liferay-hubspot-batch.zip

  3. Set the required environment variable(s) into your Liferay Cloud project following the steps of configuring the connector.

  4. Open the Site Menu (Menu icon), go to DesignFragments.

  5. Follow the steps to import the fragment:

    • liferay-hubspot-form-fragment.zip
  6. Once deployed, the Spring Boot application starts automatically.

Key Deployment Differences

Local EnvironmentLiferay Cloud
Client Extensions copied manuallyClient Extensions deployed via CLI tool
Spring Boot started manuallySpring Boot starts automatically
Environment variables set in shellEnvironment variables set in Cloud configuration