Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

feat(google-my-business): ui improvement (#16755)

Talal Jaberdacf0a2b6ede
diff --git a/bun.lock b/bun.lock
index fb6b377433f..8a9a77259a4 100644
--- a/bun.lock
+++ b/bun.lock
@@ -4005,7 +4005,7 @@
},
"packages/pieces/community/google-my-business": {
"name": "@activepieces/piece-google-my-business",
- "version": "0.5.2",
+ "version": "0.6.0",
"dependencies": {
"@activepieces/core-piece-types": "workspace:*",
"@activepieces/core-utils": "workspace:*",
diff --git a/packages/pieces/community/google-my-business/package.json b/packages/pieces/community/google-my-business/package.json
index 197877dc252..5dd8aae621a 100644
--- a/packages/pieces/community/google-my-business/package.json
+++ b/packages/pieces/community/google-my-business/package.json
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-google-my-business",
- "version": "0.5.2",
+ "version": "0.6.0",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"scripts": {
diff --git a/packages/pieces/community/google-my-business/src/i18n/de.json b/packages/pieces/community/google-my-business/src/i18n/de.json
index d3b84deab8f..c380cd5edf9 100644
--- a/packages/pieces/community/google-my-business/src/i18n/de.json
+++ b/packages/pieces/community/google-my-business/src/i18n/de.json
@@ -130,5 +130,12 @@
"DELETE": "LÖSCHEN",
"HEAD": "HEAD",
"New Review": "Neue Bewertung",
- "Triggers when a customer posts a new review on the location.": "Wird ausgelöst, wenn ein Kunde eine neue Rezension für den Standort schreibt."
+ "Triggers when a customer posts a new review on the location.": "Wird ausgelöst, wenn ein Kunde eine neue Rezension für den Standort schreibt.",
+ "Post to Update": "Zu aktualisierender Beitrag",
+ "Review": "Bewertung",
+ "Reply": "Antwort",
+ "Results": "Ergebnisse",
+ "Business": "Unternehmen",
+ "Markdown": "Markdown",
+ "Fields left empty keep their current value.": "Leer gelassene Felder behalten ihren aktuellen Wert."
}
diff --git a/packages/pieces/community/google-my-business/src/i18n/es.json b/packages/pieces/community/google-my-business/src/i18n/es.json
index f174123ce18..25c222fc610 100644
--- a/packages/pieces/community/google-my-business/src/i18n/es.json
+++ b/packages/pieces/community/google-my-business/src/i18n/es.json
@@ -130,5 +130,12 @@
"DELETE": "BORRAR",
"HEAD": "LIMPIO",
"New Review": "Nueva reseña",
- "Triggers when a customer posts a new review on the location.": "Se activa cuando un cliente publica una nueva reseña en la ubicación."
+ "Triggers when a customer posts a new review on the location.": "Se activa cuando un cliente publica una nueva reseña en la ubicación.",
+ "Post to Update": "Post a actualizar",
+ "Review": "Reseña",
+ "Reply": "Respuesta",
+ "Results": "Resultados",
+ "Business": "Empresa",
+ "Markdown": "Markdown",
+ "Fields left empty keep their current value.": "Los campos vacíos conservan su valor actual."
}
diff --git a/packages/pieces/community/google-my-business/src/i18n/fr.json b/packages/pieces/community/google-my-business/src/i18n/fr.json
index cad1379cff8..86f7cffce8f 100644
--- a/packages/pieces/community/google-my-business/src/i18n/fr.json
+++ b/packages/pieces/community/google-my-business/src/i18n/fr.json
@@ -130,5 +130,12 @@
"DELETE": "SUPPRIMER",
"HEAD": "HEAD",
"New Review": "Nouveau commentaire",
- "Triggers when a customer posts a new review on the location.": "Se déclenche lorsqu’un client publie un nouvel avis sur l’établissement."
+ "Triggers when a customer posts a new review on the location.": "Se déclenche lorsqu’un client publie un nouvel avis sur l’établissement.",
+ "Post to Update": "Contenu à modifier",
+ "Review": "Avis",
+ "Reply": "Réponse",
+ "Results": "Résultats",
+ "Business": "Établissement",
+ "Markdown": "Markdown",
+ "Fields left empty keep their current value.": "Les champs laissés vides conservent leur valeur actuelle."
}
diff --git a/packages/pieces/community/google-my-business/src/i18n/ja.json b/packages/pieces/community/google-my-business/src/i18n/ja.json
index 394d9f92856..8584c67e1b9 100644
--- a/packages/pieces/community/google-my-business/src/i18n/ja.json
+++ b/packages/pieces/community/google-my-business/src/i18n/ja.json
@@ -130,5 +130,12 @@
"DELETE": "削除",
"HEAD": "頭",
"New Review": "新しいレビュー",
- "Triggers when a customer posts a new review on the location.": "顧客がビジネス拠点に新しいクチコミを投稿したときにトリガーされます。"
+ "Triggers when a customer posts a new review on the location.": "顧客がビジネス拠点に新しいクチコミを投稿したときにトリガーされます。",
+ "Post to Update": "更新する投稿",
+ "Review": "クチコミ",
+ "Reply": "返信",
+ "Results": "結果",
+ "Business": "ビジネス",
+ "Markdown": "Markdown",
+ "Fields left empty keep their current value.": "空欄のフィールドは現在の値が保持されます。"
}
diff --git a/packages/pieces/community/google-my-business/src/i18n/nl.json b/packages/pieces/community/google-my-business/src/i18n/nl.json
index 142573b9240..79b49ec49c8 100644
--- a/packages/pieces/community/google-my-business/src/i18n/nl.json
+++ b/packages/pieces/community/google-my-business/src/i18n/nl.json
@@ -130,5 +130,12 @@
"DELETE": "VERWIJDEREN",
"HEAD": "HOOFD",
"New Review": "Nieuwe review",
- "Triggers when a customer posts a new review on the location.": "Wordt geactiveerd wanneer een klant een nieuwe review over de locatie plaatst."
+ "Triggers when a customer posts a new review on the location.": "Wordt geactiveerd wanneer een klant een nieuwe review over de locatie plaatst.",
+ "Post to Update": "Bij te werken bericht",
+ "Review": "Review",
+ "Reply": "Antwoord",
+ "Results": "Resultaten",
+ "Business": "Bedrijf",
+ "Markdown": "Markdown",
+ "Fields left empty keep their current value.": "Lege velden behouden hun huidige waarde."
}
diff --git a/packages/pieces/community/google-my-business/src/i18n/pt.json b/packages/pieces/community/google-my-business/src/i18n/pt.json
index 901ff0472dd..77ffebe068d 100644
--- a/packages/pieces/community/google-my-business/src/i18n/pt.json
+++ b/packages/pieces/community/google-my-business/src/i18n/pt.json
@@ -130,5 +130,12 @@
"DELETE": "EXCLUIR",
"HEAD": "CABEÇA",
"New Review": "Nova Revisão",
- "Triggers when a customer posts a new review on the location.": "Dispara quando um cliente publica uma nova avaliação no local."
+ "Triggers when a customer posts a new review on the location.": "Dispara quando um cliente publica uma nova avaliação no local.",
+ "Post to Update": "Publicação a atualizar",
+ "Review": "Avaliação",
+ "Reply": "Resposta",
+ "Results": "Resultados",
+ "Business": "Empresa",
+ "Markdown": "Markdown",
+ "Fields left empty keep their current value.": "Campos deixados vazios mantêm o valor atual."
}
diff --git a/packages/pieces/community/google-my-business/src/i18n/ru.json b/packages/pieces/community/google-my-business/src/i18n/ru.json
index f72562009e8..6feb5ee1c86 100644
--- a/packages/pieces/community/google-my-business/src/i18n/ru.json
+++ b/packages/pieces/community/google-my-business/src/i18n/ru.json
@@ -66,5 +66,12 @@
"Event": "Мероприятие",
"Offer": "Предложение",
"Alert": "Оповещение",
- "Triggers when a customer posts a new review on the location.": "Срабатывает, когда клиент оставляет новый отзыв о точке."
+ "Triggers when a customer posts a new review on the location.": "Срабатывает, когда клиент оставляет новый отзыв о точке.",
+ "Post to Update": "Запись для обновления",
+ "Review": "Отзыв",
+ "Reply": "Ответ",
+ "Results": "Результаты",
+ "Business": "Компания",
+ "Markdown": "Markdown",
+ "Fields left empty keep their current value.": "Пустые поля сохраняют текущее значение."
}
\ No newline at end of file
diff --git a/packages/pieces/community/google-my-business/src/i18n/translation.json b/packages/pieces/community/google-my-business/src/i18n/translation.json
index 46359d6bfd2..8ffd8502717 100644
--- a/packages/pieces/community/google-my-business/src/i18n/translation.json
+++ b/packages/pieces/community/google-my-business/src/i18n/translation.json
@@ -137,5 +137,12 @@
"Request": "Request",
"Data to send": "Data to send",
"New Review": "New Review",
- "Triggers when a customer posts a new review on the location.": "Triggers when a customer posts a new review on the location."
+ "Triggers when a customer posts a new review on the location.": "Triggers when a customer posts a new review on the location.",
+ "Post to Update": "Post to Update",
+ "Review": "Review",
+ "Reply": "Reply",
+ "Results": "Results",
+ "Business": "Business",
+ "Markdown": "Markdown",
+ "Fields left empty keep their current value.": "Fields left empty keep their current value."
}
\ No newline at end of file
diff --git a/packages/pieces/community/google-my-business/src/i18n/zh.json b/packages/pieces/community/google-my-business/src/i18n/zh.json
index 3523456b4f5..5b2a629c479 100644
--- a/packages/pieces/community/google-my-business/src/i18n/zh.json
+++ b/packages/pieces/community/google-my-business/src/i18n/zh.json
@@ -130,5 +130,12 @@
"DELETE": "删除",
"HEAD": "黑色",
"New Review": "New Review",
- "Triggers when a customer posts a new review on the location.": "当客户在营业地点发布新评价时触发。"
+ "Triggers when a customer posts a new review on the location.": "当客户在营业地点发布新评价时触发。",
+ "Post to Update": "要更新的帖子",
+ "Review": "评价",
+ "Reply": "回复",
+ "Results": "结果",
+ "Business": "商家",
+ "Markdown": "Markdown",
+ "Fields left empty keep their current value.": "留空的字段将保留当前值。"
}
diff --git a/packages/pieces/community/google-my-business/src/index.ts b/packages/pieces/community/google-my-business/src/index.ts
index f65cbaa95bb..49a26b3256b 100644
--- a/packages/pieces/community/google-my-business/src/index.ts
+++ b/packages/pieces/community/google-my-business/src/index.ts
@@ -23,6 +23,7 @@ import { listReviews } from './lib/actions/list-reviews';
import { replyToReview } from './lib/actions/reply-to-review';
import { updateLocation } from './lib/actions/update-location';
import { newReview } from './lib/triggers/new-review';
+import { gmbApi } from './lib/common/client';
export const googleAuth = PieceAuth.OAuth2({
authUrl: 'https://accounts.google.com/o/oauth2/auth',
@@ -59,13 +60,17 @@ export const googleBusiness = createPiece({
replyToReview,
deleteReviewReply,
createCustomApiCallAction({
- baseUrl: () => {
- return 'https://mybusiness.googleapis.com/v4';
- },
+ baseUrl: () => gmbApi.hosts.v4,
auth: googleAuth,
authMapping: async (auth) => ({
Authorization: `Bearer ${(auth as OAuth2PropertyValue).access_token}`,
}),
+ props: {
+ url: {
+ description: `Full URL, or a path relative to ${gmbApi.hosts.v4}`,
+ placeholder: '/accounts/123/locations/456/reviews',
+ },
+ },
}),
],
triggers: [newReview],
diff --git a/packages/pieces/community/google-my-business/src/lib/actions/create-reply.ts b/packages/pieces/community/google-my-business/src/lib/actions/create-reply.ts
index 7c551b79968..d3773289a1b 100644
--- a/packages/pieces/community/google-my-business/src/lib/actions/create-reply.ts
+++ b/packages/pieces/community/google-my-business/src/lib/actions/create-reply.ts
@@ -13,6 +13,22 @@ export const createReply = createAction({
description: 'Reply to a review, or replace the reply already posted.',
audience: 'human',
aiMetadata: { description: 'Posts the business owner\'s reply to a specific Google Business Profile review, or overwrites the existing reply if one is already present. Use to respond to customer reviews; safe to repeat since it upserts on the review name. Requires the full review resource name in the form accounts/{account}/locations/{location}/reviews/{review}.', idempotent: true },
+ propertyGroups: [
+ {
+ key: 'review',
+ display: 'section',
+ label: 'Review',
+ icon: 'inbox',
+ props: ['reviewName'],
+ },
+ {
+ key: 'reply',
+ display: 'section',
+ label: 'Reply',
+ icon: 'reply',
+ props: ['comment'],
+ },
+ ],
props: {
reviewName: Property.ShortText({
displayName: 'Review ID',
diff --git a/packages/pieces/community/google-my-business/src/lib/actions/list-posts.ts b/packages/pieces/community/google-my-business/src/lib/actions/list-posts.ts
index 30301242726..4bfaa358ce9 100644
--- a/packages/pieces/community/google-my-business/src/lib/actions/list-posts.ts
+++ b/packages/pieces/community/google-my-business/src/lib/actions/list-posts.ts
@@ -19,6 +19,22 @@ export const listPosts = createAction({
idempotent: true,
},
auth: googleAuth,
+ propertyGroups: [
+ {
+ key: 'business',
+ display: 'section',
+ label: 'Business',
+ icon: 'location',
+ props: ['account', 'location'],
+ },
+ {
+ key: 'results',
+ display: 'section',
+ label: 'Results',
+ icon: 'sliders',
+ props: ['maxResults'],
+ },
+ ],
props: {
account: googleBusinessCommon.account,
location: googleBusinessCommon.location,
diff --git a/packages/pieces/community/google-my-business/src/lib/actions/update-post.ts b/packages/pieces/community/google-my-business/src/lib/actions/update-post.ts
index 67fbaef5a60..73668b02a55 100644
--- a/packages/pieces/community/google-my-business/src/lib/actions/update-post.ts
+++ b/packages/pieces/community/google-my-business/src/lib/actions/update-post.ts
@@ -1,5 +1,5 @@
import { HttpMethod, httpClient, propsValidation } from '@activepieces/pieces-common';
-import { createAction, Property } from '@activepieces/pieces-framework';
+import { createAction, MarkdownVariant, Property } from '@activepieces/pieces-framework';
import * as z from 'zod/mini';
import { googleAuth } from '../..';
import { updatePostActionOutputSchema } from '../output-schemas';
@@ -19,12 +19,19 @@ export const updatePost = createAction({
},
auth: googleAuth,
propertyGroups: [
+ {
+ key: 'post',
+ display: 'section',
+ label: 'Post to Update',
+ icon: 'inbox',
+ props: ['postName'],
+ },
{
key: 'content',
display: 'section',
label: 'Content',
icon: 'text',
- props: ['postName', 'summary', 'mediaSourceUrl', 'languageCode'],
+ props: ['changesInfo', 'summary', 'mediaSourceUrl', 'languageCode'],
},
{
key: 'event',
@@ -55,6 +62,10 @@ export const updatePost = createAction({
placeholder: 'accounts/123/locations/456/localPosts/789',
required: true,
}),
+ changesInfo: Property.MarkDown({
+ value: 'Fields left empty keep their current value.',
+ variant: MarkdownVariant.INFO,
+ }),
summary: Property.LongText({
displayName: 'Post Text',
description: 'Leave empty to keep the current text.',
diff --git a/packages/pieces/community/google-my-business/src/lib/triggers/new-review.ts b/packages/pieces/community/google-my-business/src/lib/triggers/new-review.ts
index f09bcd64a69..17b8151c174 100644
--- a/packages/pieces/community/google-my-business/src/lib/triggers/new-review.ts
+++ b/packages/pieces/community/google-my-business/src/lib/triggers/new-review.ts
@@ -24,6 +24,15 @@ export const newReview = createTrigger({
description: 'Fires when a new customer review is posted for the selected Google Business Profile account and location. Each event represents one newly created review and can be used to react to incoming customer feedback.',
},
auth: googleAuth,
+ propertyGroups: [
+ {
+ key: 'business',
+ display: 'section',
+ label: 'Business',
+ icon: 'location',
+ props: ['account', 'location'],
+ },
+ ],
props: {
account: googleBusinessCommon.account,
location: googleBusinessCommon.location,