PipedreamHQ / PipedreamHQ/pipedream

[ACTION] Google Business Profile: add Performance API actions

Open
#21,608 1 comment 0 reactions 1 assignee Claimed by @vetrivigneshwaran View on GitHub
action enhancement triaged
Dominant language
JavaScript
Stars
11.7k
Forks
5.8k
Avg merge
3d 10h
Merged PRs (30d)
102

Description

**Is there a specific app this action is for?**
Google Business Profile (`google_my_business`)

**Please provide a link to the relevant API docs.**
https://developers.google.com/my-business/reference/performance/rest

## Problem

There's currently no way to see how a Business Profile is actually performing. The existing actions handle reviews, posts, locations and accounts, so you can read and respond to what customers are saying, but you can't get the numbers behind it: how many people viewed the profile, called the business, asked for directions, or what they searched for to find it.

That data used to come from `accounts.locations.reportInsights`, which Google turned off on March 30 2023. It lives in the Business Profile Performance API now, and nothing in this app calls that API, so the gap has been open since the old endpoint was retired.

Adding it should be straightforward. The Performance API is already on the app's allowed domains list and uses the same OAuth scope the existing components rely on, so no new permissions or connection changes are needed.

## What's needed

Three new actions against the Business Profile Performance API v1. Base URL is `https://businessprofileperformance.googleapis.com/v1`. Auth is the existing Google Business Profile OAuth connection, scope `https://www.googleapis.com/auth/business.manage`. No new scope is required.

### Performance

| Action | Endpoint | Notes |
|---|---|---|
| Get Daily Metrics Time Series | `GET /v1/{name=locations/*}:getDailyMetricsTimeSeries` | Returns one metric over a date range. `dailyMetric` and `dailyRange` are both required. `dailySubEntityType` is optional. Metric values come from the [DailyMetric](https://developers.google.com/my-business/reference/performance/rest/v1/DailyMetric) enum. |
| Get Multiple Daily Metrics Time Series | `GET /v1/{location=locations/*}:fetchMultiDailyMetricsTimeSeries` | Same data as above, but several metrics in one request. Useful when a user wants views and calls together without running the action repeatedly. |
| List Search Keyword Impressions | `GET /v1/{parent=locations/*}/searchkeywords/impressions/monthly` | Monthly aggregation of the search terms people used to find the business. `monthlyRange` is required. Paginated, default page size 100. |

## Notes

- The Performance API takes a location on its own, in the form `locations/{locationId}`. Every other URL in this app is built as `accounts/{account}/locations/{location}`, so these actions do not need an account in the path.
- The `location` prop definition already returns a bare location ID rather than a full resource name.
- The Connect proxy allowlist for this app now includes `businessprofileperformance.googleapis.com`. Related: #21516.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.