---
title: "Prefill from HubSpot"
description: "Look up a HubSpot contact on your server, prefill editable values, and send accepted answers back through Fillo's native integration."
order: 19
type: "guide"
topic: "Prefill recipes"
tags:
  - "HubSpot"
  - "CRM"
  - "prefill"
  - "server"
updated: "2026-07-26"
---

Fillo's native HubSpot integration sends new responses and updates to HubSpot, but it does not expose CRM records to the browser for prefill. Your server should look up the Contact and pass only the editable values the form needs through `initialData`.

## Keep CRM access on the server

Resolve the signed-in account to the HubSpot contact your app is allowed to read. Request only the properties this form needs, and never expose a HubSpot private app token in the browser.

```ts
// Pseudocode in a server route or Server Component
const contact = await hubspot.contacts.get(contactId, ["email", "firstname", "company"]);

const initialData = {
  email: contact.email ?? "",
  first_name: contact.firstname ?? "",
  company: contact.company ?? "",
};
```

Pass the sanitized object into a client component:

```tsx
<FilloForm
  formId="sales-intake"
  respondent={signedRespondent}
  initialData={initialData}
/>
```

The `initialData` keys must match your Fillo field IDs, and the respondent can edit every one of those answers. When account identity has to be trusted, use the signed respondent object — not a HubSpot query parameter.

## Send accepted changes back

Enable the [native HubSpot destination](/docs/integrations/hubspot), choose the same required email field used for Contact identity, and map each answer that should return to HubSpot. New responses appear as native Form submission activity; owner edits update the mapped CRM properties. Use a verified webhook only when the write needs custom business logic beyond the native mapping.

## Test stale and missing data

Test the ugly cases: no matching contact, an empty property, a renamed property, revoked HubSpot access, respondent edits, duplicate delivery, and a failed CRM write. When prefill isn't available, the form should still tell the person what they can do.

## Try it

[Start with a prompt](/start?from=guide-prefill-from-hubspot) and your coding agent builds the first form, staged for your review — or [open the editor](/new).

## Related

- [Contact example](/examples#contact): Inspect the form used by this server-prefill pattern.
- [Prefill from your app session](/guides/prefill-from-app-session): Separate editable values from verified identity.
- [HubSpot](/docs/integrations/hubspot): Configure native Contact activity, property mapping, Companies, and Deals.
- [Zapier](/docs/integrations/zapier): Build a multi-step HubSpot workflow beyond the native destination.
- [Webhooks](/docs/webhooks): Own the CRM update in a secure backend.
