TutorialAuto-Populate Gravity Forms from HubSpot using GravityWP API Connector

Gravity Forms HubSpot integration can be simple. By the end of this tutorial, you’ll have a working form that fills in a person’s first name, last name, and phone number the moment you enter their email no coding needed. It feels like magic: type the email, and the rest appears.

You’ll set this up in a few clear steps: add one contact in HubSpot for testing, create a secure one-time token in HubSpot, connect it in the GravityWP API Connector, and map the returned details to your form fields. When you’re done, your site will save visitors time, reduce typos, and keep data consistent with your HubSpot records.

1) Prepare HubSpot (contact + token)

We need one real contact in HubSpot for the lookup, and a Private App token for authentication.

  • In HubSpot, open Contacts and create a test contact with email, first name, last name, and phone.
HubSpot contacts list for Gravity Forms HubSpot integration test.
Demo contacts in HubSpot for testing the auto-populate.
  • Create a Private App in your portal (your UI may show this under Development → Legacy Apps → Private). Grant only the read scope for contacts (for example: crm.objects.contacts.read). Copy the Access token (starts with pat-…). Keep it secret. You won’t use the Client secret for this tutorial.
HubSpot Legacy Apps list for Gravity Forms HubSpot integration setup.
Legacy Apps page where you create the Private App for the Gravity Forms HubSpot integration.
Create Private app modal in HubSpot for Gravity Forms HubSpot integration.
Create a Private app to generate a token for the Gravity Forms HubSpot integration.
HubSpot scopes enable crm.objects.contacts.read
Select only crm.objects.contacts.read for this GET-only Gravity Forms HubSpot integration.
HubSpot Private App access token (token blurred).
Private App access token (pat-…) used as the Bearer token in GravityWP API Connector.

2) Build the Gravity Form

Create a form name it anything that make sense and add these fields: Emai, First Name, Last Name, Phone (In this tutorial I used single line text for this fields). Optionally add a temporary JSON Paragraph Text field to hold the full response while testing. Note the field IDs; in this example Email is ID 1, First Name ID 3, Last Name ID 4, Phone ID 5.

Gravity Forms field setup
Gravity Forms fields that will be auto-populated from HubSpot when Email changes.

3) Add the HubSpot connection in API Connector

Open Forms → Settings → API Connector → Add connection.
Name it anything that make sense but in this tutorial I named it HubSpot (Private App). Set Base URL to https://api.hubapi.com. Choose Authentication method: Bearer Token, then paste your pat-… token and save.

GravityWP API Connector Bearer token
API Connector connection using a HubSpot Bearer token.

4) Create the GET feed (lookup by email on change)

Open your form → Settings → API Connector → Add New Feed. Select the HubSpot (Private App) connection and set Request Method to GET.

Endpoint (relative to base URL):

/crm/v3/objects/contacts/{Email:1}

{Email:1} is the Gravity Forms merge tag for the Email field value.

Query String (GET) parameters

  • idProperty = email
  • properties = email,firstname,lastname,phone,hs_object_id

Trigger

Choose On form submission and enable store full response and map your JSON paragraph field in order to check the full response when you submit an entry

Target Fields (response → form)

  • First Name ← properties/firstname
  • Last Name ← properties/lastname
  • Phone ← properties/phone
API Connector GET endpoint
GET endpoint using the Email field in the path for HubSpot contact lookup.
Map HubSpot JSON to Gravity Forms fields
Query parameters and JSON path mappings to form fields.

Why these mappings?
HubSpot’s Contacts v3 API returns a single record with an id and a properties object. First name, last name, and phone live inside properties, so paths like properties/firstname are accurate and stable for this use case.

5) Test the auto-populate

Preview the form. Type the email that exists in HubSpot and tab out. You should see First Name, Last Name, and Phone fill in. Submit the form and review the entry to confirm values. If you mapped JSON for testing, you’ll see the full response, which is handy while you refine mappings.

Preview mode of Gravity Forms submitting an email entry
Gravity Form Preview
Gravity Forms preview shows First Name, Last Name, and Phone auto-filled from HubSpot.
Entry confirms fields were auto-populated; JSON stored for verification.

Why this Gravity Forms HubSpot integration works

It’s read-only and minimal. The Private App token stays on the server in WordPress. The scope is limited to contacts read, so you can’t change HubSpot data by mistake. Using idProperty=email in the endpoint path keeps the request simple; you don’t need a separate search body. Mapping is straightforward because the response groups values inside properties

Optional next step for this integration (POST/PATCH)

If later you want to create or update contacts on submit, add a separate feed that uses PATCH with idProperty=email and expand your Private App scopes to include write access. Keep the GET feed as a dedicated prefill so it stays fast and safe.

Troubleshooting your Gravity Forms HubSpot integration

  • Fields don’t fill: Confirm the email exists in HubSpot and matches exactly. Check the feed trigger is set to fire on Email change.
  • Auth errors: If you rotated the token in HubSpot, paste the new pat-… into the connection. Ensure the read scope is granted.
  • Wrong values: Re-check your Target Field paths: properties/firstname, properties/lastname, properties/phone, and id.
  • Cleanup: Once verified, remove the temporary JSON field and keep only the mapped fields you need.

What you achieved with this Gravity Forms HubSpot integration

You built a Gravity Forms HubSpot integration that auto-populates user details with a single GET request. It’s secure, fast, and easy to maintain. From here, you can map any other HubSpot contact property the same way.

Our Premium Add-ons for Gravity Forms

Read more tutorials about

All tutorials