/bolt-ai-integration

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

Learn how to integrate Bolt.new AI with Salesforce in 2025 using this simple step-by-step guide to boost automation, efficiency, and workflow speed.

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 Salesforce?

To integrate Bolt.new with Salesforce, you don’t “connect Bolt itself.” You build a normal web app inside Bolt.new, then talk to Salesforce through its REST API using OAuth (for user-level access) or a Connected App with a Client ID/Secret (for server-to-server). In practice, you create a Salesforce Connected App, enable OAuth scopes, drop the credentials into Bolt.new environment variables, and then make standard REST calls from your Bolt server routes. Bolt is just the workspace; the integration is the code you write plus the credentials you provide. Once that is set, your Bolt app can read/write Salesforce objects like Leads, Accounts, Contacts, and custom objects securely.

 

What Salesforce Integration Means in Bolt.new

 

Bolt.new runs a Node.js/Express backend you control. Integrating with Salesforce means your backend sends requests to Salesforce’s REST API. For that, you must authenticate using OAuth 2.0.

  • OAuth 2.0 = secure login method where Salesforce issues access tokens.
  • Connected App = a configuration inside Salesforce that gives you Client ID and Client Secret.
  • Environment variables = secret values you store in Bolt.new so they are not hard-coded.
  • REST API = Salesforce endpoint URLs for CRUD operations on objects.

 

Step-by-Step: Setting up the Salesforce side

 

  • In Salesforce Setup, search for App Manager, create a New Connected App.
  • Enable OAuth Settings.
  • Set callback URL to something Bolt can serve, for example:
    https://YOUR-BOLT-APP-url/api/auth/salesforce/callback
  • Select scopes such as:
    Access and manage your data (api)
    Perform requests on your behalf at any time (refresh_token, offline_access)
  • Save → Salesforce generates a Consumer Key (Client ID) and Consumer Secret.

 

Step-by-Step: Configure Bolt.new environment

 

  • Add these environment variables in Bolt.new:
    SF_CLIENT_ID
    SF_CLIENT_SECRET
    SF_REDIRECT_URI
    SF_LOGIN_URL (use https://login.salesforce.com for production, https://test.salesforce.com for sandbox)

 

Implement OAuth flow in Bolt.new (Node.js example)

 

Below is a working minimal version using plain fetch and Express. It shows how to begin the Salesforce login, then exchange the code for tokens.

 

// server.js (Bolt.new backend)

import express from "express";
import fetch from "node-fetch";
import dotenv from "dotenv";

dotenv.config();
const app = express();

const {
  SF_CLIENT_ID,
  SF_CLIENT_SECRET,
  SF_REDIRECT_URI,
  SF_LOGIN_URL
} = process.env;

// Start OAuth flow
app.get("/api/auth/salesforce", (req, res) => {
  const url =
    `${SF_LOGIN_URL}/services/oauth2/authorize` +
    `?response_type=code` +
    `&client_id=${SF_CLIENT_ID}` +
    `&redirect_uri=${encodeURIComponent(SF_REDIRECT_URI)}`;

  res.redirect(url);
});

// OAuth callback
app.get("/api/auth/salesforce/callback", async (req, res) => {
  const code = req.query.code;

  const tokenURL = `${SF_LOGIN_URL}/services/oauth2/token`;
  const body = new URLSearchParams({
    grant_type: "authorization_code",
    code,
    client_id: SF_CLIENT_ID,
    client_secret: SF_CLIENT_SECRET,
    redirect_uri: SF_REDIRECT_URI
  });

  const tokenResponse = await fetch(tokenURL, {
    method: "POST",
    body
  });

  const tokens = await tokenResponse.json();
  // tokens.access_token
  // tokens.instance_url
  // tokens.refresh_token (if scope allowed)

  res.json(tokens); // In production, store securely!
});

// Example: fetch Salesforce data using access token
app.get("/api/salesforce/accounts", async (req, res) => {
  const accessToken = req.headers["sf-access-token"]; // In real app, retrieve from session/DB.
  const instanceUrl = req.headers["sf-instance-url"];

  const response = await fetch(
    `${instanceUrl}/services/data/v57.0/query?q=SELECT+Id,Name+FROM+Account`,
    {
      headers: {
        Authorization: `Bearer ${accessToken}`
      }
    }
  );

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

app.listen(3000, () => console.log("Server running"));

 

How to test inside Bolt.new

 

  • Run the backend inside Bolt.new.
  • Visit /api/auth/salesforce in the preview browser → Salesforce login prompt.
  • After authentation, Salesforce redirects back with tokens.
  • Use tokens to hit routes like /api/salesforce/accounts.

 

Hardening for real production

 

  • Store tokens securely (database, encrypted storage).
  • Use refresh tokens to automatically renew access tokens.
  • Validate allowed IP ranges or enforce CORS rules.
  • Hide Client Secret in environment variables only.

 

Key idea

 

You are not “integrating Bolt” with Salesforce — you are integrating your Bolt-hosted application with Salesforce’s standard OAuth + REST API. Bolt.new simply gives you a place to write, run, and test the full integration end‑to‑end.

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