# Create or Update Reply to Review — Google Business Profile

> Create or update a reply to the specified review. See the documentation

- Key: `google_my_business-create-update-reply-to-review`
- Type: Action (Write)
- Version: 0.0.6
- App: Google Business Profile (`google_my_business`) — https://pipedream.com/apps/google-my-business.md
- This page (HTML): https://pipedream.com/apps/google-my-business/actions/create-update-reply-to-review
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/google_my_business/actions/create-update-reply-to-review/create-update-reply-to-review.ts

## Description

Create or update a reply to the specified review. [See the documentation](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.reviews/updateReply)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `account` | `string` | Yes | Select an Account or provide a custom Account Name. Options are loaded from the connected account. |
| `location` | `string` | Yes | The location whose local posts will be listed. See the documentation on how to filter locations. Options are loaded from the connected account. |
| `review` | `string` | Yes | Select a Review or provide a custom Review Name. Options are loaded from the connected account. |
| `comment` | `string` | Yes | The body of the reply as plain text with markups. The maximum length is 4096 bytes. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "google_my_business",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "google_my_business-create-update-reply-to-review",
  arguments: {
    account: "Account Name",
    location: "Location",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "google_my_business-create-update-reply-to-review",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    google_my_business: { authProvisionId: "apn_xxxxxxx" },
    account: "Account Name",
    location: "Location",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "google_my_business-create-update-reply-to-review",
    "configured_props": {
      "google_my_business": { "authProvisionId": "apn_xxxxxxx" },
      "account": "Account Name",
      "location": "Location"
    }
  }'
```

---

- App: https://pipedream.com/apps/google-my-business.md · All apps: https://pipedream.com/apps
