diff --git a/packages/nodes-base/credentials/CustomerIoApi.credentials.ts b/packages/nodes-base/credentials/CustomerIoApi.credentials.ts index 2cc92c81af..ece4f9d29d 100644 --- a/packages/nodes-base/credentials/CustomerIoApi.credentials.ts +++ b/packages/nodes-base/credentials/CustomerIoApi.credentials.ts @@ -9,7 +9,7 @@ export class CustomerIoApi implements ICredentialType { displayName = 'Customer.io API'; properties = [ { - displayName: 'API Key', + displayName: 'App API Key', name: 'apiKey', type: 'string' as NodePropertyTypes, default: '', diff --git a/packages/nodes-base/nodes/CustomerIo/CustomerIoTrigger.node.ts b/packages/nodes-base/nodes/CustomerIo/CustomerIoTrigger.node.ts index 5db8a4f899..875e77bd3e 100644 --- a/packages/nodes-base/nodes/CustomerIo/CustomerIoTrigger.node.ts +++ b/packages/nodes-base/nodes/CustomerIo/CustomerIoTrigger.node.ts @@ -15,7 +15,7 @@ import { eventExists, } from './GenericFunctions'; -interface IEvent{ +interface IEvent { customer?: IDataObject; email?: IDataObject; push?: IDataObject; @@ -27,14 +27,14 @@ interface IEvent{ export class CustomerIoTrigger implements INodeType { description: INodeTypeDescription = { displayName: 'Customer.io Trigger', - name: 'customerIo', + name: 'customerIoTrigger', group: ['trigger'], - icon: 'file:customer.Io.png', + icon: 'file:customerio.png', version: 1, description: 'Starts the workflow on a Customer.io update. (Beta)', defaults: { name: 'Customer.io Trigger', - color: '#00FF00', + color: '#7131ff', }, inputs: [], outputs: ['main'], @@ -57,6 +57,7 @@ export class CustomerIoTrigger implements INodeType { displayName: 'Events', name: 'events', type: 'multiOptions', + required: true, default: [], description: 'The events that can trigger the webhook and whether they are enabled.', options: [ @@ -245,8 +246,8 @@ export class CustomerIoTrigger implements INodeType { for (const webhook of webhooks) { if (webhook.endpoint === webhookUrl && eventExists(currentEvents, webhook.events)) { - webhookData.webhookId = webhook.id; - return true; + webhookData.webhookId = webhook.id; + return true; } } diff --git a/packages/nodes-base/nodes/CustomerIo/GenericFunctions.ts b/packages/nodes-base/nodes/CustomerIo/GenericFunctions.ts index 48e475f533..ba6a388acb 100644 --- a/packages/nodes-base/nodes/CustomerIo/GenericFunctions.ts +++ b/packages/nodes-base/nodes/CustomerIo/GenericFunctions.ts @@ -55,9 +55,9 @@ export async function apiRequest(this: IHookFunctions | IExecuteFunctions | ILoa } } -export function eventExists (currentEvents : string[], webhookEvents: IDataObject) { +export function eventExists(currentEvents: string[], webhookEvents: IDataObject) { for (const currentEvent of currentEvents) { - if (get(webhookEvents, `${currentEvent.split('.')[0]}.${currentEvent.split('.')[1]}`) !== true) { + if (get(webhookEvents, `${currentEvent.split('.')[0]}.${currentEvent.split('.')[1]}`) !== true) { return false; } } diff --git a/packages/nodes-base/nodes/CustomerIo/customer.Io.png b/packages/nodes-base/nodes/CustomerIo/customer.Io.png deleted file mode 100644 index 7c5ae3010a..0000000000 Binary files a/packages/nodes-base/nodes/CustomerIo/customer.Io.png and /dev/null differ