2023-01-27 03:22:44 -08:00
|
|
|
import type { INodeProperties } from 'n8n-workflow';
|
2021-09-03 09:30:29 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const campaignContactOperations: INodeProperties[] = [
|
2021-09-03 09:30:29 -07:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-20 14:47:24 -07:00
|
|
|
noDataExpression: true,
|
2021-09-03 09:30:29 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['campaignContact'],
|
2021-09-03 09:30:29 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Add',
|
|
|
|
value: 'add',
|
|
|
|
description: 'Add contact to a campaign',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Add a campaign contact',
|
2021-09-03 09:30:29 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Remove',
|
|
|
|
value: 'remove',
|
|
|
|
description: 'Remove contact from a campaign',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Remove a campaign contact',
|
2021-09-03 09:30:29 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'add',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2021-09-03 09:30:29 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const campaignContactFields: INodeProperties[] = [
|
2021-09-03 09:30:29 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* campaignContact:add */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'Contact ID',
|
|
|
|
name: 'contactId',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['campaignContact'],
|
|
|
|
operation: ['add', 'remove'],
|
2021-09-03 09:30:29 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'Campaign Name or ID',
|
2021-09-03 09:30:29 -07:00
|
|
|
name: 'campaignId',
|
|
|
|
type: 'options',
|
2022-08-17 08:50:24 -07:00
|
|
|
description:
|
|
|
|
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
2021-09-03 09:30:29 -07:00
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['campaignContact'],
|
|
|
|
operation: ['add', 'remove'],
|
2021-09-03 09:30:29 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'getCampaigns',
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|