2020-08-18 03:40:19 -07:00
import {
INodeProperties ,
} from 'n8n-workflow' ;
2021-12-03 00:44:16 -08:00
export const messageLabelOperations : INodeProperties [ ] = [
2020-08-18 03:40:19 -07:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2020-08-18 03:40:19 -07:00
displayOptions : {
show : {
resource : [
'messageLabel' ,
] ,
} ,
} ,
options : [
{
name : 'Add' ,
value : 'add' ,
description : 'Add a label to a message' ,
2022-07-10 13:50:51 -07:00
action : 'Add a label to a message' ,
2020-08-18 03:40:19 -07:00
} ,
{
name : 'Remove' ,
value : 'remove' ,
description : 'Remove a label from a message' ,
2022-07-10 13:50:51 -07:00
action : 'Remove a label from a message' ,
2020-08-18 03:40:19 -07:00
} ,
] ,
default : 'add' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2020-08-18 03:40:19 -07:00
2021-12-03 00:44:16 -08:00
export const messageLabelFields : INodeProperties [ ] = [
2020-08-18 03:40:19 -07:00
{
displayName : 'Message ID' ,
name : 'messageId' ,
type : 'string' ,
default : '' ,
required : true ,
displayOptions : {
show : {
resource : [
'messageLabel' ,
] ,
operation : [
'add' ,
'remove' ,
2020-10-22 06:46:03 -07:00
] ,
2020-08-18 03:40:19 -07:00
} ,
} ,
placeholder : '172ce2c4a72cc243' ,
2022-05-06 14:01:25 -07:00
description : 'The message ID of your email' ,
2020-08-18 03:40:19 -07:00
} ,
{
2022-06-20 07:54:01 -07:00
displayName : 'Label Names or IDs' ,
2020-08-18 03:40:19 -07:00
name : 'labelIds' ,
type : 'multiOptions' ,
typeOptions : {
loadOptionsMethod : 'getLabels' ,
} ,
2022-04-22 09:29:51 -07:00
default : [ ] ,
2020-08-18 03:40:19 -07:00
required : true ,
displayOptions : {
show : {
resource : [
'messageLabel' ,
] ,
operation : [
'add' ,
'remove' ,
2020-10-22 06:46:03 -07:00
] ,
2020-08-18 03:40:19 -07:00
} ,
} ,
2022-07-14 13:05:11 -07:00
description : 'The ID of the label. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-08-18 03:40:19 -07:00
} ,
2021-12-03 00:44:16 -08:00
] ;