mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
docs: Rename Google My Business > Google Business Profile (no-changelog) (#11361)
This commit is contained in:
parent
5390061f49
commit
992547baf8
|
@ -0,0 +1,29 @@
|
|||
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
||||
|
||||
const scopes = ['https://www.googleapis.com/auth/business.manage'];
|
||||
|
||||
export class GoogleBusinessProfileOAuth2Api implements ICredentialType {
|
||||
name = 'googleBusinessProfileOAuth2Api';
|
||||
|
||||
extends = ['googleOAuth2Api'];
|
||||
|
||||
displayName = 'Google Business Profile OAuth2 API';
|
||||
|
||||
documentationUrl = 'google/oauth-single-service';
|
||||
|
||||
properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Scope',
|
||||
name: 'scope',
|
||||
type: 'hidden',
|
||||
default: scopes.join(' '),
|
||||
},
|
||||
{
|
||||
displayName:
|
||||
'Make sure that you have fulfilled the prerequisites and requested access to Google Business Profile API. <a href="https://developers.google.com/my-business/content/prereqs" target="_blank">More info</a>. Also, make sure that you have enabled the following APIs & Services in the Google Cloud Console: Google My Business API, Google My Business Management API. <a href="https://docs.n8n.io/integrations/builtin/credentials/google/oauth-generic/#scopes" target="_blank">More info</a>.',
|
||||
name: 'notice',
|
||||
type: 'notice',
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
||||
|
||||
const scopes = ['https://www.googleapis.com/auth/business.manage'];
|
||||
|
||||
export class GoogleMyBusinessOAuth2Api implements ICredentialType {
|
||||
name = 'googleMyBusinessOAuth2Api';
|
||||
|
||||
extends = ['googleOAuth2Api'];
|
||||
|
||||
displayName = 'Google My Business OAuth2 API';
|
||||
|
||||
documentationUrl = 'google/oauth-single-service';
|
||||
|
||||
properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Scope',
|
||||
name: 'scope',
|
||||
type: 'hidden',
|
||||
default: scopes.join(' '),
|
||||
},
|
||||
{
|
||||
displayName:
|
||||
'Make sure that you have fulfilled the prerequisites and requested access to Google My Business API. <a href="https://developers.google.com/my-business/content/prereqs" target="_blank">More info</a>. Also, make sure that you have enabled the following APIs & Services in the Google Cloud Console: Google My Business API, Google My Business Management API. <a href="https://docs.n8n.io/integrations/builtin/credentials/google/oauth-generic/#scopes" target="_blank">More info</a>.',
|
||||
name: 'notice',
|
||||
type: 'notice',
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
}
|
|
@ -337,7 +337,7 @@ export async function googleApiRequest(
|
|||
|
||||
return (await this.helpers.httpRequestWithAuthentication.call(
|
||||
this,
|
||||
'googleMyBusinessOAuth2Api',
|
||||
'googleBusinessProfileOAuth2Api',
|
||||
options,
|
||||
)) as IDataObject;
|
||||
} catch (error) {
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"node": "n8n-nodes-base.googleMyBusiness",
|
||||
"node": "n8n-nodes-base.googleBusinessProfile",
|
||||
"nodeVersion": "1.0",
|
||||
"codexVersion": "1.0",
|
||||
"categories": ["Marketing", "Productivity"],
|
||||
|
@ -11,8 +11,9 @@
|
|||
],
|
||||
"primaryDocumentation": [
|
||||
{
|
||||
"url": "https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlemybusiness/"
|
||||
"url": "https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlebusinessprofile/"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"alias": ["Google My Business", "GMB", "My Business"]
|
||||
}
|
|
@ -4,17 +4,17 @@ import { searchAccounts, searchLocations, searchPosts, searchReviews } from './G
|
|||
import { postFields, postOperations } from './PostDescription';
|
||||
import { reviewFields, reviewOperations } from './ReviewDescription';
|
||||
|
||||
export class GoogleMyBusiness implements INodeType {
|
||||
export class GoogleBusinessProfile implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'Google My Business',
|
||||
name: 'googleMyBusiness',
|
||||
icon: 'file:googleMyBusines.svg',
|
||||
displayName: 'Google Business Profile',
|
||||
name: 'googleBusinessProfile',
|
||||
icon: 'file:googleBusinessProfile.svg',
|
||||
group: ['input'],
|
||||
version: 1,
|
||||
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
||||
description: 'Consume Google My Business API',
|
||||
description: 'Consume Google Business Profile API',
|
||||
defaults: {
|
||||
name: 'Google My Business',
|
||||
name: 'Google Business Profile',
|
||||
},
|
||||
inputs: [NodeConnectionType.Main],
|
||||
outputs: [NodeConnectionType.Main],
|
||||
|
@ -30,7 +30,7 @@ export class GoogleMyBusiness implements INodeType {
|
|||
],
|
||||
credentials: [
|
||||
{
|
||||
name: 'googleMyBusinessOAuth2Api',
|
||||
name: 'googleBusinessProfileOAuth2Api',
|
||||
required: true,
|
||||
},
|
||||
],
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"node": "n8n-nodes-base.googleMyBusinessTrigger",
|
||||
"node": "n8n-nodes-base.googleBusinessProfileTrigger",
|
||||
"nodeVersion": "1.0",
|
||||
"codexVersion": "1.0",
|
||||
"categories": ["Communication"],
|
||||
|
@ -11,8 +11,9 @@
|
|||
],
|
||||
"primaryDocumentation": [
|
||||
{
|
||||
"url": "https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.googlemybusinesstrigger/"
|
||||
"url": "https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.googlebusinessprofiletrigger/"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"alias": ["Google My Business", "GMB", "My Business"]
|
||||
}
|
|
@ -10,22 +10,22 @@ import {
|
|||
|
||||
import { googleApiRequest, searchAccounts, searchLocations } from './GenericFunctions';
|
||||
|
||||
export class GoogleMyBusinessTrigger implements INodeType {
|
||||
export class GoogleBusinessProfileTrigger implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'Google My Business Trigger',
|
||||
name: 'googleMyBusinessTrigger',
|
||||
icon: 'file:googleMyBusines.svg',
|
||||
displayName: 'Google Business Profile Trigger',
|
||||
name: 'googleBusinessProfileTrigger',
|
||||
icon: 'file:googleBusinessProfile.svg',
|
||||
group: ['trigger'],
|
||||
version: 1,
|
||||
description:
|
||||
'Fetches reviews from Google My Business and starts the workflow on specified polling intervals.',
|
||||
subtitle: '={{"Google My Business Trigger"}}',
|
||||
'Fetches reviews from Google Business Profile and starts the workflow on specified polling intervals.',
|
||||
subtitle: '={{"Google Business Profile Trigger"}}',
|
||||
defaults: {
|
||||
name: 'Google My Business Trigger',
|
||||
name: 'Google Business Profile Trigger',
|
||||
},
|
||||
credentials: [
|
||||
{
|
||||
name: 'googleMyBusinessOAuth2Api',
|
||||
name: 'googleBusinessProfileOAuth2Api',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
|
@ -53,7 +53,7 @@ export class GoogleMyBusinessTrigger implements INodeType {
|
|||
required: true,
|
||||
type: 'resourceLocator',
|
||||
default: { mode: 'list', value: '' },
|
||||
description: 'The Google My Business account',
|
||||
description: 'The Google Business Profile account',
|
||||
displayOptions: { show: { event: ['reviewAdded'] } },
|
||||
modes: [
|
||||
{
|
|
@ -22,7 +22,7 @@ export const postOperations: INodeProperties[] = [
|
|||
name: 'Create',
|
||||
value: 'create',
|
||||
action: 'Create post',
|
||||
description: 'Create a new post on Google My Business',
|
||||
description: 'Create a new post on Google Business Profile',
|
||||
routing: {
|
||||
send: { preSend: [handleDatesPresend] },
|
||||
request: {
|
||||
|
@ -114,7 +114,7 @@ export const postFields: INodeProperties[] = [
|
|||
required: true,
|
||||
type: 'resourceLocator',
|
||||
default: { mode: 'list', value: '' },
|
||||
description: 'The Google My Business account',
|
||||
description: 'The Google Business Profile account',
|
||||
displayOptions: { show: { resource: ['post'], operation: ['create'] } },
|
||||
modes: [
|
||||
{
|
||||
|
@ -417,7 +417,7 @@ export const postFields: INodeProperties[] = [
|
|||
required: true,
|
||||
type: 'resourceLocator',
|
||||
default: { mode: 'list', value: '' },
|
||||
description: 'The Google My Business account',
|
||||
description: 'The Google Business Profile account',
|
||||
displayOptions: { show: { resource: ['post'], operation: ['delete'] } },
|
||||
modes: [
|
||||
{
|
||||
|
@ -528,7 +528,7 @@ export const postFields: INodeProperties[] = [
|
|||
required: true,
|
||||
type: 'resourceLocator',
|
||||
default: { mode: 'list', value: '' },
|
||||
description: 'The Google My Business account',
|
||||
description: 'The Google Business Profile account',
|
||||
displayOptions: { show: { resource: ['post'], operation: ['get'] } },
|
||||
modes: [
|
||||
{
|
||||
|
@ -639,7 +639,7 @@ export const postFields: INodeProperties[] = [
|
|||
required: true,
|
||||
type: 'resourceLocator',
|
||||
default: { mode: 'list', value: '' },
|
||||
description: 'The Google My Business account',
|
||||
description: 'The Google Business Profile account',
|
||||
displayOptions: { show: { resource: ['post'], operation: ['getAll'] } },
|
||||
modes: [
|
||||
{
|
||||
|
@ -734,7 +734,7 @@ export const postFields: INodeProperties[] = [
|
|||
required: true,
|
||||
type: 'resourceLocator',
|
||||
default: { mode: 'list', value: '' },
|
||||
description: 'The Google My Business account',
|
||||
description: 'The Google Business Profile account',
|
||||
displayOptions: { show: { resource: ['post'], operation: ['update'] } },
|
||||
modes: [
|
||||
{
|
|
@ -36,7 +36,7 @@ export const reviewOperations: INodeProperties[] = [
|
|||
name: 'Get',
|
||||
value: 'get',
|
||||
action: 'Get review',
|
||||
description: 'Retrieve details of a specific review on Google My Business',
|
||||
description: 'Retrieve details of a specific review on Google Business Profile',
|
||||
routing: {
|
||||
request: {
|
||||
method: 'GET',
|
||||
|
@ -97,7 +97,7 @@ export const reviewFields: INodeProperties[] = [
|
|||
required: true,
|
||||
type: 'resourceLocator',
|
||||
default: { mode: 'list', value: '' },
|
||||
description: 'The Google My Business account',
|
||||
description: 'The Google Business Profile account',
|
||||
displayOptions: { show: { resource: ['review'], operation: ['get'] } },
|
||||
modes: [
|
||||
{
|
||||
|
@ -223,7 +223,7 @@ export const reviewFields: INodeProperties[] = [
|
|||
required: true,
|
||||
type: 'resourceLocator',
|
||||
default: { mode: 'list', value: '' },
|
||||
description: 'The Google My Business account',
|
||||
description: 'The Google Business Profile account',
|
||||
displayOptions: { show: { resource: ['review'], operation: ['delete'] } },
|
||||
modes: [
|
||||
{
|
||||
|
@ -349,7 +349,7 @@ export const reviewFields: INodeProperties[] = [
|
|||
required: true,
|
||||
type: 'resourceLocator',
|
||||
default: { mode: 'list', value: '' },
|
||||
description: 'The Google My Business account',
|
||||
description: 'The Google Business Profile account',
|
||||
displayOptions: { show: { resource: ['review'], operation: ['getAll'] } },
|
||||
modes: [
|
||||
{
|
||||
|
@ -445,7 +445,7 @@ export const reviewFields: INodeProperties[] = [
|
|||
required: true,
|
||||
type: 'resourceLocator',
|
||||
default: { mode: 'list', value: '' },
|
||||
description: 'The Google My Business account',
|
||||
description: 'The Google Business Profile account',
|
||||
displayOptions: { show: { resource: ['review'], operation: ['reply'] } },
|
||||
modes: [
|
||||
{
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
@ -22,7 +22,7 @@ describe('googleApiRequest', () => {
|
|||
const result = await googleApiRequest.call(mockContext, 'GET', '/test-resource');
|
||||
|
||||
expect(mockHttpRequestWithAuthentication).toHaveBeenCalledWith(
|
||||
'googleMyBusinessOAuth2Api',
|
||||
'googleBusinessProfileOAuth2Api',
|
||||
expect.objectContaining({
|
||||
method: 'GET',
|
||||
url: 'https://mybusiness.googleapis.com/v4/test-resource',
|
||||
|
@ -42,7 +42,7 @@ describe('googleApiRequest', () => {
|
|||
const result = await googleApiRequest.call(mockContext, 'POST', '/test-resource', requestBody);
|
||||
|
||||
expect(mockHttpRequestWithAuthentication).toHaveBeenCalledWith(
|
||||
'googleMyBusinessOAuth2Api',
|
||||
'googleBusinessProfileOAuth2Api',
|
||||
expect.objectContaining({
|
||||
method: 'POST',
|
||||
body: requestBody,
|
||||
|
@ -62,7 +62,7 @@ describe('googleApiRequest', () => {
|
|||
const result = await googleApiRequest.call(mockContext, 'GET', '/test-resource', {});
|
||||
|
||||
expect(mockHttpRequestWithAuthentication).toHaveBeenCalledWith(
|
||||
'googleMyBusinessOAuth2Api',
|
||||
'googleBusinessProfileOAuth2Api',
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
expect.not.objectContaining({ body: expect.anything() }),
|
||||
);
|
|
@ -140,7 +140,7 @@
|
|||
"dist/credentials/GoogleDriveOAuth2Api.credentials.js",
|
||||
"dist/credentials/GoogleFirebaseCloudFirestoreOAuth2Api.credentials.js",
|
||||
"dist/credentials/GoogleFirebaseRealtimeDatabaseOAuth2Api.credentials.js",
|
||||
"dist/credentials/GoogleMyBusinessOAuth2Api.credentials.js",
|
||||
"dist/credentials/GoogleBusinessProfileOAuth2Api.credentials.js",
|
||||
"dist/credentials/GoogleOAuth2Api.credentials.js",
|
||||
"dist/credentials/GooglePerspectiveOAuth2Api.credentials.js",
|
||||
"dist/credentials/GoogleSheetsOAuth2Api.credentials.js",
|
||||
|
@ -540,8 +540,8 @@
|
|||
"dist/nodes/Google/Gmail/Gmail.node.js",
|
||||
"dist/nodes/Google/Gmail/GmailTrigger.node.js",
|
||||
"dist/nodes/Google/GSuiteAdmin/GSuiteAdmin.node.js",
|
||||
"dist/nodes/Google/MyBusiness/GoogleMyBusiness.node.js",
|
||||
"dist/nodes/Google/MyBusiness/GoogleMyBusinessTrigger.node.js",
|
||||
"dist/nodes/Google/BusinessProfile/GoogleBusinessProfile.node.js",
|
||||
"dist/nodes/Google/BusinessProfile/GoogleBusinessProfileTrigger.node.js",
|
||||
"dist/nodes/Google/Perspective/GooglePerspective.node.js",
|
||||
"dist/nodes/Google/Sheet/GoogleSheets.node.js",
|
||||
"dist/nodes/Google/Sheet/GoogleSheetsTrigger.node.js",
|
||||
|
|
Loading…
Reference in a new issue