2022-08-17 08:50:24 -07:00
import { INodeProperties } from 'n8n-workflow' ;
2020-03-05 15:25:18 -08:00
2021-12-03 00:44:16 -08:00
export const channelOperations : INodeProperties [ ] = [
2020-03-05 15:25:18 -08:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2020-03-05 15:25:18 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'channel' ] ,
2020-03-05 15:25:18 -08:00
} ,
} ,
options : [
2020-03-08 15:22:33 -07:00
{
name : 'Archive' ,
value : 'archive' ,
2022-05-06 14:01:25 -07:00
description : 'Archives a conversation' ,
2022-07-10 13:50:51 -07:00
action : 'Archive a channel' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Close' ,
value : 'close' ,
2022-05-06 14:01:25 -07:00
description : 'Closes a direct message or multi-person direct message' ,
2022-07-10 13:50:51 -07:00
action : 'Close a channel' ,
2020-03-08 15:22:33 -07:00
} ,
2020-03-05 15:25:18 -08:00
{
name : 'Create' ,
value : 'create' ,
description : 'Initiates a public or private channel-based conversation' ,
2022-07-10 13:50:51 -07:00
action : 'Create a channel' ,
2020-03-05 15:25:18 -08:00
} ,
2020-03-08 15:22:33 -07:00
{
name : 'Get' ,
value : 'get' ,
2022-05-06 14:01:25 -07:00
description : 'Get information about a channel' ,
2022-07-10 13:50:51 -07:00
action : 'Get a channel' ,
2020-03-08 15:22:33 -07:00
} ,
{
2022-09-07 07:51:14 -07:00
name : 'Get Many' ,
2020-03-08 15:22:33 -07:00
value : 'getAll' ,
2022-05-06 14:01:25 -07:00
description : 'Get all channels in a Slack team' ,
2022-07-10 13:50:51 -07:00
action : 'Get all channels' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'History' ,
value : 'history' ,
2022-08-17 08:50:24 -07:00
description : "Get a conversation's history of messages and events" ,
2022-07-10 13:50:51 -07:00
action : 'Get the history of a channel' ,
2020-03-08 15:22:33 -07:00
} ,
2020-03-05 15:25:18 -08:00
{
name : 'Invite' ,
value : 'invite' ,
description : 'Invite a user to a channel' ,
2022-07-10 13:50:51 -07:00
action : 'Invite a user to a channel' ,
2020-03-05 15:25:18 -08:00
} ,
2020-03-08 15:22:33 -07:00
{
name : 'Join' ,
value : 'join' ,
2022-05-06 14:01:25 -07:00
description : 'Joins an existing conversation' ,
2022-07-10 13:50:51 -07:00
action : 'Join a channel' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Kick' ,
value : 'kick' ,
2022-05-06 14:01:25 -07:00
description : 'Removes a user from a channel' ,
2022-07-10 13:50:51 -07:00
action : 'Kick a user from a channel' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Leave' ,
value : 'leave' ,
2022-05-06 14:01:25 -07:00
description : 'Leaves a conversation' ,
2022-07-10 13:50:51 -07:00
action : 'Leave a channel' ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
{
name : 'Member' ,
value : 'member' ,
2022-05-06 14:01:25 -07:00
description : 'List members of a conversation' ,
2022-07-10 13:50:51 -07:00
action : 'Get members of a channel' ,
2020-12-13 01:47:52 -08:00
} ,
2020-03-08 15:22:33 -07:00
{
name : 'Open' ,
value : 'open' ,
2022-05-06 14:01:25 -07:00
description : 'Opens or resumes a direct message or multi-person direct message' ,
2022-07-10 13:50:51 -07:00
action : 'Open a channel' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Rename' ,
value : 'rename' ,
2022-05-06 14:01:25 -07:00
description : 'Renames a conversation' ,
2022-07-10 13:50:51 -07:00
action : 'Rename a channel' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Replies' ,
value : 'replies' ,
description : 'Get a thread of messages posted to a channel' ,
2022-07-10 13:50:51 -07:00
action : 'Get a thread of messages posted to a channel' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Set Purpose' ,
value : 'setPurpose' ,
2022-05-06 14:01:25 -07:00
description : 'Sets the purpose for a conversation' ,
2022-07-10 13:50:51 -07:00
action : 'Set the purpose of a channel' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Set Topic' ,
value : 'setTopic' ,
2022-05-06 14:01:25 -07:00
description : 'Sets the topic for a conversation' ,
2022-07-10 13:50:51 -07:00
action : 'Set the topic of a channel' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Unarchive' ,
value : 'unarchive' ,
2022-05-06 14:01:25 -07:00
description : 'Unarchives a conversation' ,
2022-07-10 13:50:51 -07:00
action : 'Unarchive a channel' ,
2020-03-08 15:22:33 -07:00
} ,
2020-03-05 15:25:18 -08:00
] ,
default : 'create' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2020-03-05 15:25:18 -08:00
2021-12-03 00:44:16 -08:00
export const channelFields : INodeProperties [ ] = [
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:archive */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Channel Name or ID' ,
2020-03-08 15:22:33 -07:00
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'archive' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
default : '' ,
required : true ,
2022-08-17 08:50:24 -07:00
description :
'The name of the channel to archive. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:close */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Channel Name or ID' ,
2020-03-08 15:22:33 -07:00
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'close' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
default : '' ,
required : true ,
2022-08-17 08:50:24 -07:00
description :
'The name of the channel to close. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:create */
/* -------------------------------------------------------------------------- */
2020-03-05 15:25:18 -08:00
{
2020-03-08 15:22:33 -07:00
displayName : 'Channel' ,
name : 'channelId' ,
2020-03-05 15:25:18 -08:00
type : 'string' ,
default : '' ,
placeholder : 'Channel name' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'create' ] ,
resource : [ 'channel' ] ,
2020-03-05 15:25:18 -08:00
} ,
} ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'The name of the channel to create' ,
2020-03-05 15:25:18 -08:00
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'channel' ] ,
operation : [ 'create' ] ,
2020-03-05 15:25:18 -08:00
} ,
} ,
options : [
{
displayName : 'Is Private' ,
name : 'isPrivate' ,
type : 'boolean' ,
default : false ,
2022-06-20 07:54:01 -07:00
description : 'Whether to create a private channel instead of a public one' ,
2020-03-05 15:25:18 -08:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-03-05 15:25:18 -08:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:invite */
/* -------------------------------------------------------------------------- */
2020-03-05 15:25:18 -08:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Channel Name or ID' ,
2020-03-08 15:22:33 -07:00
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
2020-03-05 15:25:18 -08:00
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'invite' ] ,
resource : [ 'channel' ] ,
2020-03-05 15:25:18 -08:00
} ,
} ,
required : true ,
2022-08-17 08:50:24 -07:00
description :
'The ID of the channel to invite user to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-05 15:25:18 -08:00
} ,
{
2022-06-20 07:54:01 -07:00
displayName : 'User Names or IDs' ,
2020-11-24 00:09:00 -08:00
name : 'userIds' ,
type : 'multiOptions' ,
2020-03-15 07:51:49 -07:00
typeOptions : {
loadOptionsMethod : 'getUsers' ,
} ,
2022-04-22 09:29:51 -07:00
default : [ ] ,
2020-03-05 15:25:18 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'invite' ] ,
resource : [ 'channel' ] ,
2020-03-05 15:25:18 -08:00
} ,
} ,
required : true ,
2022-08-17 08:50:24 -07:00
description :
'The ID of the user to invite into channel. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-05 15:25:18 -08:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:get */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
displayName : 'Channel' ,
name : 'channelId' ,
type : 'string' ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'get' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
required : true ,
description : 'Channel ID to learn more about' ,
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'channel' ] ,
operation : [ 'get' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
options : [
{
displayName : 'Include Num of Members' ,
name : 'includeNumMembers' ,
type : 'boolean' ,
default : false ,
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:kick */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Channel Name or ID' ,
2020-03-08 15:22:33 -07:00
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
default : '' ,
placeholder : 'Channel name' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'kick' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
required : true ,
2022-08-17 08:50:24 -07:00
description :
'The name of the channel to create. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-08 15:22:33 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'User Name or ID' ,
2020-03-08 15:22:33 -07:00
name : 'userId' ,
2020-03-15 07:51:49 -07:00
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>' ,
2020-03-15 07:51:49 -07:00
typeOptions : {
loadOptionsMethod : 'getUsers' ,
} ,
2020-03-08 15:22:33 -07:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'kick' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
default : '' ,
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:join */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Channel Name or ID' ,
2020-03-08 15:22:33 -07:00
name : 'channelId' ,
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>' ,
2020-03-08 15:22:33 -07:00
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
default : '' ,
placeholder : 'Channel name' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'join' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
required : true ,
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:getAll */
/* -------------------------------------------------------------------------- */
2020-03-05 15:25:18 -08:00
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'channel' ] ,
operation : [ 'getAll' ] ,
2020-03-05 15:25:18 -08:00
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-03-05 15:25:18 -08:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'channel' ] ,
operation : [ 'getAll' ] ,
returnAll : [ false ] ,
2020-03-05 15:25:18 -08:00
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 100 ,
} ,
default : 50 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-03-05 15:25:18 -08:00
} ,
{
2020-03-08 15:22:33 -07:00
displayName : 'Filters' ,
name : 'filters' ,
2020-03-05 15:25:18 -08:00
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'channel' ] ,
operation : [ 'getAll' ] ,
2020-03-05 15:25:18 -08:00
} ,
} ,
options : [
{
2020-03-08 15:22:33 -07:00
displayName : 'Exclude Archived' ,
name : 'excludeArchived' ,
type : 'boolean' ,
default : false ,
2022-06-20 07:54:01 -07:00
description : 'Whether to exclude archived channels from the list' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Types' ,
name : 'types' ,
type : 'multiOptions' ,
options : [
{
name : 'Public Channel' ,
2020-10-22 06:46:03 -07:00
value : 'public_channel' ,
2020-03-08 15:22:33 -07:00
} ,
{
name : 'Private Channel' ,
2020-10-22 06:46:03 -07:00
value : 'private_channel' ,
2020-03-08 15:22:33 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
2020-03-08 15:22:33 -07:00
name : 'mpim' ,
2020-10-22 06:46:03 -07:00
value : 'mpim' ,
2020-03-08 15:22:33 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
2020-03-08 15:22:33 -07:00
name : 'im' ,
2020-10-22 06:46:03 -07:00
value : 'im' ,
2020-03-08 15:22:33 -07:00
} ,
] ,
default : [ 'public_channel' ] ,
description : 'Mix and match channel types' ,
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:history */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Channel Name or ID' ,
2020-03-08 15:22:33 -07:00
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
default : '' ,
placeholder : 'Channel name' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'history' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
required : true ,
2022-08-17 08:50:24 -07:00
description :
'The name of the channel to create. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'channel' ] ,
operation : [ 'history' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'channel' ] ,
operation : [ 'history' ] ,
returnAll : [ false ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 100 ,
} ,
default : 50 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Filters' ,
name : 'filters' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'channel' ] ,
operation : [ 'history' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
options : [
{
displayName : 'Inclusive' ,
name : 'inclusive' ,
type : 'boolean' ,
default : false ,
2022-08-17 08:50:24 -07:00
description :
'Whether to include messages with latest or oldest timestamp in results only when either timestamp is specified' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Latest' ,
name : 'latest' ,
type : 'dateTime' ,
2020-03-05 15:25:18 -08:00
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'End of time range of messages to include in results' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Oldest' ,
name : 'oldest' ,
type : 'dateTime' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Start of time range of messages to include in results' ,
2020-03-05 15:25:18 -08:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-03-05 15:25:18 -08:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:leave */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Channel Name or ID' ,
2020-03-08 15:22:33 -07:00
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'leave' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
default : '' ,
required : true ,
2022-08-17 08:50:24 -07:00
description :
'The name of the channel to leave. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:member */
/* -------------------------------------------------------------------------- */
{
2022-06-03 10:23:49 -07:00
displayName : 'Channel Name or ID' ,
2020-12-13 01:47:52 -08:00
name : 'channelId' ,
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>' ,
2020-12-13 01:47:52 -08:00
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'member' ] ,
resource : [ 'channel' ] ,
2020-12-13 01:47:52 -08:00
} ,
} ,
required : true ,
} ,
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'channel' ] ,
operation : [ 'member' ] ,
2020-12-13 01:47:52 -08:00
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-12-13 01:47:52 -08:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
2022-05-20 14:47:24 -07:00
typeOptions : {
minValue : 1 ,
} ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-12-13 01:47:52 -08:00
default : 100 ,
placeholder : 'Limit' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'member' ] ,
resource : [ 'channel' ] ,
returnAll : [ false ] ,
2020-12-13 01:47:52 -08:00
} ,
} ,
} ,
{
displayName : 'Resolve Data' ,
name : 'resolveData' ,
type : 'boolean' ,
default : false ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'channel' ] ,
operation : [ 'member' ] ,
2020-12-13 01:47:52 -08:00
} ,
} ,
2022-08-17 08:50:24 -07:00
description :
'Whether to resolve the data automatically. By default the response only contain the ID to resource.' ,
2020-12-13 01:47:52 -08:00
} ,
/* -------------------------------------------------------------------------- */
/* channel:open */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
displayName : 'Options' ,
name : 'options' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'channel' ] ,
operation : [ 'open' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
options : [
{
displayName : 'Channel ID' ,
name : 'channelId' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
"Resume a conversation by supplying an im or mpim's ID. Or provide the users field instead." ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Return IM' ,
name : 'returnIm' ,
type : 'boolean' ,
default : false ,
2022-06-20 07:54:01 -07:00
description : 'Whether you want the full IM channel definition in the response' ,
2020-03-08 15:22:33 -07:00
} ,
{
2022-06-20 07:54:01 -07:00
displayName : 'User Names or IDs' ,
2020-03-08 15:22:33 -07:00
name : 'users' ,
type : 'multiOptions' ,
typeOptions : {
loadOptionsMethod : 'getUsers' ,
} ,
default : [ ] ,
2022-08-17 08:50:24 -07:00
description :
'If only one user is included, this creates a 1:1 DM. The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a channel when not supplying users. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-08 15:22:33 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:rename */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Channel Name or ID' ,
2020-03-08 15:22:33 -07:00
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'rename' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
default : '' ,
required : true ,
2022-08-17 08:50:24 -07:00
description :
'The name of the channel to rename. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Name' ,
name : 'name' ,
type : 'string' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'rename' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
default : '' ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'New name for conversation' ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:replies */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Channel Name or ID' ,
2020-03-08 15:22:33 -07:00
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
default : '' ,
placeholder : 'Channel name' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'replies' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
required : true ,
2022-08-17 08:50:24 -07:00
description :
'The name of the channel to create. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'TS' ,
name : 'ts' ,
type : 'string' ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'replies' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
required : true ,
2022-08-17 08:50:24 -07:00
description : "Unique identifier of a thread's parent message" ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'channel' ] ,
operation : [ 'replies' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'channel' ] ,
operation : [ 'replies' ] ,
returnAll : [ false ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 100 ,
} ,
default : 50 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Filters' ,
name : 'filters' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'channel' ] ,
operation : [ 'replies' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
options : [
{
displayName : 'Inclusive' ,
name : 'inclusive' ,
type : 'boolean' ,
default : false ,
2022-08-17 08:50:24 -07:00
description :
'Whether to include messages with latest or oldest timestamp in results only when either timestamp is specified' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Latest' ,
name : 'latest' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'End of time range of messages to include in results' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Oldest' ,
name : 'oldest' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Start of time range of messages to include in results' ,
2020-03-08 15:22:33 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-03-08 15:22:33 -07:00
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:setPurpose */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Channel Name or ID' ,
2020-03-08 15:22:33 -07:00
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'setPurpose' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
default : '' ,
required : true ,
2022-08-17 08:50:24 -07:00
description :
'Conversation to set the purpose of. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Purpose' ,
name : 'purpose' ,
type : 'string' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'setPurpose' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
default : '' ,
required : true ,
description : 'A new, specialer purpose' ,
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:setTopic */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Channel Name or ID' ,
2020-03-08 15:22:33 -07:00
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'setTopic' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
default : '' ,
required : true ,
2022-08-17 08:50:24 -07:00
description :
'Conversation to set the topic of. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-08 15:22:33 -07:00
} ,
{
displayName : 'Topic' ,
name : 'topic' ,
type : 'string' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'setTopic' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
default : '' ,
required : true ,
description : 'The new topic string. Does not support formatting or linkification.' ,
} ,
2020-12-13 01:47:52 -08:00
/* -------------------------------------------------------------------------- */
/* channel:unarchive */
/* -------------------------------------------------------------------------- */
2020-03-08 15:22:33 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Channel Name or ID' ,
2020-03-08 15:22:33 -07:00
name : 'channelId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getChannels' ,
} ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'unarchive' ] ,
resource : [ 'channel' ] ,
2020-03-08 15:22:33 -07:00
} ,
} ,
default : '' ,
required : true ,
2022-08-17 08:50:24 -07:00
description :
'The ID of the channel to unarchive. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-08 15:22:33 -07:00
} ,
2021-12-03 00:44:16 -08:00
] ;