/bolt-ai-integration

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

Learn how to connect Bolt.new AI with HubSpot in 2025 using this simple, step‑by‑step integration guide for smoother workflows and smarter automation.

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?

To integrate Bolt.new with HubSpot, you simply build a normal web app inside Bolt and connect it to HubSpot using HubSpot’s public REST API or official OAuth flow. Bolt itself does not have any special or magical integration layer — you authenticate to HubSpot the same way you would in any Node/Express or frontend app, using HubSpot OAuth or a HubSpot Private App Access Token stored in environment variables. In Bolt.new, the pattern is: create API routes, store secrets in the Bolt environment variable panel, call HubSpot endpoints over HTTPS, then test end‑to‑end inside the Bolt preview server.

 

Understand How Bolt.new Connects to HubSpot

 

HubSpot provides a standard REST API. Bolt.new provides a runtime where your server code can make HTTPS requests and read environment variables. That’s the entire integration pattern.

  • You authenticate to HubSpot using either OAuth (recommended for production, uses client_id/client_secret + redirects) or a Private App Access Token (simplest for development).
  • You store the token securely inside Bolt.new in the Environment Variables panel.
  • You call HubSpot endpoints such as /crm/v3/objects/contacts from your Bolt server code using fetch or axios.
  • You build UI or routes in Bolt that trigger those API calls.

This is exactly how you integrate with any external service from Bolt — standard web app patterns, nothing proprietary.

 

Step-by-Step: The Practical, Working Integration

 

The fastest and cleanest method for development is using a HubSpot Private App. It gives you a single token and avoids OAuth complexity while prototyping.

  • Create a Private App in HubSpot → copy the Access Token.
  • In Bolt.new: go to the Environment tab and add HUBSPOT\_TOKEN as a secret.
  • Build a small API route inside Bolt’s backend that talks to HubSpot.

Below is real, working Node.js/Express-style code you can drop directly into Bolt.new’s server environment. It shows how to create a contact in HubSpot.

 

// server/routes/hubspot.js

import express from "express";
const router = express.Router();

router.post("/hubspot/create-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: {
          "Content-Type": "application/json",
          Authorization: `Bearer ${process.env.HUBSPOT_TOKEN}` // stored in Bolt env vars
        },
        body: JSON.stringify({
          properties: {
            email,
            firstname,
            lastname
          }
        })
      }
    );

    const data = await response.json();
    res.json(data);
  } catch (err) {
    console.error("HubSpot error:", err);
    res.status(500).json({ error: "HubSpot request failed" });
  }
});

export default router;

 

Then mount this route in your main server file:

 

// server/index.js

import express from "express";
import hubspotRoutes from "./routes/hubspot.js";

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

app.use("/api", hubspotRoutes);

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

 

From your frontend inside Bolt.new, you can call this server route like this:

 

// Example frontend fetch request

async function createContact() {
  const res = await fetch("/api/hubspot/create-contact", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      email: "[email protected]",
      firstname: "Test",
      lastname: "User"
    })
  });

  const data = await res.json();
  console.log("HubSpot response:", data);
}

 

How to Use OAuth (Real Explanation, No Magic)

 

When you need multi-user installs or production-grade security, switch to HubSpot OAuth. You implement it the same way in Bolt as you would in any Node server:

  • Create a HubSpot Public App.
  • Configure your redirect URI to point to your Bolt dev server URL (usually https://YOUR_PROJECT_ID.bolt.live/api/hubspot/oauth/callback).
  • Store client_id and client_secret in Bolt environment variables.
  • Build an /oauth/start route (redirects user to HubSpot).
  • Build an /oauth/callback route (HubSpot sends back code → you exchange it for access\_token).

All of this uses standard OAuth 2.0. Bolt.new does not change any part of the protocol.

 

Webhook Integration (Optional, Very Common)

 

If you want HubSpot to notify your Bolt app automatically (example: contact created), you register a webhook inside HubSpot and point it to your Bolt server endpoint like /api/hubspot/webhook. Bolt receives the POST payload and processes it normally. No special work is needed — just a public URL and a POST handler.

 

The Bottom Line

 

Bolt.new integrates with HubSpot the same way any real-world app does: by storing HubSpot credentials as environment variables, making REST API calls from Bolt’s server runtime, and optionally implementing OAuth and webhooks. Bolt’s advantage is speed — you scaffold, test, and iterate in a single browser workspace, but all integration patterns are 100% standard and production-valid.

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