Google Ads Query
Run a read-only GAQL query against a Google Ads account and get the rows
What does the Google Ads Query node do?
The Google Ads Query node runs a GAQL (Google Ads Query Language) query you write against one Google Ads account and returns the rows. It is the Google Ads counterpart of the BigQuery Reader node: you choose the resource, the fields, the filters and the order.
Common uses:
- Budget pacing: spend per day against each campaign budget
- Spend vs. daily budget, to catch campaigns about to overspend
- Campaigns limited by budget (lost impression share)
- Any report the Google Ads Campaign Reports node does not cover
GAQL is read-only: the node only reads data. It never changes a campaign, a budget or a bid.
Quick setup
Connect Google Ads
Go to Builder → Integrations → Google Ads and connect the account that can see the customer you want to query.
Add the node
Integrations → Google → Google Ads Query.
Pick the customer account
Select the Customer account in the list. If access goes through a manager (MCC) account, also fill Login customer ID with the manager account ID.
Write the query
Click Write query. In the editor, write a SELECT … FROM … query, then click Validate: Google checks the syntax and the fields without running the query (no data is read). After a change, Save stays disabled until the query is valid.
Test it
In the Test with real data panel, fill a sample value for each {{variable}} and click Run test: the query really runs, and you see its first 100 rows, how many rows it returns in total and their estimated size.
Configuration parameters
Required fields
integration_id string required Google Ads account connected to Draft & Goal. The default Google Ads integration of your organization is preselected.
customer_id string required Google Ads account to query, picked from the list. Tick Use a variable for the customer ID to type a variable such as {{customerId}} instead. Dashes are accepted (123-456-7890).
query string required A single read-only SELECT … FROM … GAQL query. Use {{variables}} for values coming from upstream nodes, e.g. segments.date BETWEEN '{{start_date}}' AND '{{end_date}}'.
Optional fields
login_customer_id string Manager (MCC) account ID. Needed only when the connected Google account reaches the customer through a manager account.
mode string default: SearchStream SearchStream returns every row in a single call. Search pages through the results. Both return the same rows.
output_format string default: json_rows JSON rows: a list of objects, ready for a Loop or an LLM. Table: { "columns": [...], "rows": [[...]] }, ready for Google Sheets Writer.
Data limit: a query returning more than 20,000 rows or about 10 MB cannot be saved once a test has shown it, and fails at run time with an explicit message. Narrow the date range, add WHERE filters, select fewer fields, or add a LIMIT.
What does the node output?
With JSON rows (default), one object per row. Field names are flattened and converted to camelCase; metrics. and segments. prefixes are dropped; micros fields are converted to the account currency.
[
{
"date": "2026-10-26",
"campaignId": "1111111111",
"campaignName": "Brand FR",
"campaignBudgetAmount": 50.0,
"cost": 48.21,
"searchBudgetLostImpressionShare": 0.12
}
]
campaignId string From campaign.id. IDs stay strings.
cost number From metrics.cost_micros, divided by 1,000,000 (account currency).
date string From segments.date.
With Table, the same data as columns plus rows:
{
"columns": ["date", "campaignId", "campaignName", "cost"],
"rows": [["2026-10-26", "1111111111", "Brand FR", 48.21]]
}
Usage examples
Recipe 1: Budget pacing
Spend per day against the budget of each enabled campaign, over the last 30 days.
SELECT
segments.date,
campaign.id,
campaign.name,
campaign_budget.id,
campaign_budget.amount_micros,
campaign_budget.period,
campaign_budget.explicitly_shared,
metrics.cost_micros,
metrics.search_budget_lost_impression_share,
metrics.search_budget_lost_top_impression_share
FROM campaign
WHERE segments.date DURING LAST_30_DAYS
AND campaign.status = 'ENABLED'
ORDER BY segments.date DESC
Google Ads Query → LLM (pacing summary) → Email Sender
Recipe 2: Spend vs. daily budget (today)
SELECT
campaign.name,
campaign_budget.amount_micros,
metrics.cost_micros
FROM campaign
WHERE segments.date DURING TODAY
AND campaign.status = 'ENABLED'
AND campaign_budget.period = 'DAILY'
ORDER BY metrics.cost_micros DESC
Compare cost with campaignBudgetAmount downstream (Code Block or LLM) to flag campaigns close to their daily budget.
Recipe 3: Campaigns limited by budget
SELECT
campaign.id,
campaign.name,
campaign_budget.amount_micros,
metrics.cost_micros,
metrics.search_budget_lost_impression_share
FROM campaign
WHERE segments.date DURING LAST_7_DAYS
AND campaign.status = 'ENABLED'
AND metrics.search_budget_lost_impression_share > 0.1
ORDER BY metrics.search_budget_lost_impression_share DESC
Google Ads Query (Table) → Google Sheets Writer
Dates from an upstream node
SELECT campaign.name, metrics.clicks, metrics.cost_micros
FROM campaign
WHERE segments.date BETWEEN '{{start_date}}' AND '{{end_date}}'
At run time, {{start_date}} and {{end_date}} take the values of the upstream node outputs. Validate fills empty variables with sample values (a date inside quotes, 1 elsewhere). A variable that stands for an enum, a field or a clause needs a value in the Test with real data panel, used by both Validate and the test.
Put text variables inside quotes, e.g. campaign.name = '{{name}}': their values are escaped, so apostrophes, quotes and accents (Soldes d'été, ¿Año nuevo?) work in any language. Values outside quotes are inserted as is, for numbers, enums and date ranges.
Best practices
- Always filter on
segments.datewhen you select metrics: without a date filter, Google returns all-time totals. - Validate after every change, then run a test: the test shows the row count and size, so you know the query stays under the limit.
- Select only the fields downstream nodes need. Fewer fields means smaller rows and faster runs.
- Use Table output for Google Sheets Writer, JSON rows for Loop and LLM nodes.
Common issues
Save is disabled in the editor
Cause: the modified query was not validated, is invalid, or its test returned too much data.
Solution: click Validate and read the message next to the button. If the test reports too many rows, narrow the date range, add filters or add a LIMIT.
Invalid GAQL query: Unrecognized field
Cause: a field name does not exist or cannot be selected with this resource.
Solution: check the field in the Google Ads query builder for the resource in your FROM clause.
The connected Google account cannot access this customer
Cause: access to the customer goes through a manager (MCC) account.
Solution: fill Login customer ID with the manager account ID.
Provide a sample value for: start_date
Cause: the test runs the real query, and a {{variable}} has no value in the editor.
Solution: fill the variable in the Test with real data panel, then run the test again.
Google Ads API quota exhausted
Cause: too many Google Ads API calls in a short time for this developer token.
Solution: retry later, or run fewer queries in parallel (for example in a Loop).