'Whether to send a simple text message, or use Slack’s Blocks UI builder for more sophisticated messages that include form fields, sections and more',
options:[
{
name:'Simple Text Message',
value:'text',
description:'Supports basic Markdown',
},
{
name:'Blocks',
value:'block',
description:
"Combine text, buttons, form elements, dividers and more in Slack 's visual builder",
},
{
name:'Attachments',
value:'attachment',
},
],
default:'text',
},
{
displayName:'Message Text',
name:'text',
type:'string',
default:'',
required: true,
displayOptions:{
show:{
operation:['post'],
resource:['message'],
messageType:['text'],
},
},
description:
'The message text to post. Supports <a href="https://api.slack.com/reference/surfaces/formatting">markdown</a> by default - this can be disabled in "Options".',
},
{
displayName:'Blocks',
name:'blocksUi',
type:'string',
required: true,
displayOptions:{
show:{
operation:['post'],
resource:['message'],
messageType:['block'],
},
},
typeOptions:{
rows: 3,
},
description:
"Enter the JSON output from Slack's visual Block Kit Builder here. You can then use expressions to add variable content to your blocks. To create blocks, use <a target='_blank' href='https://app.slack.com/block-kit-builder'>Slack's Block Kit Builder</a>",
hint:"To create blocks, use <a target='_blank' href='https://app.slack.com/block-kit-builder'>Slack's Block Kit Builder</a>",
'Fallback text to display in slack notifications. Supports <a href="https://api.slack.com/reference/surfaces/formatting">markdown</a> by default - this can be disabled in "Options".',
'Set an image or an emoji as the Profile Photo (avatar) of the bot sending the message. Will not be used if sending message as a user.',
options:[
{
name:'imageValues',
displayName:'Add Bot Profile Photo',
values:[
{
displayName:'Profile Photo Type',
name:'profilePhotoType',
type:'options',
options:[
{
name:'Image URL',
value:'image',
},
{
name:'Emoji Code',
value:'emoji',
},
],
default:'',
placeholder:'Select a type…',
},
{
displayName:'Emoji Code',
name:'icon_emoji',
type:'string',
default:'',
displayOptions:{
show:{
profilePhotoType:['emoji'],
},
},
description:
'Only used if sending message as a bot. Use emoji codes like +1, not an actual emoji like 👍. <a target="_blank" href=" https://www.webfx.com/tools/emoji-cheat-sheet/">List of common emoji codes</a>',
},
{
displayName:'Image URL',
name:'icon_url',
type:'string',
default:'',
displayOptions:{
show:{
profilePhotoType:['image'],
},
},
description:'Only used if sending message as a bot',
},
],
},
],
},
{
displayName:'Link User and Channel Names',
name:'link_names',
type:'boolean',
default:false,
description:'Whether to turn @users and #channels in message text into clickable links',
},
{
displayName:'Reply to a Message',
name:'thread_ts',
type:'fixedCollection',
default:{},
placeholder:'Reply to a Message',
description:"Provide another message's Timestamp value to make this message a reply",
options:[
{
displayName:'Reply to a Message',
name:'replyValues',
values:[
{
displayName:'Message Timestamp to Reply To',
name:'thread_ts',
type:'number',
default:undefined,
placeholder:'1663233118.856619',
description:
'Message timestamps are included in output data of Slack nodes, abbreviated to ts',
},
{
displayName:'Reply to Thread',
name:'reply_broadcast',
type:'boolean',
default:false,
description:
'Whether the reply should be made visible to everyone in the channel or conversation',
},
],
},
],
},
{
displayName:'Use Markdown?',
name:'mrkdwn',
type:'boolean',
default:true,
description:'Whether to use Slack Markdown to format the message',
},
{
displayName:'Unfurl Links',
name:'unfurl_links',
type:'boolean',
default:false,
description:'Whether to enable unfurling of primarily text-based content',
},
{
displayName:'Unfurl Media',
name:'unfurl_media',
type:'boolean',
default:true,
description:'Whether to disable unfurling of media content',
},
{
displayName:'Send as Ephemeral Message',
name:'ephemeral',
type:'fixedCollection',
default:{},
displayOptions:{
show:{
'/select':['channel'],
},
},
placeholder:'Send as Ephemeral Message',
description:'Whether to send a temporary, ephemeral message',
options:[
{
displayName:'Send as Ephemeral Message',
name:'ephemeralValues',
values:[
{
displayName:'User to Send',
name:'user',
type:'resourceLocator',
default:{mode:'list',value:''},
placeholder:'Select a user...',
modes:[
{
displayName:'From List',
name:'list',
type:'list',
placeholder:'Select a user...',
typeOptions:{
searchListMethod:'getUsers',
searchable: true,
},
},
{
displayName:'By ID',
name:'id',
type:'string',
validation:[
{
type:'regex',
properties:{
regex:'[a-zA-Z0-9]{2,}',
errorMessage:'Not a valid Slack User ID',
},
},
],
placeholder:'U123AB45JGM',
},
],
},
{
displayName:'Send as Ephemeral Message',
name:'ephemeral',
type:'boolean',
default:true,
description:'Whether to send a temporary, ephemeral message',
},
],
},
],
},
{
displayName:'Send as Ephemeral Message',
name:'ephemeral',
type:'boolean',
displayOptions:{
show:{
'/select':['user'],
},
},
default:true,
description:'Whether to send a temporary, ephemeral message',
},
{
displayName:'Send as User',
name:'sendAsUser',
type:'string',
displayOptions:{
show:{
'/authentication':['accessToken'],
},
},
default:'',
description:
'The message will be sent from this username (i.e. as if this individual sent the message). Add chat:write.customize scope on Slack API',
description:'The Slack channel to update the message from',
},
{
displayName:'Message Timestamp',
name:'ts',
required: true,
type:'number',
default:undefined,
displayOptions:{
show:{
resource:['message'],
operation:['update'],
},
},
description:'Timestamp of the message to update',
placeholder:'1663233118.856619',
},
{
displayName:'Message Text',
name:'text',
type:'string',
default:'',
displayOptions:{
show:{
resource:['message'],
operation:['update'],
},
},
description:
'The message text to update. Supports <a href="https://api.slack.com/reference/surfaces/formatting/">markdown</a> by default - this can be disabled in "Options".',
},
{
displayName:'Update Fields',
name:'updateFields',
type:'collection',
placeholder:'Add Option',
default:{},
displayOptions:{
show:{
resource:['message'],
operation:['update'],
},
},
options:[
{
displayName:'Link User and Channel Names',
name:'link_names',
type:'boolean',
default:false,
description:'Whether to find and link channel names and usernames',