HubSpot Forms tutorial

Mirror HubSpot form submissions in Google Sheets for analytics

Add the LeadToSheet script next to the HubSpot embed to collect submissions in Google Sheets without touching HubSpot workflows or lists.

CMS: HubSpot CMS & embeds

HubSpot already stores form submissions, but exporting for analytics is painful. When HubSpot forms render directly in your page's DOM via the JavaScript embed, the SDK captures submissions automatically. If the form loads inside a cross-origin iframe, the SDK cannot access it — use HubSpot's webhook or workflow integration instead. Either way, LeadToSheet gives marketing and ops teams a live Sheets view for dashboards or CSV exports without admin access.

Implementation checklist

  1. 1

    Load the script where forms render

    If you embed HubSpot forms on other CMSs, inject the LeadToSheet snippet on the host page or template.

  2. 2

    Name HubSpot fields clearly

    When HubSpot renders forms directly in the DOM, the HTML name attributes match HubSpot's internal field names, so sheet columns align with your CRM properties.

  3. 3

    Test gating logic

    Submit a form through the gating you use (popups, progressive profiling) to capture every field variant.

Customization ideas

  • Sync to shared tabs

    Split marketing and sales-ready leads into distinct tabs using conditional routing rules.

  • Append scoring metrics

    Use Apps Script formulas to calculate lead scores on the fly when new HubSpot data arrives.

  • Enrich with UTMs

    Because HubSpot hides UTMs in many reports, LeadToSheet stores them so you can reconcile with ad spend.

Troubleshooting

  • Embedded forms inside iframes

    If your HubSpot form sits in a cross-origin iframe that you cannot edit, the SDK cannot capture submissions directly. Instead, use HubSpot's webhook or workflow integration to send submissions to your LeadToSheet endpoint.

  • Multiple forms per page

    LeadToSheet indexes each form instance separately. Ensure each embed has a unique `data-form-id`.

  • GDPR consent

    Consent checkboxes come through as boolean fields so you can document compliance inside Sheets.

Frequently asked questions

Do I still need HubSpot lists?
Yes for nurturing, but Sheets becomes the best space for analytics, manual reviews, or exports to other tools.
Can I trigger HubSpot workflows based on sheet updates?
Yes. Use the HubSpot API or a middleware tool like Zapier to watch for changes in Google Sheets and act on them.
What about forms hosted on HubSpot CMS pages?
Add the snippet via HubSpot's site header HTML and it will deploy to every CMS page automatically.