Skip to content
BlokloDocumentation

Google Business Profile

Google Business Profile: locations, reviews and replies, and statistics (website clicks, calls, direction requests).

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 Business Profile API through the Bloklo gateway, for example fetch("/gw/<connection id>/v1/accounts"). The gateway appends the path to the address https://mybusinessbusinessinformation.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 /v1/accounts and checks that the service accepted the credentials.
Note

Some methods run on another host of the same service (noted in the methods table). Choose that host with the X-Bloklo-Host header, for example X-Bloklo-Host: mybusinessaccountmanagement.googleapis.com; the gateway accepts only the provider hosts allowed in the connector definition.

Business Profile is a set of separate APIs, each on its own host: accounts (mybusinessaccountmanagement.googleapis.com, v1), locations (mybusinessbusinessinformation.googleapis.com, v1), reviews and posts (mybusiness.googleapis.com, v4) and performance (businessprofileperformance.googleapis.com, v1). Locations require a readMask parameter and updates an updateMask. Lists are paged with pageToken. Access requires approval of the Google Cloud project (without it the quota is 0) and a verified profile that has been active for over 60 days and has a website.

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 Business Profile.
  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/business.manage. Access can be revoked at any time by removing the connection in Bloklo or in the Google account settings.

Note

The Google account must manage the business profile. Google grants access to this API separately, on application; until it is approved the connection returns a permission error.

Google Business Profile documentation

Example prompts

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

  • “Show the latest reviews from the Google listing with the average rating on the page.”
  • “Add a panel for replying to customer reviews directly from the app.”
  • “Build a report of website clicks, calls and direction requests from the listing for the last month.”

API methods

The most commonly used Google Business Profile 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/v1/accountsList accounts (accounts host)read
GET/v1/accounts/{accountId}/locationsList an account's locations with readMaskread
PATCH/v1/locations/{locationId}Update location data with updateMaskwrite (approval)
GET/v4/accounts/{accountId}/locations/{locationId}/reviewsList a location's reviews (v4 host)read
GET/v4/accounts/{accountId}/locations/{locationId}/reviews/{reviewId}Get a review (v4 host)read
PUT/v4/accounts/{accountId}/locations/{locationId}/reviews/{reviewId}/replyReply to a review or edit the reply (v4 host)write (approval)
DELETE/v4/accounts/{accountId}/locations/{locationId}/reviews/{reviewId}/replyDelete a review reply (v4 host)write (approval)
GET/v4/accounts/{accountId}/locations/{locationId}/localPostsList a location's posts (v4 host)read
POST/v4/accounts/{accountId}/locations/{locationId}/localPostsCreate a location post (v4 host)write (approval)
GET/v1/locations/{locationId}:fetchMultiDailyMetricsTimeSeriesDaily location metrics (performance host)read

Service limits

300 queries per minute (QPM) for Business Information, Account Management, Performance and the other APIs; an approved project has 300 QPM, and a quota of 0 means it is not approved. Create location and SearchGoogleLocation: 300 per day each; update location: 10,000 per day; edits: 10 per minute per profile (cannot be increased). Page sizes: accounts up to 20, locations up to 100 (default 10), reviews up to 50, posts up to 100 (default 20). Metrics are daily only.

Google Business Profile 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 (accounts host); list an account's locations with readMask; list a location's reviews (v4 host).
Write datawriteRequests other than GET: creating, changing or deleting data in the service, and also queries sent with POST (such as search). Examples: update location data with updateMask; reply to a review or edit the reply (v4 host); delete a review reply (v4 host).
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