/bolt-ai-integration

Bolt.new AI and HubSpot Marketing Hub integration: Step-by-Step Guide 2025

Learn how to integrate Bolt.new AI with HubSpot Marketing Hub in 2025 using clear steps that boost automation, workflows, and marketing efficiency.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.

Book a free No-Code consultation

How to integrate Bolt.new AI with HubSpot Marketing Hub?

To integrate Bolt.new with HubSpot Marketing Hub, you don’t “connect Bolt to HubSpot.” Instead, inside Bolt.new you build a normal full‑stack app (Node, Python, etc.) that calls HubSpot’s REST APIs using an access token you provide as an environment variable. The workflow is: get a Private App token from HubSpot → store it as an environment variable in Bolt.new → write server‑side code that calls HubSpot’s CRM/Marketing endpoints → test requests directly inside Bolt’s sandbox → later move the same code and secrets to your production environment. HubSpot integration is just standard HTTP API usage with real authentication.

 

What you actually integrate

 

HubSpot Marketing Hub exposes real, documented REST endpoints for contacts, marketing emails, forms, lists, workflows, events, analytics, and more. Bolt.new runs code, so your integration is simply your Bolt app making authenticated HTTPS calls to these endpoints.

  • No plugins, no magic. You write the API calls.
  • Auth is required: HubSpot uses Private App tokens (Bearer tokens) or OAuth.
  • Environment variables hold secrets safely while testing in Bolt.

 

The simplest, most reliable integration method: HubSpot Private App Token

 

This is the beginner‑friendly flow, and works perfectly inside Bolt. A “Private App” in HubSpot is just a way to create an API token with specific scopes.

  • Create a Private App in HubSpot.
  • Give it scopes you need (for Marketing Hub you usually need contacts, forms, crm.objects.contacts.read/write, automation, etc.).
  • Copy the token.
  • Paste the token into Bolt.new’s environment variable panel, e.g. HUBSPOT\_TOKEN.

 

Minimal working Node.js example inside Bolt.new

 

This shows a real, valid request that creates/updates a contact in HubSpot CRM, which is part of Marketing Hub data.

// server.js

import express from "express"
import fetch from "node-fetch"

const app = express()
app.use(express.json())

app.post("/sync-contact", async (req, res) => {
  try {
    const { email, firstname, lastname } = req.body

    const response = await fetch(
      "https://api.hubapi.com/crm/v3/objects/contacts",
      {
        method: "POST",
        headers: {
          Authorization: `Bearer ${process.env.HUBSPOT_TOKEN}`, // stored in Bolt env vars
          "Content-Type": "application/json"
        },
        body: JSON.stringify({
          properties: {
            email,
            firstname,
            lastname
          }
        })
      }
    )

    const data = await response.json()
    res.json(data)

  } catch (err) {
    console.error(err)
    res.status(500).json({ error: "HubSpot error" })
  }
})

app.listen(3000, () => {
  console.log("Server running on port 3000")
})

 

In Bolt.new, you run this server in the backend, hit it with a frontend form, or call it from the built‑in “Test Request” tool. This proves your integration works end‑to‑end.

 

How to trigger HubSpot Marketing Hub actions

 

HubSpot Marketing Hub doesn’t allow arbitrary “send marketing email via API” (sending marketing email requires workflows or sequences), but you can trigger marketing actions indirectly:

  • Update a contact → workflows fire.
  • Submit a marketing form via API → triggers follow‑ups.
  • Create custom events → feed automation.

Example: Submit a HubSpot Form from Bolt.new (fully supported endpoint):

// Submitting a HubSpot Form

const portalId = "YOUR_PORTAL_ID"
const formId = "YOUR_FORM_ID"

await fetch(
  `https://api.hsforms.com/submissions/v3/integration/submit/${portalId}/${formId}`,
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      submittedAt: Date.now(),
      fields: [
        { name: "email", value: "[email protected]" },
        { name: "firstname", value: "Alex" }
      ]
    })
  }
)

 

Using OAuth instead of Private App Tokens

 

If you need users to authorize your app with their own HubSpot accounts, you must implement OAuth. Inside Bolt.new you:

  • Register your app in HubSpot (get client ID and client secret).
  • Set redirect URL to your Bolt route.
  • Store secrets in Bolt environment variables.
  • Implement the OAuth redirect → exchange code for access token.

OAuth is only needed if multiple HubSpot accounts use your app. For internal automation, Private Apps are simpler.

 

What changes when you move out of Bolt.new

 

The exact same integration code works in production. The only changes:

  • Move environment variables to your real hosting provider.
  • Use HTTPS and a proper domain for OAuth.
  • Rotate and secure your HubSpot tokens.

Bolt.new is just the fastest way to prototype and validate the integration before deploying elsewhere.

 

Summary

 

Integrating Bolt.new with HubSpot Marketing Hub means building a normal server in Bolt that uses HubSpot’s REST API with a Private App token. You store the token as an environment variable, write fetch/axios calls, test in the Bolt sandbox, and trigger Marketing Hub actions through contacts, forms, workflows, or custom events. Nothing is magical — Bolt is simply your full‑stack workspace where you build the integration through real HTTP requests.

Want to explore opportunities to work with us?

Connect with our team to unlock the full potential of no-code solutions with a no-commitment consultation!

Book a Free Consultation

Client trust and success are our top priorities

When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.

Rapid Dev was an exceptional project management organization and the best development collaborators I've had the pleasure of working with. They do complex work on extremely fast timelines and effectively manage the testing and pre-launch process to deliver the best possible product. I'm extremely impressed with their execution ability.

CPO, Praction - Arkady Sokolov

May 2, 2023

Working with Matt was comparable to having another co-founder on the team, but without the commitment or cost. He has a strategic mindset and willing to change the scope of the project in real time based on the needs of the client. A true strategic thought partner!

Co-Founder, Arc - Donald Muir

Dec 27, 2022

Rapid Dev are 10/10, excellent communicators - the best I've ever encountered in the tech dev space. They always go the extra mile, they genuinely care, they respond quickly, they're flexible, adaptable and their enthusiasm is amazing.

Co-CEO, Grantify - Mat Westergreen-Thorne

Oct 15, 2022

Rapid Dev is an excellent developer for no-code and low-code solutions.
We’ve had great success since launching the platform in November 2023. In a few months, we’ve gained over 1,000 new active users. We’ve also secured several dozen bookings on the platform and seen about 70% new user month-over-month growth since the launch.

Co-Founder, Church Real Estate Marketplace - Emmanuel Brown

May 1, 2024 

Matt’s dedication to executing our vision and his commitment to the project deadline were impressive. 
This was such a specific project, and Matt really delivered. We worked with a really fast turnaround, and he always delivered. The site was a perfect prop for us!

Production Manager, Media Production Company - Samantha Fekete

Sep 23, 2022