Step-by-step guide to integrate Bolt.new AI with Google Ads in 2025 and improve campaign performance with smarter, automated workflows.

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 AI with Google Ads, you don’t “plug Bolt into Google Ads directly.” Instead, you build a normal full‑stack integration inside a Bolt.new project: your backend calls the Google Ads API using OAuth2 credentials, Bolt.new simply hosts your code while you prototype. The key steps are: create a Google Cloud project, enable Google Ads API, configure OAuth2 (or a service account if using a manager account + offline flow), store credentials in Bolt.new environment variables, and then call the Google Ads REST endpoints or use the official Google Ads API client libraries inside your Bolt backend. There is no special magic — just standard API integration.
You are doing three things:
Bolt.new is simply the coding workspace. All real integration happens through Google’s normal API channels.
These steps are the real required sequence for any Google Ads integration, whether inside Bolt.new or your own environment.
https://<your-bolt-id>.bolt.run/oauth/callback
In Bolt.new “Environment” panel, define:
These values never go in source code — only environment variables.
Your backend must expose two routes:
Here is a real Node.js example you can drop directly into a Bolt.new Express backend:
// auth.js
import express from "express";
import axios from "axios";
import querystring from "querystring";
const router = express.Router();
router.get("/google/start", (req, res) => {
const redirectUri = encodeURIComponent("https://your-bolt-id.bolt.run/oauth/callback");
const scope = encodeURIComponent("https://www.googleapis.com/auth/adwords");
const url =
"https://accounts.google.com/o/oauth2/v2/auth?" +
`client_id=${process.env.GOOGLE_CLIENT_ID}` +
`&redirect_uri=${redirectUri}` +
`&response_type=code&access_type=offline&prompt=consent&scope=${scope}`;
res.redirect(url);
});
router.get("/oauth/callback", async (req, res) => {
const code = req.query.code;
const tokenRes = await axios.post(
"https://oauth2.googleapis.com/token",
querystring.stringify({
code,
client_id: process.env.GOOGLE_CLIENT_ID,
client_secret: process.env.GOOGLE_CLIENT_SECRET,
redirect_uri: "https://your-bolt-id.bolt.run/oauth/callback",
grant_type: "authorization_code"
}),
{ headers: { "Content-Type": "application/x-www-form-urlencoded" } }
);
// Store tokenRes.data.refresh_token securely (database, encrypted)
console.log("Tokens received:", tokenRes.data);
res.send("OAuth completed.");
});
export default router;
You have two options: REST or the official client library. REST works well inside Bolt prototypes.
Example REST call to retrieve campaigns:
// googleAds.js
import axios from "axios";
export async function listCampaigns(accessToken, customerId) {
const query = "SELECT campaign.id, campaign.name FROM campaign ORDER BY campaign.id";
const res = await axios.post(
`https://googleads.googleapis.com/v15/customers/${customerId}/googleAds:search`,
{ query },
{
headers: {
Authorization: `Bearer ${accessToken}`,
"developer-token": process.env.GOOGLE_DEVELOPER_TOKEN,
"login-customer-id": process.env.GOOGLE_LOGIN_CUSTOMER_ID // required for MCC
}
}
);
return res.data;
}
When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.