Skip to content
BlokloDocumentation

Google Ads

Google Ads campaign statistics: impressions, clicks, cost and conversions, for example an ads summary in the app's dashboard.

Connection type: For the app and the agent. Sign-in: Sign in with a Google account in the provider's window and approve the permissions listed below. No passwords or keys are entered in Bloklo.

How it works

The app and the agent never see the credentials. They call the Google Ads API through the Bloklo gateway, for example fetch("/gw/<connection id>/v26/customers:listAccessibleCustomers"). The gateway appends the path to the address https://googleads.googleapis.com, adds an access token from the Google sign-in, renewed automatically, and passes the service's response back to the app.

  • Reads (GET) go through at once. Writes (POST, PUT, PATCH, DELETE) go through at once only when the connection is set to Always allow; otherwise the gateway returns status 202 with an approval_id and the write waits for approval in the panel (see Agent permissions).
  • The Test button sends GET /v26/customers:listAccessibleCustomers and checks that the service accepted the credentials.

REST API versioned in the path (currently /v26; versions sunset after about a year, v26 in November 2027), JSON bodies. Reports are written in GAQL and sent through googleAds:search (pages of 10,000 rows, further pages via pageToken) or googleAds:searchStream (the whole result in one response). Changes are :mutate calls with a list of create, update (with updateMask) and remove operations, all or nothing by default. Cost in responses is in micros (cost_micros). An account managed through a manager account needs the login-customer-id header.

Before you start

  • A Google account with access to the data the app should use.

Connecting in Bloklo

  1. Open Connectors in the sidebar and find Google Ads.
  2. Click Connect and enter a connection name in Details.
  3. Click Connect. The Google sign-in window opens.
  4. Choose the Google account and approve the permissions. After approval you return to Bloklo and the connection is active.
  5. Attach the connection to a project: Attach to a project… on the connection page, or describe the task in the project chat.
Note

Until Google verifies the Bloklo app, the sign-in window may warn that the app is unverified. To continue, choose Advanced and then Go to bloklo.com. Until then at most 100 Google accounts can connect.

Provider permissions

Bloklo asks Google for exactly these scopes: https://www.googleapis.com/auth/adwords. Access can be revoked at any time by removing the connection in Bloklo or in the Google account settings.

Note

The Google account needs access to the Google Ads account. An account managed through a manager account needs the manager ID (the agent asks for it when needed).

Google Ads documentation

Example prompts

Prompts to type in the chat of a project with the connection attached:

  • “Build a dashboard of campaigns from the last 30 days: impressions, clicks, cost and conversions.”
  • “Show a ranking of keywords by cost on the page.”
  • “Add a button that pauses a chosen campaign.”

API methods

The most commonly used Google Ads API methods. The path goes after /gw/<connection id>; parts in braces, such as {id}, are replaced with values. The gateway treats every request other than GET as a write, including queries sent with POST (such as search or GraphQL), so they need approval unless the connection is set to Always allow. The full list of methods is in the provider's documentation.

MethodPathWhat it doesIn the gateway
GET/v26/customers:listAccessibleCustomersList accounts accessible to the userread
POST/v26/customers/{customerId}/googleAds:searchGAQL report with pagingwrite (approval)
POST/v26/customers/{customerId}/googleAds:searchStreamGAQL report streamed, whole resultwrite (approval)
POST/v26/customers/{customerId}/campaigns:mutateCreate, update and remove campaignswrite (approval)
POST/v26/customers/{customerId}/campaignBudgets:mutateChange campaign budgetswrite (approval)
POST/v26/customers/{customerId}/adGroups:mutateCreate and update ad groupswrite (approval)
POST/v26/customers/{customerId}/adGroupAds:mutateCreate and update adswrite (approval)
POST/v26/customers/{customerId}/adGroupCriteria:mutateManage ad group keywordswrite (approval)

Service limits

The daily operation limit depends on the project's access level: Test 15,000 (test accounts only), Explorer 2,880 on production accounts, Basic 15,000, Standard unlimited (24-hour window; every search request and every mutate operation counts, further pages with a valid pageToken do not). Exceeding it returns RESOURCE_EXHAUSTED. Up to 10,000 operations per mutate request (TOO_MANY_MUTATE_OPERATIONS). Rate (QPS, requests and operations per minute) has no fixed value and depends on load (RESOURCE_TEMPORARILY_EXHAUSTED, retry with exponential backoff and jitter). GAQL IN clause: up to 20,000 values; keyword idea generators: 1 request per second per account.

Google Ads API reference

Agent actions and permissions

ActionTypeWhat the agent uses it for
Read datareadFetches data from the service, such as a list of records, to build and check the app. Examples: list accounts accessible to the user.
Write datawriteRequests other than GET: creating, changing or deleting data in the service, and also queries sent with POST (such as search). Examples: GAQL report with paging; GAQL report streamed, whole result; create, update and remove campaigns.
Tip

By default, reads run without asking and writes need approval in the chat. Change this on the connector page or in Settings → Agent permissions (see Agent permissions).

Troubleshooting

The connection says it needs reconnecting

Access was revoked in the Google account, expired, or the password changed. Open the connection and click Authorize.

The test returns HTTP 403

The account has no access to this data, or some permissions were unticked during sign-in. Reconnect and approve all permissions.

Limits and security

  • One connection can make up to 1,000 requests per minute; the service's own limits also apply.
  • Credentials are encrypted and not shown in the browser after saving; only the names of stored fields are visible.
  • A published app works for every visitor: protect the data the connection gives access to with sign-in in the app.

Something unclear or out of date? Contact us