Improvements

This commit is contained in:
ricardo 2020-08-10 09:41:10 -04:00
parent 833001a9e4
commit b3a8587106
4 changed files with 40 additions and 38 deletions

View file

@ -6,7 +6,7 @@ import {
export class ConvertKitApi implements ICredentialType {
name = 'convertKitApi';
displayName = 'ConvertKit Api';
displayName = 'ConvertKit API';
properties = [
{
displayName: 'API Secret',

View file

@ -297,6 +297,8 @@ export class ConvertKitTrigger implements INodeType {
},
};
console.log(event);
if (event === 'subscriber.form_subscribe') {
//@ts-ignore
body.event['form_id'] = this.getNodeParameter('formId', 0);
@ -317,7 +319,7 @@ export class ConvertKitTrigger implements INodeType {
body.event['product_id'] = this.getNodeParameter('productId', 0);
}
if (event === 'subscriber.tag_add' || event === 'subscriber.tag_remove"') {
if (event === 'subscriber.tag_add' || event === 'subscriber.tag_remove') {
//@ts-ignore
body.event['tag_id'] = this.getNodeParameter('tagId', 0);
}

View file

@ -37,24 +37,6 @@ export const formOperations = [
] as INodeProperties[];
export const formFields = [
{
displayName: 'Email',
name: 'email',
type: 'string',
required: true,
displayOptions: {
show: {
resource: [
'form',
],
operation: [
'addSubscriber',
],
},
},
default: '',
description: `The subscriber's email address.`,
},
{
displayName: 'Form ID',
name: 'id',
@ -77,6 +59,24 @@ export const formFields = [
default: '',
description: 'Form ID.',
},
{
displayName: 'Email',
name: 'email',
type: 'string',
required: true,
displayOptions: {
show: {
resource: [
'form',
],
operation: [
'addSubscriber',
],
},
},
default: '',
description: `The subscriber's email address.`,
},
{
displayName: 'Additional Fields',
name: 'additionalFields',

View file

@ -37,24 +37,6 @@ export const sequenceOperations = [
] as INodeProperties[];
export const sequenceFields = [
{
displayName: 'Email',
name: 'email',
type: 'string',
required: true,
displayOptions: {
show: {
resource: [
'sequence',
],
operation: [
'addSubscriber',
],
},
},
default: '',
description: `The subscriber's email address.`,
},
{
displayName: 'Sequence ID',
name: 'id',
@ -77,6 +59,24 @@ export const sequenceFields = [
default: '',
description: 'Sequence ID.',
},
{
displayName: 'Email',
name: 'email',
type: 'string',
required: true,
displayOptions: {
show: {
resource: [
'sequence',
],
operation: [
'addSubscriber',
],
},
},
default: '',
description: `The subscriber's email address.`,
},
{
displayName: 'Return All',
name: 'returnAll',