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

Book a call with an Expert
Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.
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.
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.
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.
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.
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:
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" }
]
})
}
)
If you need users to authorize your app with their own HubSpot accounts, you must implement OAuth. Inside Bolt.new you:
OAuth is only needed if multiple HubSpot accounts use your app. For internal automation, Private Apps are simpler.
The exact same integration code works in production. The only changes:
Bolt.new is just the fastest way to prototype and validate the integration before deploying elsewhere.
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.
When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.