Fix and improvements on Sendy-Node

This commit is contained in:
Jan Oberhauser 2020-10-13 10:48:46 +02:00
parent 6098384a30
commit 844d257c25
4 changed files with 33 additions and 25 deletions

View file

@ -46,7 +46,7 @@ export const campaignFields = [
},
},
default: '',
description: `The 'From name' of your campaign`,
description: `The 'From name' of your campaign.`,
},
{
displayName: 'From Email',
@ -63,7 +63,7 @@ export const campaignFields = [
},
},
default: '',
description: `The 'From email' of your campaign`,
description: `The 'From email' of your campaign.`,
},
{
displayName: 'Reply To',
@ -80,7 +80,7 @@ export const campaignFields = [
},
},
default: '',
description: `The 'Reply to' of your campaign`,
description: `The 'Reply to' of your campaign.`,
},
{
displayName: 'Title',
@ -97,7 +97,7 @@ export const campaignFields = [
},
},
default: '',
description: `The 'Title' of your campaign`,
description: `The 'Title' of your campaign.`,
},
{
displayName: 'Subject',
@ -114,7 +114,7 @@ export const campaignFields = [
},
},
default: '',
description: `The 'Subject' of your campaign`,
description: `The 'Subject' of your campaign.`,
},
{
displayName: 'HTML Text',
@ -131,6 +131,7 @@ export const campaignFields = [
},
},
default: '',
description: `The 'HTML version' of your campaign.`,
},
{
displayName: 'Send Campaign',
@ -149,6 +150,26 @@ export const campaignFields = [
default: false,
description: `Set to true if you want to send the campaign as well and not just create a draft. Default is false.`,
},
{
displayName: 'Brand ID',
name: 'brandId',
type: 'string',
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'campaign',
],
sendCampaign: [
false,
],
},
},
required: true,
default: '',
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
@ -166,19 +187,6 @@ export const campaignFields = [
},
},
options: [
{
displayName: 'Brand ID',
name: 'brandId',
type: 'string',
displayOptions: {
show: {
'/sendCampaign': [
false,
],
},
},
default: '',
},
{
displayName: 'Exclude List IDs',
name: 'excludeListIds',
@ -198,21 +206,21 @@ export const campaignFields = [
name: 'listIds',
type: 'string',
default: '',
description: `List IDs should be single or comma-separated`,
description: `List IDs should be single or comma-separated.`,
},
{
displayName: 'Plain Text',
name: 'plainText',
type: 'string',
default: '',
description: `The 'Plain text version' of your campaign`
description: `The 'Plain text version' of your campaign.`
},
{
displayName: 'Querystring',
name: 'queryString',
type: 'string',
default: '',
description: `Google Analytics tags`,
description: `Google Analytics tags.`,
},
{
displayName: 'Segment IDs',

View file

@ -104,7 +104,7 @@ export class Sendy implements INodeType {
reply_to: replyTo,
title,
subject,
send_campaign: sendCampaign,
send_campaign: sendCampaign ? 1 : 0,
html_text: htmlText,
};
@ -137,11 +137,11 @@ export class Sendy implements INodeType {
}
if (additionalFields.trackOpens) {
body.track_opens = additionalFields.trackOpens as boolean;
body.track_opens = additionalFields.trackOpens as boolean ? 1 : 0;
}
if (additionalFields.trackClicks) {
body.track_clicks = additionalFields.trackClicks as boolean;
body.track_clicks = additionalFields.trackClicks as boolean ? 1 : 0;
}
responseData = await sendyApiRequest.call(

View file

@ -111,7 +111,7 @@ export const subscriberFields = [
description: `User's 2 letter country code`,
},
{
displayName: 'GDRP',
displayName: 'GDPR',
name: 'gdpr',
type: 'boolean',
default: false,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB