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

# HubSpot

> Push finished emails from Denada to HubSpot

Denada integrates with [HubSpot](https://www.hubspot.com) so you can design emails in Denada and push them directly to HubSpot as ready-to-send marketing emails.

## What you need

* A Denada project with an email ready to push
* A HubSpot account where you can create a **private app**
* A private app access token with the **content** and **files** scopes

## Create a HubSpot private app token

Denada authenticates with a private app access token:

1. In HubSpot, go to **Settings > Integrations > Private Apps** and create a new private app.
2. Give it a name like "Denada".
3. Under scopes, enable **content** (required to create emails) and **files** (required if you want Denada to upload images to HubSpot).
4. Create the app and copy its **access token**.

## Connect Denada to HubSpot

<Steps>
  <Step title="Open the Integrations dialog">
    Click **Share** on any project, then under **Integrations**, click **Configure**. (You can also open your team's **Settings** page and click **Add integration** in the **Integrations** panel — manager access required.)
  </Step>

  <Step title="Select HubSpot">
    Choose **HubSpot** from the list of platforms.
  </Step>

  <Step title="Enter your credentials">
    * **Name** — optional, e.g. "Production".
    * **Access token** — the private app access token you created above.
  </Step>

  <Step title="Validate and save">
    Click **Validate** — Denada makes a test call against HubSpot's marketing email API and reports missing scopes if the token can't access it. Then click **Save**.
  </Step>
</Steps>

## Push an email to HubSpot

1. Open the project and click **Share**.
2. Under **Integrations**, select **Export to HubSpot**.
3. Fill in the export dialog:
   * **Email name** — the name that will appear in HubSpot. Defaults to your project's name.
   * **Subject line** — pre-filled from your project's subject.
   * **Image hosting** — choose **Use images hosted on Denada** to keep image URLs pointing at Denada's CDN, or **Upload and host on HubSpot** to copy them into HubSpot's file manager and rewrite the HTML to use HubSpot-hosted URLs.
4. Click **Export**.

### What the export creates in HubSpot

* A coded email template in HubSpot's **Design Manager**, filed under a `denada/exports/` path that mirrors your project's folder structure in Denada.
* A marketing email in **Marketing > Email** that uses that Design Manager file as its content, with your name and subject line — ready for you to pick recipients and send.
* If you chose HubSpot image hosting, your images land in the file manager under a `/denada-exports/[email name]` folder (with images that come from library blocks in a `Library_Images` subfolder).

## How updates work

* **Name collisions are checked first.** Before exporting, Denada checks whether a marketing email with the same name already exists in HubSpot. If it does, you'll see a **Replace existing email?** confirmation — confirm to update it, or cancel and choose a different name.
* **Re-exporting updates in place.** If you've pushed this project to HubSpot before, the export dialog shows a **Previous export** option: choose **Overwrite** to update the same HubSpot email, or **Create new** to make a separate one.
* **Previously uploaded images are reused.** When re-exporting with HubSpot image hosting, the **Previously uploaded images** option lets you reuse the existing HubSpot files (**Use existing uploads**) or upload fresh copies (**Upload new**). Reusing is the default.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Validation fails with a scopes error">
    Your private app is missing a required scope. Edit the private app in HubSpot and make sure both **content** and **files** scopes are enabled, then try again.
  </Accordion>

  <Accordion title="Updating a previous export fails">
    If the previously exported email was deleted in HubSpot, the update can't find it — choose **Create new** in the export dialog instead.
  </Accordion>
</AccordionGroup>

For general information about how integrations work, see [Integrations overview](/integrations/integrations-overview).

## Need help?

If you run into issues with the HubSpot integration, reach out to [support@heydenada.com](mailto:support@heydenada.com) or ask in our [Community Slack](https://join.slack.com/t/denadacommunity/shared_invite/zt-33ermqnvl-kU9677V0eloK5Jf2SSNO5g).
