Google Ads
Connect your Google Ads account to Yellow.ai so that your AI agent can look up your campaigns and their results during a conversation. For example, it can tell a marketer which campaigns are running, or how many clicks a campaign got last week.
The integration only reads data. It can't create, change, pause or delete anything in your Google Ads account.
What you can do
| Action | What it does | What you give it |
|---|---|---|
| Get campaign | Looks up one campaign and returns its name, status, type, and start and end dates. | Customer ID and Campaign ID |
| Get all campaigns | Lists the campaigns in the account, with each campaign's ID, name and status. Removed campaigns are left out. | Customer ID |
| Search with GAQL | Runs a report that you describe in a short query, for example the clicks and cost of each campaign in the last 7 days. | Customer ID and a GAQL query |
How setup works
You set this up once, and it takes about 20 minutes. There are three parts:
- In Google Cloud: create an app that lets Yellow.ai read your Google Ads data, and copy its Client ID and Client secret.
- In Yellow.ai: paste those two values and sign in with Google.
- In your flows: add the Google Ads actions where you need them.
Before you begin
Make sure you have the following:
- A Google account that can open your Google Ads account directly, with Read only access or higher. If you reach the account only through a manager account, ask a Google Ads admin to add you to the account itself. Admins do this in Google Ads, in Admin > Access and security.
- Access to Google Cloud console, with permission to create a project. If your company restricts Google Cloud, ask your IT team for help.
- Your Google Ads customer ID. Sign in to Google Ads and click your profile picture in the top right corner. Your 10-digit customer ID is shown under your account name, for example
123-456-7890. - Yellow.ai open in another browser tab.
Whenever Yellow.ai asks for a Customer ID, type the 10 digits without the dashes: 1234567890, not 123-456-7890.
Part 1: Set up Google Cloud
Yellow.ai connects to Google Ads through an app that you create in your own Google Cloud project. Google calls this app an OAuth client. Because the app is in your own project, you stay in control. You can see it, change it, or turn off Yellow.ai's access at any time.
Google also decides how much each project can do with Google Ads. This is called the project's access level. New projects start with Test access, which only works with Google Ads test accounts. In Step 3, you ask Google for Explorer access, so that you can use your real Google Ads account.
You don't need a Google Ads developer token. Google retired developer tokens on 9 September 2026. Older guides may still ask for one, but Google now uses your project's access level instead.
Step 1: Create a Google Cloud project
You can also use a Google Cloud project that you already manage. In that case, select it and go to Step 2.
- Go to Google Cloud console and sign in.
- Click the project picker at the top of the page, and then click New project.
- In Project name, enter a name you'll recognize later, for example
Yellow.ai Google Ads, and click Create. - Make sure your new project is selected in the project picker before you continue.
Step 2: Turn on the Google Ads API
- Open the Google Ads API page in Google Cloud console. Check that your project is selected at the top of the page.
- Click Enable.
Your project now has Test access.
Step 3: Get Explorer access
- Open the Google Ads API Overview page for your project.
- Check that your current access level is Test.
- Expand Upgrade access level.
- Check that Next access level shows Explorer.
- Click Apply for access, and complete the application.
In most cases, Google reviews the application automatically and upgrades your project to Explorer within minutes. Open the Google Ads API Overview page again to check that your access level now shows Explorer.
Here's what each access level allows. Each time a Google Ads action runs in your flow, it uses one request.
| Access level | Works with | Requests per day | How to get it |
|---|---|---|---|
| Test | Google Ads test accounts only. Test accounts don't run real ads. | 15,000 | Given automatically in Step 2 |
| Explorer | Your real Google Ads accounts | 2,880 | Apply in this step. This is enough for most teams. |
| Basic | Your real Google Ads accounts | 15,000 | Apply on the same page once you have Explorer. Your project needs Google's brand verification first. |
| Standard | Your real Google Ads accounts | No daily limit | Apply on the same page once you have Basic. Google reviews it by hand, usually in about 10 business days. |
Google has a known issue that rejects Explorer and Basic applications from projects that are on the Google Cloud Free Trial, or whose billing account is suspended or disabled. If this happens, upgrade the project's billing to a paid account and apply again, or apply from a different project.
Step 4: Set up the consent screen
The consent screen is the page Google shows when you connect Yellow.ai. It tells you which app is asking for access.
-
In Google Cloud console, open the menu and go to Google Auth Platform > Branding. If you see Get started, click it.
-
In App Information, enter an App name, for example
Yellow.ai. Choose your User support email, and click Next. -
In Audience, choose who can connect, and click Next:
Choice What it means When to choose it Internal Only people in your company's Google Workspace can connect. There's no 7-day limit and no "unverified app" warning. Choose this if it's offered. Google offers it only when your project belongs to your company's Google Workspace organization. The Google account that connects must be in that organization too. External Anyone with a Google account can connect, once you publish the app in step 6. Choose this if Internal isn't offered, for example when you use a personal Gmail account. -
In Contact Information, enter your email address, and click Next.
-
In Finish, select the checkbox to agree to the Google API Services: User Data Policy, click Continue, and then click Create.
-
If you chose External: go to Google Auth Platform > Audience, click Publish app, and confirm. The publishing status changes to In production.
Don't skip step 6 if you chose External. While the app's publishing status is Testing, Google ends the connection after 7 days. The Google Ads actions in your flows then stop working until someone connects again.
You don't have to submit the app to Google for verification. Google shows a warning screen for apps it hasn't verified, and Part 2 explains what to click.
Step 5: Create the OAuth client
-
In Yellow.ai, go to Extensions > Integrations, and open Marketing > Google Ads. In the Instructions, find Authorized redirect URI and click the copy icon next to it.
The redirect URI looks similar to
https://cloud.yellow.ai/integration/oauth/google-ads. It's different for each Yellow.ai region, so always copy it from Yellow.ai instead of typing it. -
In Google Cloud console, go to Google Auth Platform > Clients, and click Create client.
-
In Application type, choose Web application.
-
In Name, enter a name you'll recognize, for example
Yellow.ai. This name only appears in Google Cloud console. -
Under Authorized redirect URIs, click Add URI, and paste the redirect URI that you copied from Yellow.ai.
-
Click Create.
-
Google shows the new client's Client ID and Client secret. Copy both, and keep them somewhere safe.
Google shows the Client secret only once, when you create the client. If you lose it, open the client in Google Auth Platform > Clients, click Add secret to create a new one, and use the new secret in Yellow.ai.
Treat the Client secret like a password. Don't share it by email or in chat.
Part 2: Connect Google Ads to Yellow.ai
-
In Yellow.ai, go to Extensions > Integrations, and open Marketing > Google Ads. You can also use the search box to find it.
-
In Account name, enter a unique name for this connection, for example
marketing-team. Choose a name that tells your team what it's for, because you pick this name in your flows. -
Paste the Client ID from Google into Client ID, and the Client secret into Client Secret.
-
Click Connect. A Google sign-in window opens.
-
Choose the Google account that can open your Google Ads account.
-
If Google shows Google hasn't verified this app, click Advanced, and then click Go to Yellow.ai (unsafe). Google shows the app name that you entered in Step 4. This screen is expected, because the app is the one you created in Part 1 and Google hasn't verified it.
-
Google asks you to allow access to your Google Ads data. Click Continue or Allow.
Google describes this access as viewing and changing your Google Ads data, because Google Ads uses one permission for both. The Yellow.ai Google Ads actions only read data.
-
The window closes, and the account shows as connected in Yellow.ai.
One connection works with every Google Ads account that the signed-in Google account can open. You choose which Google Ads account to use in each action, with the Customer ID.
To connect another Google account, click Add account and repeat steps 2 to 8 with a different account name.
- In a two-tier environment, such as AI agents with only Development and Live environments, you can add accounts only in Development. In Live, you can choose the accounts but not edit them.
- In a three-tier environment, such as AI agents with Staging, Sandbox and Production environments, you can add and edit accounts in Staging and Sandbox. In Production, only the accounts added in Staging are available, and you can only choose them.
Part 3: Use Google Ads in a flow
Add a Google Ads action
- Go to Automation, and open the flow where you need Google Ads data, or create a flow.
- Create a variable with the data type Object to hold the result. For example, name it
campaign_details. - At the point in the flow where you need the data, drag the node connector, and choose Integrations > Google Ads.
- Fill in the node:
- Account name: the account you connected in Part 2.
- Action: Get campaign, Get all campaigns or Search with GAQL.
- The action's fields, which are described below. Type a value, or select a variable to use a value from the conversation.
- Choose the variable from step 2 to store the response.
- To see what the action returns, click Show sample response.
Then show the data in a message.
Get campaign
| Field | What to enter |
|---|---|
| Customer ID | Your 10-digit Google Ads customer ID, without the dashes. For example, 1234567890. |
| Campaign ID | The ID of the campaign. To find a campaign's ID, use Get all campaigns. |
Example response:
{
"results": [
{
"campaign": {
"resourceName": "customers/1234567890/campaigns/123",
"id": "123",
"name": "Spring Sale",
"status": "ENABLED",
"primaryStatus": "ELIGIBLE",
"advertisingChannelType": "SEARCH",
"startDateTime": "2026-01-15 00:00:00",
"endDateTime": "2026-12-31 23:59:59"
}
}
],
"fieldMask": "campaign.id,campaign.name,campaign.status,campaign.primaryStatus,campaign.advertisingChannelType,campaign.startDateTime,campaign.endDateTime"
}
What the values mean:
| Value | Meaning |
|---|---|
name | The campaign's name. |
status | What the campaign is set to: ENABLED (switched on), PAUSED or REMOVED. |
primaryStatus | Whether the campaign can actually run right now. For example, ELIGIBLE (can run), LIMITED (running with limits, such as a low budget), PAUSED, PENDING (hasn't started yet) or ENDED. |
advertisingChannelType | The campaign type, for example SEARCH, DISPLAY, VIDEO, SHOPPING or PERFORMANCE_MAX. |
startDateTime, endDateTime | When the campaign starts and ends, in your Google Ads account's time zone. |
If no campaign in that account has the ID you entered, the response has no results list.
Get all campaigns
| Field | What to enter |
|---|---|
| Customer ID | Your 10-digit Google Ads customer ID, without the dashes. |
The campaigns are sorted by name. Example response:
{
"results": [
{
"campaign": {
"resourceName": "customers/1234567890/campaigns/123",
"id": "123",
"name": "Spring Sale",
"status": "ENABLED"
}
},
{
"campaign": {
"resourceName": "customers/1234567890/campaigns/456",
"id": "456",
"name": "Summer Launch",
"status": "PAUSED"
}
}
],
"fieldMask": "campaign.id,campaign.name,campaign.status"
}
Search with GAQL
GAQL (Google Ads Query Language) is how you ask Google Ads for a report. A query has three parts:
SELECT: the information you want, for example the campaign name and its clicks.FROM: what each row is about, usuallycampaign.WHERE: filters, such as a date range or only campaigns that are switched on. This part is optional.
| Field | What to enter |
|---|---|
| Customer ID | Your 10-digit Google Ads customer ID, without the dashes. |
| GAQL Query | The query. You can copy one of the examples below. |
Impressions, clicks and cost of each campaign in the last 7 days:
SELECT campaign.name, metrics.impressions, metrics.clicks, metrics.cost_micros FROM campaign WHERE segments.date DURING LAST_7_DAYS AND campaign.status != 'REMOVED'
Results of one campaign this month. Replace 123 with the campaign's ID.
SELECT campaign.name, metrics.impressions, metrics.clicks, metrics.conversions, metrics.cost_micros FROM campaign WHERE campaign.id = 123 AND segments.date DURING THIS_MONTH
Campaigns that are switched on:
SELECT campaign.id, campaign.name FROM campaign WHERE campaign.status = 'ENABLED'
To change the period, replace the word after DURING with one of these:
| Write | To get |
|---|---|
TODAY | Today only |
YESTERDAY | Yesterday only |
LAST_7_DAYS | The last 7 days, not including today |
LAST_30_DAYS | The last 30 days, not including today |
THIS_MONTH | All days in the current month |
LAST_MONTH | All days in the previous month |
Example response for the first query:
{
"results": [
{
"campaign": {
"resourceName": "customers/1234567890/campaigns/123",
"name": "Spring Sale"
},
"metrics": {
"impressions": "5120",
"clicks": "230",
"costMicros": "41500000"
}
}
],
"fieldMask": "campaign.name,metrics.impressions,metrics.clicks,metrics.costMicros"
}
How to read the response:
- Names are written differently in the response. The underscore is removed and the next letter becomes a capital, so
cost_microsin the query becomescostMicrosin the response. - Counts are returned as text, for example
"230"instead of230. cost_microsis the cost in millionths of your account's currency. Divide it by 1,000,000. For example,41500000means 41.50.
Google's Interactive GAQL query builder helps you choose fields and checks your query before you use it in Yellow.ai.
Show the data in a message
To show the result to the user, use the variable in a message node. Replace campaign_details with your variable's name.
| To show | Write |
|---|---|
| The campaign's name (Get campaign) | {{{variables.campaign_details.results.0.campaign.name}}} |
| Whether it can run (Get campaign) | {{{variables.campaign_details.results.0.campaign.primaryStatus}}} |
| The second campaign's name (Get all campaigns) | {{{variables.campaign_details.results.1.campaign.name}}} |
| The clicks in the first row (Search with GAQL) | {{{variables.campaign_details.results.0.metrics.clicks}}} |
In these examples, results.0 is the first item in the list, results.1 is the second, and so on.
If something doesn't work
When you connect
| What you see | What it means | What to do |
|---|---|---|
Error 400: redirect_uri_mismatch in the Google window | The redirect URI in your Google client doesn't exactly match the one in Yellow.ai, or Google hasn't applied it yet. | Copy the Authorized redirect URI from Yellow.ai again, and paste it into your client's Authorized redirect URIs. Google can take from 5 minutes to a few hours to apply a change, so wait a little before you try again. |
Error 401: invalid_client in the Google window | The Client ID is wrong. | Copy the Client ID from Google Auth Platform > Clients again, and paste it into Yellow.ai. |
Access blocked and Error 403: access_denied in the Google window | The app's audience is External, and its publishing status is still Testing. | In Google Auth Platform > Audience, click Publish app. Then connect again. |
Error 403: org_internal in the Google window | The app's audience is Internal, and you signed in with a Google account from outside your organization. | Sign in with an account from your organization. Or change the audience to External, and publish the app. |
| Google hasn't verified this app | This is expected for an External app that you created yourself. | Click Advanced, and then click Go to Yellow.ai (unsafe). |
| Yellow.ai shows an error after you sign in | The Client Secret is wrong. | Paste the Client secret again. If you no longer have it, create a new one with Add secret. |
When an action fails
A failed action returns a response with the same shape as the API error response sample in the node. In it, apiResponseStatusCode is the status code from Google, and apiResponseBody contains Google's explanation. Use them to find the cause:
| What the error response shows | What it means | What to do |
|---|---|---|
403, and CLOUD_PROJECT_NOT_APPROVED_FOR_PRODUCTION in apiResponseBody | Your Google Cloud project still has Test access. | Get Explorer access, and check that the Google Ads API Overview page shows Explorer. |
403, and USER_PERMISSION_DENIED in apiResponseBody | The connected Google account can't open this Google Ads account directly, or the Customer ID belongs to another account. | Check the Customer ID. Then ask a Google Ads admin to add the connected Google account to this Google Ads account itself, not only to a manager account. |
400 | The GAQL query has a mistake, or the Customer ID isn't 10 digits without dashes. apiResponseBody says which. | Fix the Customer ID, or check the query in Google's Interactive GAQL query builder. |
429, and RESOURCE_EXHAUSTED in apiResponseBody | Your project reached its daily limit, which is 2,880 requests with Explorer access. | Wait a few hours, or apply for Basic access on the Google Ads API Overview page. |
Token Generation/Refresh failed in error | The connection has stopped working. This happens when access is removed from the Google account, when the app stayed in Testing for more than 7 days, or when the connection wasn't used for 6 months. | Make sure the app is published (see Step 4). Then, in Yellow.ai, click Disconnect on the account, click Add account, and connect again with the same account name, so your flows keep working. |
If Get campaign succeeds but the response has no results list, no campaign with that ID exists in that Google Ads account. Check the Customer ID and the Campaign ID, and use Get all campaigns to see the right IDs.
References
- Access levels and permissible use (Google Ads API)
- Developer token sunset and the new sign-up (Google Ads API)
- Manage OAuth clients (Google Cloud Help)
- Manage app audience (Google Cloud Help)
- Refresh token expiration (Google Identity)
- Find your Google Ads customer ID (Google Ads Help)
- Google Ads Query Language overview (Google Ads API)
- Date ranges in GAQL (Google Ads API)
- Campaign fields you can query (Google Ads API)