/** * Slack Node - Version 1 * Discriminator: resource=message, operation=post */ interface Credentials { slackApi: CredentialReference; slackOAuth2Api: CredentialReference; } /** Post a message into a channel */ export type SlackV1MessagePostParams = { resource: 'message'; operation: 'post'; authentication?: 'accessToken' | 'oAuth2' | Expression; /** * The channel to send the message to */ channel?: string | Expression | PlaceholderValue; /** * The text to send */ text?: string | Expression | PlaceholderValue; /** * JSON Parameters * @default false */ jsonParameters?: boolean | Expression; /** * Other options to set * @default {} */ otherOptions?: { /** Emoji to use as the icon for this message. Overrides icon_url. */ icon_emoji?: string | Expression | PlaceholderValue; /** URL to an image to use as the icon for this message */ icon_url?: string | Expression | PlaceholderValue; /** Whether to find and link channel names and usernames * @default false */ link_names?: boolean | Expression; /** Provide another message's ts value to make this message a reply */ thread_ts?: string | Expression | PlaceholderValue; /** Whether to use Slack Markdown parsing * @default true */ mrkdwn?: boolean | Expression; /** Whether the reply should be made visible to everyone in the channel or conversation. Use in conjunction with thread_ts. * @default false */ reply_broadcast?: boolean | Expression; /** Whether to enable unfurling of primarily text-based content * @default false */ unfurl_links?: boolean | Expression; /** Whether to disable unfurling of media content * @default true */ unfurl_media?: boolean | Expression; /** The message will be sent from this username (i.e. as if this individual sent the message). * @displayOptions.show { /authentication: ["accessToken"] } */ sendAsUser?: string | Expression | PlaceholderValue; }; /** * The attachment to add * @default {} */ attachments?: { /** Required plain-text summary of the attachment */ fallback?: string | Expression | PlaceholderValue; /** Text to send */ text?: string | Expression | PlaceholderValue; /** Title of the message */ title?: string | Expression | PlaceholderValue; /** Link of the title */ title_link?: string | Expression | PlaceholderValue; /** Color of the line left of text * @default #ff0000 */ color?: string | Expression; /** Text which appears before the message block */ pretext?: string | Expression | PlaceholderValue; /** Name that should appear */ author_name?: string | Expression | PlaceholderValue; /** Link for the author */ author_link?: string | Expression | PlaceholderValue; /** Icon which should appear for the user */ author_icon?: string | Expression | PlaceholderValue; /** URL of image */ image_url?: string | Expression | PlaceholderValue; /** URL of thumbnail */ thumb_url?: string | Expression | PlaceholderValue; /** Text of footer to add */ footer?: string | Expression | PlaceholderValue; /** Icon which should appear next to footer */ footer_icon?: string | Expression | PlaceholderValue; /** Time message relates to */ ts?: string | Expression; /** Fields to add to message * @default {} */ fields?: { /** Item */ item?: Array<{ /** Title of the item */ title?: string | Expression | PlaceholderValue; /** Value of the item */ value?: string | Expression | PlaceholderValue; /** Whether items can be displayed next to each other * @default true */ short?: boolean | Expression; }>; }; }; /** * The blocks to add * @displayOptions.show { jsonParameters: [false] } * @default {} */ blocksUi?: { /** Block */ blocksValues?: Array<{ /** Type * @default actions */ type?: 'actions' | 'section' | Expression; /** A string acting as a unique identifier for a block. You can use this block_id when you receive an interaction payload to identify the source of the action. If not specified, a block_id will be generated. Maximum length for this field is 255 characters. * @displayOptions.show { type: ["actions"] } */ blockId?: string | Expression | PlaceholderValue; /** Elements * @displayOptions.show { type: ["actions"] } * @default {} */ elementsUi?: { /** Element */ elementsValues?: Array<{ /** The type of element * @default button */ type?: 'button' | Expression; /** The text for the block * @displayOptions.show { type: ["button"] } */ text?: string | Expression | PlaceholderValue; /** Whether emojis in a text field should be escaped into the colon emoji format * @displayOptions.show { type: ["button"] } * @default false */ emoji?: boolean | Expression; /** An identifier for this action. You can use this when you receive an interaction payload to identify the source of the action. Should be unique among all other action_ids used elsewhere by your app. * @displayOptions.show { type: ["button"] } */ actionId?: string | Expression | PlaceholderValue; /** A URL to load in the user's browser when the button is clicked. Maximum length for this field is 3000 characters. If you're using URL, you'll still receive an interaction payload and will need to send an acknowledgement response. * @displayOptions.show { type: ["button"] } */ url?: string | Expression | PlaceholderValue; /** The value to send along with the interaction payload * @displayOptions.show { type: ["button"] } */ value?: string | Expression | PlaceholderValue; /** Decorates buttons with alternative visual color schemes * @displayOptions.show { type: ["button"] } * @default default */ style?: 'danger' | 'default' | 'primary' | Expression; /** Defines an optional confirmation dialog after the button is clicked * @default {} */ confirmUi?: { /** Confirm */ confirmValue?: { /** Defines the dialog's title * @default {} */ titleUi?: { /** Title */ titleValue?: { /** Text of the title */ text?: string | Expression | PlaceholderValue; /** Whether emojis in a text field should be escaped into the colon emoji format * @default false */ emoji?: boolean | Expression; }; }; /** Defines the explanatory text that appears in the confirm dialog * @default {} */ textUi?: { /** Text */ textValue?: { /** The text for the block */ text?: string | Expression | PlaceholderValue; /** Whether emojis in a text field should be escaped into the colon emoji format * @default false */ emoji?: boolean | Expression; }; }; /** Defines the text of the button that confirms the action * @default {} */ confirmTextUi?: { /** Confirm */ confirmValue?: { /** Defines the explanatory text that appears in the confirm dialog */ text?: string | Expression | PlaceholderValue; /** Whether emojis in a text field should be escaped into the colon emoji format * @default false */ emoji?: boolean | Expression; }; }; /** Defines the text of the button that cancels the action * @default {} */ denyUi?: { /** Deny */ denyValue?: { /** Defines the text of the button that cancels the action */ text?: string | Expression | PlaceholderValue; /** Whether emojis in a text field should be escaped into the colon emoji format * @default false */ emoji?: boolean | Expression; }; }; /** Defines the color scheme applied to the confirm button * @default default */ style?: 'danger' | 'default' | 'primary' | Expression; }; }; }>; }; /** A string acting as a unique identifier for a block. You can use this block_id when you receive an interaction payload to identify the source of the action. If not specified, a block_id will be generated. Maximum length for this field is 255 characters. * @displayOptions.show { type: ["section"] } */ blockId?: string | Expression | PlaceholderValue; /** Define the text of the button that cancels the action * @displayOptions.show { type: ["section"] } * @default {} */ textUi?: { /** Text */ textValue?: { /** The formatting to use for this text object * @default mrkwdn */ type?: 'mrkwdn' | 'plainText' | Expression; /** The text for the block. This field accepts any of the standard text formatting markup when type is mrkdwn. */ text?: string | Expression | PlaceholderValue; /** Whether emojis in a text field should be escaped into the colon emoji format. This field is only usable when type is plain_text. * @displayOptions.show { type: ["plainText"] } * @default false */ emoji?: boolean | Expression; /** Whether to set to false (as is default) URLs will be auto-converted into links, conversation names will be link-ified, and certain mentions will be automatically parsed * @displayOptions.show { type: ["mrkwdn"] } * @default false */ verbatim?: boolean | Expression; }; }; /** An array of text objects. Any text objects included with fields will be rendered in a compact format that allows for 2 columns of side-by-side text. Maximum number of items is 10. * @displayOptions.show { type: ["section"] } * @default {} */ fieldsUi?: { /** Text */ fieldsValues?: Array<{ /** The formatting to use for this text object * @default mrkwdn */ type?: 'mrkwdn' | 'plainText' | Expression; /** The text for the block. This field accepts any of the standard text formatting markup when type is mrkdwn. */ text?: string | Expression | PlaceholderValue; /** Whether emojis in a text field should be escaped into the colon emoji format. This field is only usable when type is plain_text. * @displayOptions.show { type: ["plainText"] } * @default false */ emoji?: boolean | Expression; /** When set to false (as is default) URLs will be auto-converted into links, conversation names will be link-ified, and certain mentions will be automatically parsed * @displayOptions.show { type: ["mrkwdn"] } * @default false */ verbatim?: boolean | Expression; }>; }; /** Accessory * @displayOptions.show { type: ["section"] } * @default {} */ accessoryUi?: { /** Accessory */ accessoriesValues?: { /** The type of element * @default button */ type?: 'button' | Expression; /** The text for the block * @displayOptions.show { type: ["button"] } */ text?: string | Expression | PlaceholderValue; /** Whether emojis in a text field should be escaped into the colon emoji format * @displayOptions.show { type: ["button"] } * @default false */ emoji?: boolean | Expression; /** An identifier for this action. You can use this when you receive an interaction payload to identify the source of the action. Should be unique among all other action_ids used elsewhere by your app. * @displayOptions.show { type: ["button"] } */ actionId?: string | Expression | PlaceholderValue; /** A URL to load in the user's browser when the button is clicked. Maximum length for this field is 3000 characters. If you're using URL, you'll still receive an interaction payload and will need to send an acknowledgement response. * @displayOptions.show { type: ["button"] } */ url?: string | Expression | PlaceholderValue; /** The value to send along with the interaction payload * @displayOptions.show { type: ["button"] } */ value?: string | Expression | PlaceholderValue; /** Decorates buttons with alternative visual color schemes * @displayOptions.show { type: ["button"] } * @default default */ style?: 'danger' | 'default' | 'primary' | Expression; /** Defines an optional confirmation dialog after the button is clicked * @displayOptions.show { type: ["button"] } * @default {} */ confirmUi?: { /** Confirm */ confirmValue?: { /** Defines an optional confirmation dialog after the button is clicked * @default {} */ titleUi?: { /** Title */ titleValue?: { /** Text of the title */ text?: string | Expression | PlaceholderValue; /** Whether emojis in a text field should be escaped into the colon emoji format * @default false */ emoji?: boolean | Expression; }; }; /** Defines the explanatory text that appears in the confirm dialog * @default {} */ textUi?: { /** Text */ textValue?: { /** The text for the block */ text?: string | Expression | PlaceholderValue; /** Whether emojis in a text field should be escaped into the colon emoji format * @default false */ emoji?: boolean | Expression; }; }; /** Defines the explanatory text that appears in the confirm dialog * @default {} */ confirmTextUi?: { /** Confirm */ confirmValue?: { /** Defines the explanatory text that appears in the confirm dialog */ text?: string | Expression | PlaceholderValue; /** Whether emojis in a text field should be escaped into the colon emoji format * @default false */ emoji?: boolean | Expression; }; }; /** Define the text of the button that cancels the action * @default {} */ denyUi?: { /** Deny */ denyValue?: { /** Define the text of the button that cancels the action */ text?: string | Expression | PlaceholderValue; /** Whether emojis in a text field should be escaped into the colon emoji format * @default false */ emoji?: boolean | Expression; }; }; /** Defines the color scheme applied to the confirm button * @default default */ style?: 'danger' | 'default' | 'primary' | Expression; }; }; }; }; }>; }; /** * The attachments to add * @displayOptions.show { jsonParameters: [true] } */ attachmentsJson?: IDataObject | string | Expression; /** * The blocks to add * @displayOptions.show { jsonParameters: [true] } */ blocksJson?: IDataObject | string | Expression; }; export type SlackV1MessagePostNode = { type: 'n8n-nodes-base.slack'; version: 1; credentials?: Credentials; config: NodeConfig; };