2022-02-28 00:04:55 -08:00
|
|
|
import {
|
|
|
|
INodeProperties,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
export const segmentEmailOperations: INodeProperties[] = [
|
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
|
|
|
noDataExpression: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'segmentEmail',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Send',
|
|
|
|
value: 'send',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Send an email to a segment',
|
2022-02-28 00:04:55 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'send',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export const segmentEmailFields: INodeProperties[] = [
|
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* segmentEmail:send */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'Segment Email Name or ID',
|
2022-02-28 00:04:55 -08:00
|
|
|
name: 'segmentEmailId',
|
|
|
|
type: 'options',
|
2022-07-14 13:05:11 -07:00
|
|
|
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
2022-02-28 00:04:55 -08:00
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'segmentEmail',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'send',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'getSegmentEmails',
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
];
|