/** * Mattermost Node - Version 1 * Discriminator: resource=message, operation=post */ interface Credentials { mattermostApi: CredentialReference; } /** Post a message into a channel */ export type MattermostV1MessagePostParams = { resource: 'message'; operation: 'post'; /** * The ID of the channel to post to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. */ channelId?: string | Expression; /** * The text to send */ message?: string | Expression | PlaceholderValue; /** * The attachment to add * @default {} */ attachments?: { /** Actions to add to message. More information can be found <a href="https://docs.mattermost.com/developer/interactive-messages.html" target="_blank">here</a>. * @default {} */ actions?: { /** Item */ item?: Array<{ /** The type of the action * @default button */ type?: 'button' | 'select' | Expression; /** The type of the action * @displayOptions.show { type: ["select"] } * @default custom */ data_source?: 'channels' | 'custom' | 'users' | Expression; /** Adds a new option to select field * @displayOptions.show { data_source: ["custom"], type: ["select"] } * @default {} */ options?: { /** Option */ option?: Array<{ /** Text of the option */ text?: string | Expression | PlaceholderValue; /** Value of the option */ value?: string | Expression | PlaceholderValue; }>; }; /** Name of the Action */ name?: string | Expression | PlaceholderValue; /** Integration to add to message * @default {} */ integration?: { /** Item */ item?: { /** URL of the Integration */ url?: string | Expression | PlaceholderValue; /** Adds a Context values set * @default {} */ context?: { /** Property */ property?: Array<{ /** Name of the property to set */ name?: string | Expression | PlaceholderValue; /** Value of the property to set */ value?: string | Expression | PlaceholderValue; }>; }; }; }; }>; }; /** Icon which should appear for the user */ author_icon?: string | Expression | PlaceholderValue; /** Link for the author */ author_link?: string | Expression | PlaceholderValue; /** Name that should appear */ author_name?: string | Expression | PlaceholderValue; /** Color of the line left of text * @default #ff0000 */ color?: string | Expression; /** Required plain-text summary of the attachment */ fallback?: string | Expression | PlaceholderValue; /** 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; }>; }; /** Text of footer to add */ footer?: string | Expression | PlaceholderValue; /** Icon which should appear next to footer */ footer_icon?: string | Expression | PlaceholderValue; /** URL of image */ image_url?: string | Expression | PlaceholderValue; /** Text which appears before the message block */ pretext?: string | Expression | PlaceholderValue; /** Text to send */ text?: string | Expression | PlaceholderValue; /** URL of thumbnail */ thumb_url?: string | Expression | PlaceholderValue; /** Title of the message */ title?: string | Expression | PlaceholderValue; /** Link of the title */ title_link?: string | Expression | PlaceholderValue; }; /** * Other options to set * @default {} */ otherOptions?: { /** If set, the created message will be a threaded reply to the specified parent post ID */ root_id?: string | Expression | PlaceholderValue; }; }; export type MattermostV1MessagePostOutput = { channel_id?: string; create_at?: number; delete_at?: number; edit_at?: number; hashtags?: string; id?: string; is_pinned?: boolean; last_reply_at?: number; message?: string; metadata?: { embeds?: Array<{ type?: string; }>; }; original_id?: string; participants?: null; pending_post_id?: string; props?: { from_bot?: string; }; remote_id?: string; reply_count?: number; root_id?: string; type?: string; update_at?: number; user_id?: string; }; export type MattermostV1MessagePostNode = { type: 'n8n-nodes-base.mattermost'; version: 1; credentials?: Credentials; config: NodeConfig; output?: Items; };