/bolt-ai-integration

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

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

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 Google Ads?

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.

 

What You’re Actually Doing When You “Integrate Bolt.new with Google Ads”

 

You are doing three things:

  • Creating a backend service (Node.js typically) inside Bolt.new.
  • Authenticating that backend with Google Ads using OAuth2 or service account + impersonation.
  • Calling Google Ads API endpoints to read or modify campaigns, ads, metrics, etc.

Bolt.new is simply the coding workspace. All real integration happens through Google’s normal API channels.

 

Step-by-Step: Setting Up Google Ads API Access

 

These steps are the real required sequence for any Google Ads integration, whether inside Bolt.new or your own environment.

  • Create a Google Cloud project at console.cloud.google.com.
  • Enable the Google Ads API in the project.
  • Go to APIs & Services → Credentials and create an OAuth 2.0 Client ID (Web application).
  • Add a redirect URI for your Bolt backend. During prototyping, this is usually:
    https://<your-bolt-id>.bolt.run/oauth/callback
  • Copy the client_id and client_secret into Bolt.new environment variables.
  • Obtain a developer token from Google Ads account (in Tools → API Center). Initially it's “test” mode until Google approves it.
  • If managing multiple accounts, get the Login-Customer-ID for your manager account.

 

Configure Bolt.new Environment Variables

 

In Bolt.new “Environment” panel, define:

  • GOOGLE_CLIENT_ID
  • GOOGLE_CLIENT_SECRET
  • GOOGLE_DEVELOPER_TOKEN
  • GOOGLE_LOGIN_CUSTOMER\_ID (optional, for MCC accounts)

These values never go in source code — only environment variables.

 

Implement OAuth2 Flow (Bolt Backend)

 

Your backend must expose two routes:

  • A “login” route that redirects the user to Google’s OAuth screen.
  • A “callback” route that receives the authorization code and exchanges it for access + refresh tokens.

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;

 

Calling Google Ads API From Bolt Backend

 

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;
}

 

Hardening for Production

 

  • Store refresh tokens in a database, encrypted.
  • Rotate OAuth credentials if leaked.
  • Use a proper backend URL (domain, HTTPS) instead of the temporary Bolt.run URL.
  • Serve the OAuth callback from your production backend, not the Bolt workspace.

 

Key Points to Remember

 

  • Bolt.new does not integrate with Google Ads automatically — you write the integration.
  • You must follow the normal Google Ads API authentication flow.
  • The most important piece is obtaining OAuth refresh tokens and storing them safely.
  • Once authenticated, everything is just HTTP requests or client library calls.

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