2021-03-04 01:25:47 -08:00
import {
INodeProperties ,
} from 'n8n-workflow' ;
2021-12-03 00:44:16 -08:00
export const activityOperations : INodeProperties [ ] = [
2021-03-04 01:25:47 -08:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2021-03-04 01:25:47 -08:00
default : 'getAll' ,
options : [
{
name : 'Get All' ,
value : 'getAll' ,
2022-07-10 13:50:51 -07:00
action : 'Get all activities' ,
2021-03-04 01:25:47 -08:00
} ,
] ,
displayOptions : {
show : {
resource : [
'activity' ,
] ,
} ,
} ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2021-03-04 01:25:47 -08:00
2021-12-03 00:44:16 -08:00
export const activityFields : INodeProperties [ ] = [
2021-03-04 01:25:47 -08:00
// ----------------------------------
// activity: getAll
// ----------------------------------
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2021-03-04 01:25:47 -08:00
displayOptions : {
show : {
resource : [
'activity' ,
] ,
operation : [
'getAll' ,
] ,
} ,
} ,
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
default : 5 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2021-03-04 01:25:47 -08:00
typeOptions : {
minValue : 1 ,
maxValue : 1000 ,
} ,
displayOptions : {
show : {
resource : [
'activity' ,
] ,
operation : [
'getAll' ,
] ,
returnAll : [
false ,
] ,
} ,
} ,
} ,
{
displayName : 'Filters' ,
name : 'filters' ,
type : 'collection' ,
placeholder : 'Add Filter' ,
default : { } ,
displayOptions : {
show : {
resource : [
'activity' ,
] ,
operation : [
'getAll' ,
] ,
} ,
} ,
options : [
{
2022-06-03 10:23:49 -07:00
displayName : 'Campaign Name or ID' ,
2021-03-04 01:25:47 -08:00
name : 'campaignId' ,
type : 'options' ,
default : '' ,
typeOptions : {
loadOptionsMethod : 'getCampaigns' ,
} ,
2022-07-14 13:05:11 -07:00
description : 'ID of the campaign to retrieve activity for. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2021-03-04 01:25:47 -08:00
} ,
{
displayName : 'Type' ,
name : 'type' ,
type : 'options' ,
default : 'emailsOpened' ,
2022-05-06 14:01:25 -07:00
description : 'Type of activity to retrieve' ,
2021-03-04 01:25:47 -08:00
options : [
{
name : 'Emails Bounced' ,
value : 'emailsBounced' ,
} ,
{
name : 'Emails Clicked' ,
value : 'emailsClicked' ,
} ,
{
name : 'Emails Opened' ,
value : 'emailsOpened' ,
} ,
{
name : 'Emails Replied' ,
value : 'emailsReplied' ,
} ,
{
name : 'Emails Send Failed' ,
value : 'emailsSendFailed' ,
} ,
{
name : 'Emails Sent' ,
value : 'emailsSent' ,
} ,
{
name : 'Emails Unsubscribed' ,
value : 'emailsUnsubscribed' ,
} ,
] ,
} ,
] ,
} ,
2021-12-03 00:44:16 -08:00
] ;