Skip to main content

How to Integrate HubSpot Forms with Full Fabric

Connecting your HubSpot forms to Full Fabric allows you to instantly sync lead or applicant information captured in HubSpot straight into your Full Fabric CRM or application pipeline.

This integration is made possible by setting up a Custom Code Action within a HubSpot Workflow that pushes submitted data via Full Fabric’s Forms API. ⚙️

Prerequisites

Before you begin, make sure you have:

  • An active HubSpot Operations Hub Professional or Enterprise subscription (required to run Custom Code workflows).

  • Administrator access to your Full Fabric portal.

  • The specific Form ID from Full Fabric where you want the submissions to land.

Step 1: Define Your Environment Variables in HubSpot

Before adding the custom code snippet, you must securely establish your authentication tokens within HubSpot. This prevents sensitive credentials from being exposed directly in the raw script code. 🔒

1) In your HubSpot account, click the Settings icon (gear) in the main navigation bar.

2) On the left sidebar menu, navigate to Automation > Workflows.

3) Click on the Secret Management tab.

4) Click Add secret and define the following variable:

Secret Name

Value

Purpose

external_domain_token

Your Full Fabric API Token

Authenticates your HubSpot requests with your school's Full Fabric secure server.

Step 2: Build the Workflow and Add Custom Code

With your environment variables safely stored, you can now build the data bridge between the two platforms.

1) Navigate to Automation > Workflows and click Create workflow (choose From scratch > Contact-based).

2) Set up your Enrollment Triggers to target the specific HubSpot form you want to sync (e.g., Form submission > Contact submitted [Your HubSpot Form Name] on Any Page).

3) Click the ➕ icon to add a new workflow action and choose Custom code.

4) Configure the action settings pane on the right-hand side using the guidelines below:

A) Define the Input Properties

Under the Property to include in code section, map the HubSpot properties that will be pulled into the data payload. Add the following records precisely:

  • Select First name -> enter firstname as the variable name.

  • Select Last name -> enter lastname as the variable name.

  • Select Email -> enter email as the variable name.

You can add additional fields, just follow the pattern above.

B) Insert the Integration Code

Scroll down to the JavaScript/Node.js code block editor, erase any default text, and paste the following snippet:

JavaScript

exports.main = async (event, callback) => {

const params = new URLSearchParams({
'external_domain_token': process.env.external_domain_token,
'data[first_name]': event.inputFields['firstname'],
'data[last_name]': event.inputFields['lastname'],
'data[email]': event.inputFields['email'],
});

const response = await fetch(
`https://TENANT.fullfabric.cloud/api/forms/FORM_ID/submissions?${params}`,
{ method: 'POST' }
);

console.log('Response status:', response.status);

callback({ outputFields: { status: String(response.status) } });

};

⚠️ Important

Customization Note: > Remember to replace TENANT in the URL string above with your school's actual Full Fabric subdomain (e.g., lisbon, london-business-school). If you are mapping a form other than the default endpoint example provided, update the FORM_ID to match your unique Full Fabric Form ID.

Step 3: Test and Activate your Sync

1) Click Save on the custom code module pane.

2) Use HubSpot’s built-in Test action utility to execute the function on a sample test contact.

3) Review the console logs outputs: a successful delivery will return a Response status: 200 or 201.

4) Once verified, toggle the workflow status to Active on the top right corner. 🚀

Your HubSpot fields are now fully mapped and real-time syncing is successfully established!

Did this answer your question?