# Google Services Setup Walkthrough

**For:** Command Sovereignty Integration  
**Estimated time:** 15–20 minutes  
**What you'll need:** A Google account with access to your Google Ads account

---

## Why This Matters

This connects your Google Ads data and Google Sheets directly into Command Sovereignty so you can:
- Pull campaign performance data (spend, clicks, conversions) into dashboards
- Sync your marketing spreadsheets automatically
- Stop manual data entry

You only do this **once**. After that, everything runs automatically.

---

## Step 1: Create a Google Cloud Project

1. Go to [Google Cloud Console](https://console.cloud.google.com/)
2. Sign in with the Google account that manages your Google Ads
3. At the top, click the project dropdown (it might say "Select a project")
4. Click **New Project** in the top right
5. Name it: **`Command Sovereignty Integration`**
6. Click **Create**
7. Wait for it to appear, then click on it to select it

---

## Step 2: Enable the APIs

### 2A: Enable Google Ads API

1. In the left sidebar, click **APIs & Services** → **Library**
2. Search for **"Google Ads API"**
3. Click it, then click **Enable**

### 2B: Enable Google Sheets API

1. Still on the Library page, search for **"Google Sheets API"**
2. Click it, then click **Enable**

Both should now show **ENABLED** with a green checkmark.

---

## Step 3: Create OAuth 2.0 Credentials

1. In the left sidebar, click **APIs & Services** → **Credentials**
2. Click **+ CREATE CREDENTIALS** at the top → **OAuth client ID**
3. If prompted about the "OAuth consent screen," click **Configure consent screen** first:
   - **User Type:** choose **External** → Click **Create**
   - **App name:** `Command Sovereignty Integration`
   - **User support email:** pick your email
   - **Developer contact email:** your email → Click **Save and Continue**
   - **Scopes:** Click **Save and Continue** (skip)
   - **Test users:** Click **Add Users** → type your email address → Click **Save and Continue**
   - Review → Click **Back to Dashboard**
4. Now back on Credentials page, click **+ CREATE CREDENTIALS** → **OAuth client ID** again
5. **Application type:** select **Web application**
6. **Name:** `Command Sovereignty OAuth`
7. **Authorized redirect URIs:** click **Add URI** and enter each one below, then click **Add URI** again for the second:

   ```
   https://builtdomains.com/api/connectors/oauth/callback/google_ads
   ```
   Click **Add URI** again, then:
   ```
   https://builtdomains.com/api/connectors/oauth/callback/google_sheets
   ```

8. Click **Create** at the bottom

### ⚠️ IMPORTANT: Save These Immediately

A popup appears with your **Client ID** and **Client Secret**. **Copy both and send them to your developer NOW.**

The Client Secret is only shown **once**. If you lose it, you'll need to delete and recreate.

```
Client ID:       (long string with .apps.googleusercontent.com)
Client Secret:   (random-looking string)
```

---

## Step 4: Get Your Google Ads Developer Token

This is a separate credential from the OAuth above. It's unique to your Google Ads account.

1. Go to [Google Ads Developer Center](https://ads.google.com/home/tools/developer-center/)
2. Sign in with the same Google account
3. Click **Request access** (if you haven't used the API before) or **Go to Developer Center**
4. Fill out the form:
   - **How will you use the API?** Choose the options that apply to your business
   - You may need to describe your use case — just be honest: *"We're using it to pull campaign performance data into our business management dashboard."*
5. Submit and wait for approval (usually 24–48 hours for new accounts, sometimes instant)
6. Once approved, you'll see a **Developer Token** that looks like:
   ```
   AbCdEfGhIjKlMnOpQrStUv
   ```
7. **Copy this token and send it to your developer**

> **Note:** If your account already has a Developer Token, you'll see it immediately on the Developer Center page — no approval needed.

---

## Step 5: Send Everything to Your Developer

Send these three things in one message:

| Item | Where to find it |
|------|------------------|
| **Client ID** | From Step 3 — the popup with `.apps.googleusercontent.com` |
| **Client Secret** | From Step 3 — same popup (only shown once!) |
| **Developer Token** | From Step 4 — the string on Developer Center page |

---

## Troubleshooting

### "You don't have permission to enable APIs"
You need an account with **Owner** or **Editor** role on the Google Cloud project. If you use a managed GCP account, contact your IT person.

### Developer Token approval takes too long
Google reviews new Developer Tokens manually. You can speed it up by:
- Having an existing Google Ads account in good standing (active campaigns, no policy violations)
- Providing a business website URL in the application
- If your account has been running ads for 6+ months, approval is usually faster

### "OAuth consent screen shows 'This app is not verified'"
This is **normal** for testing. Since you added yourself as a test user in Step 3, you can proceed past the warning. Once production-ready, your developer can handle verification.

---

## What Happens Next

Once your developer has these three credentials:
1. They drop them into the system configuration
2. You click **"Connect Google Ads"** and **"Connect Google Sheets"** in Command Sovereignty
3. You sign in to Google one time to authorize
4. Data starts flowing automatically

No further action needed from you.