add basic customer.io trigger

This commit is contained in:
shraddha shaligram
2020-06-30 13:35:31 -07:00
parent 13f71d3af0
commit 7d625572c1
7 changed files with 411 additions and 12 deletions

View File

@@ -1,19 +1,19 @@
import {
IHookFunctions,
IWebhookFunctions,
} from 'n8n-core';
} from 'n8n-core';
import {
import {
IDataObject,
INodeTypeDescription,
INodeType,
IWebhookResponseData,
ILoadOptionsFunctions,
INodePropertyOptions,
} from 'n8n-workflow';
import {
} from 'n8n-workflow';
import {
mailchimpApiRequest,
} from './GenericFunctions';
} from './GenericFunctions';
export class MailchimpTrigger implements INodeType {
description: INodeTypeDescription = {
@@ -24,8 +24,8 @@ export class MailchimpTrigger implements INodeType {
version: 1,
description: 'Handle Mailchimp events via webhooks',
defaults: {
name: 'Mailchimp Trigger',
color: '#32325d',
name: 'Mailchimp Trigger',
color: '#32325d',
},
inputs: [],
outputs: ['main'],
@@ -285,8 +285,8 @@ export class MailchimpTrigger implements INodeType {
}
// @ts-ignore
if (!webhookData.events.includes(req.body.type)
// @ts-ignore
&& !webhookData.sources.includes(req.body.type)) {
// @ts-ignore
&& !webhookData.sources.includes(req.body.type)) {
return {};
}
return {