> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getmailr.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Mailr is a direct-mail marketing platform for US home-services contractors. Each postcard is personalized with an AI-enhanced image of the recipient's own home and a unique QR code that leads to a personalized landing page. Campaigns can target a neighborhood the customer draws on a map, the homes around past jobs they upload or import, or fire automatically from their CRM. Mailr does not mail an uploaded recipient list. When answering questions, prefer the exact steps and UI labels from these docs, and direct users to app.getmailr.com to sign in. For anything involving account-specific data, billing disputes, or mail that appears lost, direct the user to support@getmailr.com.

# HubSpot

> Connect HubSpot to Mailr to trigger postcards from deals and contacts, deliver landing-page leads back as contacts, and book revenue on closed-won deals.

Connecting HubSpot lets a closed-won deal or a new contact mail the neighbors around that address by itself, sends every postcard lead back into HubSpot as a contact, and credits revenue to the campaign that earned it. You sign in with your HubSpot account — Mailr never sees your password.

## What you get

* **Triggers** — **Closed-won deal**, **Deal reaches stage…** (you pick the pipeline and the stage), **New contact**, **Contact becomes customer**, and **Contact becomes lead**.
* **Revenue tracking** — revenue books when a deal enters a **closed-won** stage, in any pipeline.
* **Lead delivery** — landing-page leads arrive in HubSpot as contacts, created or updated by email in one step, so a resubmitted form never makes a duplicate. Empty answers never blank out data you already have.

## Connect HubSpot

<Steps>
  <Step title="In Mailr, open Automations">
    Go to **Campaigns → Automations** and find **HubSpot** under **CRM Connection**. Opening the tile doesn't connect anything. Only the organization owner can connect a CRM.
  </Step>

  <Step title="Press Connect HubSpot and approve the pop-up">
    A confirm dialog titled **Link HubSpot Account** appears: *"We'll connect you to HubSpot. A pop-up will open, please make sure your browser doesn't block pop-ups."* Its footer reads *"Secured with OAuth 2.0 — you'll sign in on app.hubspot.com."* Press **Connect**.
  </Step>

  <Step title="Sign in to HubSpot">
    Sign in, choose the HubSpot account (portal) to install into, and approve the access request. The pop-up closes itself. If your browser blocked it, Mailr falls back to a full-page sign-in.
  </Step>

  <Step title="Finish setup in Mailr">
    The three-step wizard opens: **Leads**, **Deal job address**, **Tracking**. Confirm the auto-matched fields and your attribution window.
  </Step>
</Steps>

<Check>
  The tile now reads **Connected**. If you closed the wizard early, the panel shows *"**One step left:** confirm your auto-matched fields to finish setup"* with a **Finish setup** button.
</Check>

## How syncing works

Mailr syncs deals, contacts, pipelines and stages, contact lifecycle stages, and deal and contact properties — including your custom ones. Trigger events usually reach Mailr within a few minutes, and at most an hour.

<Note>
  The first sync starts from the moment you connect. Deals and contacts from before you connected never trigger a campaign. To test, close a fresh deal after connecting.
</Note>

Automated campaigns use a design you've already approved and are reviewed by Mailr before anything mails — see [Campaign statuses & timelines](/campaigns/statuses-and-timelines).

## Disconnect or reconnect

The connected panel has three buttons: **Review setup** (reopens the wizard with your choices intact), **Advanced settings**, and **Disconnect**.

Disconnecting shows a confirmation titled **Disconnect HubSpot?**:

> *"Lead sync and campaign triggers through this connection will stop, and the stored credentials are deleted. Your settings are kept, so reconnecting later picks up where you left off."*

Mailr **uninstalls itself from your HubSpot account** first — it disappears from Connected Apps and HubSpot emails your admin — then deletes the stored credentials. Your campaign history, leads and results are never deleted. Reconnecting keeps your field mappings, address settings and attribution window.

## Notes & limits

* **Custom "won" stages need HubSpot's own closed-won setting.** Revenue tracking watches stages HubSpot marks as closed-won (100% probability). If someone built a custom won stage without that setting, revenue won't book from it — fix the stage setup in HubSpot.
* When you import past records to mail again, HubSpot offers closed-won deals in a stage you pick, or contacts.
* Leads Mailr delivered into HubSpot never trigger campaigns of their own.

## Next steps

<CardGroup cols={2}>
  <Card title="Automate campaigns" icon="workflow" href="/campaigns/automations">
    Build the rule that turns a closed-won deal into a mailing.
  </Card>

  <Card title="Integration troubleshooting" icon="wrench" href="/integrations/troubleshooting">
    Nothing triggering, revenue missing, or a reconnect prompt.
  </Card>
</CardGroup>
