# Google Business Profile

> Reviews of your customers' business locations, and the owner's replies, through your Google Cloud project with the single `business.manage` scope.

The permissions each operation needs are in [App Review: Google Business Profile](https://docs.koil.co/app-review#google_business_profile).

-   One Profile is one location, so connecting once discovers every location under every account it administers — a chain connects all its shops from one Connection.
-   Reviews are read-only: Google exposes no method that creates, edits, hides, deletes, or flags a review, so replying is the only owner action.
-   A reply has no id of its own — it is addressed by the id of the review it answers — so publishing to a review that already has a reply replaces it, the same write `update` makes; `text` is bounded at 4,096 \*\*bytes\*\* as UTF-8, not characters.
-   Google moderates every reply: a successful publish returns `pending` and becomes `approved` or `rejected` afterwards. Read the review to see the current state.
-   Reviews are listed most recently changed first, so a review the reviewer edits arrives again as an `updated` event. A review deleted on Google simply stops being listed: no event is emitted for it.
-   Google publishes review notifications to a Cloud Pub/Sub topic rather than an HTTP callback, so reviews are collected by polling at a fifteen-minute floor and there is no webhook URL to configure.
-   A review carries `rating` as whole stars on a 1–5 scale (with `percent`, which compares across platforms) and omits it when Google reports none; `reviewer` carries a display name and photo, or neither for an anonymous reviewer, because Google publishes no stable reviewer id.

Your Google Cloud project must be approved before it can make a single call

An unapproved project is capped at zero queries per minute. Approval requires a Business Profile verified and active for 60+ days, a website, and an application filed by an owner or manager on the profile. Replying additionally requires the location to be verified and, in a Workspace tenant, Google Search and/or Maps enabled by the admin.

| Collection | Operations | Events | Backfill |
| --- | --- | --- | --- |
| [`google_business_profile.locations.reviews`](https://docs.koil.co/platforms/google_business_profile#google_business_profile.locations.reviews) | `list`, `get` | `created`, `updated` | yes |
| [`google_business_profile.locations.review_replies`](https://docs.koil.co/platforms/google_business_profile#google_business_profile.locations.review_replies) | `get`, `publish`, `update`, `delete` | _none_ | no |

## `google_business_profile.locations.reviews`

### `list`

List the location's reviews, most recently changed first.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `profileId` | `string` | yes | Koil Profile associated with the operation. |
| `cursor` | `string` | no | Opaque cursor for fetching the next result page. |
| `limit` | `integer` | no | Maximum number of items to return. |
| `includePlatformRaw` | `boolean` | no | Whether to include transient platform-native payloads. |

JSON Schema

```json
{
  "type": "object",
  "required": [
    "profileId"
  ],
  "properties": {
    "profileId": {
      "type": "string",
      "description": "Koil Profile associated with the operation.",
      "minLength": 1
    },
    "cursor": {
      "type": "string",
      "description": "Opaque cursor for fetching the next result page.",
      "minLength": 1
    },
    "limit": {
      "type": "integer",
      "description": "Maximum number of items to return.",
      "minimum": 1,
      "maximum": 100
    },
    "includePlatformRaw": {
      "type": "boolean",
      "description": "Whether to include transient platform-native payloads."
    }
  },
  "additionalProperties": false
}
```

### `get`

Get one review of the location by platform id.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `profileId` | `string` | yes | Koil Profile associated with the operation. |
| `externalId` | `string` | yes |  |
| `includePlatformRaw` | `boolean` | no | Whether to include transient platform-native payloads. |

JSON Schema

```json
{
  "type": "object",
  "required": [
    "profileId",
    "externalId"
  ],
  "properties": {
    "profileId": {
      "type": "string",
      "description": "Koil Profile associated with the operation.",
      "minLength": 1
    },
    "externalId": {
      "type": "string",
      "minLength": 1
    },
    "includePlatformRaw": {
      "type": "boolean",
      "description": "Whether to include transient platform-native payloads."
    }
  },
  "additionalProperties": false
}
```

### Not offered

-   `resolve_attachment`: not applicable
-   `publish`: not applicable — A review is written by a customer on Google, never by the business.
-   `update`: platform not supported — Google exposes no method that edits a review.
-   `perform_action`: platform not supported — Google exposes no hide, spam, or report method on a review. Replying is the only owner action, on google\_business\_profile.locations.review\_replies.
-   `delete`: platform not supported — Google exposes no method that deletes a review; flagging one for a policy violation is a Business Profile UI action with no API.

### Events

-   [`content.google_business_profile.locations.reviews.created`](https://docs.koil.co/events#content.google_business_profile.locations.reviews.created)
-   [`content.google_business_profile.locations.reviews.updated`](https://docs.koil.co/events#content.google_business_profile.locations.reviews.updated)

Backfill: supported (bounded coverage); see [Backfill history](https://docs.koil.co/guides/backfill).

Item schema

What `list` and `get` return and what events carry as `data`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `externalId` | `string` | yes | Platform-owned content identifier. |
| `locationExternalId` | `string` | yes |  |
| `rating` | `object` | no | A score on the platform's own scale, with its position on that scale as a percentage. |
| `text` | `string` | no | Caption/body text for content. |
| `reviewer` | `object` | yes | The reviewer as Google reports them: a name and photo, or neither when anonymous. Google publishes no stable reviewer id. |
| `attachments` | `unknown \| unknown \| unknown[]` | no |  |
| `reply` | `object` | no |  |
| `publishedAt` | `string (date-time)` | no | When the platform published it. |
| `updatedAt` | `string (date-time)` | no | When the platform last updated it. |
| `platformRaw` | `unknown` | no | Optional platform-native payload included only for transient delivery/debug use. |
| `kind` | `"google_business_profile.locations.reviews"` | yes | The collection that delivered this item. |

## `google_business_profile.locations.review_replies`

### `get`

Get the owner's reply to one review.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `profileId` | `string` | yes | Koil Profile associated with the operation. |
| `externalId` | `string` | yes | The review's id; a reply has no id of its own. |
| `includePlatformRaw` | `boolean` | no | Whether to include transient platform-native payloads. |

JSON Schema

```json
{
  "type": "object",
  "required": [
    "profileId",
    "externalId"
  ],
  "properties": {
    "profileId": {
      "type": "string",
      "description": "Koil Profile associated with the operation.",
      "minLength": 1
    },
    "externalId": {
      "type": "string",
      "minLength": 1,
      "description": "The review's id; a reply has no id of its own."
    },
    "includePlatformRaw": {
      "type": "boolean",
      "description": "Whether to include transient platform-native payloads."
    }
  },
  "additionalProperties": false
}
```

### `publish`

Write the owner's reply to a review, replacing any existing reply. Google moderates it before it appears.

Submit through `POST /v1/publish-requests` with `collection: "google_business_profile.locations.review_replies"`. These fields go in the item's `args`; `profileId` and `variant` are item fields.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `target` | `object` | yes | One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL. |
| `text` | `string` | yes | The reply, at most 4096 bytes as UTF-8. Google moderates it: a successful publish is accepted, not yet visible. |

JSON Schema

```json
{
  "type": "object",
  "required": [
    "target",
    "text"
  ],
  "properties": {
    "target": {
      "type": "object",
      "required": [
        "kind",
        "externalId"
      ],
      "properties": {
        "kind": {
          "enum": [
            "google_business_profile.locations.reviews"
          ]
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        }
      },
      "additionalProperties": false,
      "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4096,
      "description": "The reply, at most 4096 bytes as UTF-8. Google moderates it: a successful publish is accepted, not yet visible."
    }
  },
  "additionalProperties": false
}
```

### `update`

Edit the owner's reply to a review. Google moderates the new text before it appears.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `profileId` | `string` | yes | Koil Profile associated with the operation. |
| `externalId` | `string` | yes | The review whose reply to edit. |
| `text` | `string` | yes | The new reply, at most 4096 bytes as UTF-8. Google moderates it again. |
| `includePlatformRaw` | `boolean` | no | Whether to include transient platform-native payloads. |

JSON Schema

```json
{
  "type": "object",
  "required": [
    "profileId",
    "externalId",
    "text"
  ],
  "properties": {
    "profileId": {
      "type": "string",
      "description": "Koil Profile associated with the operation.",
      "minLength": 1
    },
    "externalId": {
      "type": "string",
      "minLength": 1,
      "description": "The review whose reply to edit."
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4096,
      "description": "The new reply, at most 4096 bytes as UTF-8. Google moderates it again."
    },
    "includePlatformRaw": {
      "type": "boolean",
      "description": "Whether to include transient platform-native payloads."
    }
  },
  "additionalProperties": false
}
```

### `delete`

Remove the owner's reply to a review.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `profileId` | `string` | yes | Koil Profile associated with the operation. |
| `externalId` | `string` | yes | The review whose reply to remove. |

JSON Schema

```json
{
  "type": "object",
  "required": [
    "profileId",
    "externalId"
  ],
  "properties": {
    "profileId": {
      "type": "string",
      "description": "Koil Profile associated with the operation.",
      "minLength": 1
    },
    "externalId": {
      "type": "string",
      "minLength": 1,
      "description": "The review whose reply to remove."
    }
  },
  "additionalProperties": false
}
```

### Not offered

-   `list`: platform no endpoint — Google exposes no listing of replies; each appears on the review it answers.
-   `resolve_attachment`: not applicable
-   `perform_action`: not applicable — Google moderates the owner's reply, not Koil.

### Events

None: this collection is read-only.

Backfill: not offered — not applicable — A reply emits no events of its own; backfilling google\_business\_profile.locations.reviews re-delivers each review with its reply embedded..

Item schema

What `list` and `get` return and what events carry as `data`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `externalId` | `string` | yes | Platform-owned content identifier. |
| `locationExternalId` | `string` | yes |  |
| `text` | `string` | yes | Caption/body text for content. |
| `ownerAuthored` | `boolean` | yes | Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did. |
| `state` | `"pending" \| "approved" \| "rejected" \| "other"` | no | Google's moderation state of the owner's reply. `other` is a state Google added that Koil does not model yet. |
| `policyViolation` | `string` | no |  |
| `updatedAt` | `string (date-time)` | no | When the platform last updated it. |
| `platformRaw` | `unknown` | no | Optional platform-native payload included only for transient delivery/debug use. |
| `kind` | `"google_business_profile.locations.review_replies"` | yes | The collection that delivered this item. |
