/** * Telegram Node - Version 1.1 * Discriminator: resource=message, operation=sendAndWait */ interface Credentials { telegramApi: CredentialReference; } /** Send a message and wait for response */ export type TelegramV11MessageSendAndWaitParams = { resource: 'message'; operation: 'sendAndWait'; /** * Force Reply * @displayOptions.show { replyMarkup: ["forceReply"] } * @default {} */ forceReply?: { /** Whether to show reply interface to the user, as if they manually selected the bot‘s message and tapped ’Reply * @default false */ force_reply?: boolean | Expression; /** Whether to force reply from specific users only * @default false */ selective?: boolean | Expression; }; /** * Adds an inline keyboard that appears right next to the message it belongs to * @displayOptions.show { replyMarkup: ["inlineKeyboard"] } * @default {} */ inlineKeyboard?: { /** Rows */ rows?: Array<{ /** The value to set * @default {} */ row?: { /** Buttons */ buttons?: Array<{ /** Label text on the button */ text?: string | Expression | PlaceholderValue; /** Additional Fields * @default {} */ additionalFields?: { /** Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes */ callback_data?: string | Expression | PlaceholderValue; /** Whether to send a Pay button * @default false */ pay?: boolean | Expression; /** If set, pressing the button will insert the bot‘s username and the specified inline query in the current chat's input field.Can be empty, in which case only the bot’s username will be inserted */ switch_inline_query_current_chat?: string | Expression | PlaceholderValue; /** If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot‘s username and the specified inline query in the input field. Can be empty, in which case just the bot’s username will be inserted. */ switch_inline_query?: string | Expression | PlaceholderValue; /** HTTP or tg:// URL to be opened when button is pressed */ url?: string | Expression | PlaceholderValue; /** Launch the Telegram Web App * @default {} */ web_app?: { /** An HTTPS URL of a Web App to be opened */ url?: string | Expression | PlaceholderValue; }; }; }>; }; }>; }; /** * Adds a custom keyboard with reply options * @displayOptions.show { replyMarkup: ["replyKeyboard"] } * @default {} */ replyKeyboard?: { /** Rows */ rows?: Array<{ /** The value to set * @default {} */ row?: { /** Buttons */ buttons?: Array<{ /** Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed. */ text?: string | Expression | PlaceholderValue; /** Additional Fields * @default {} */ additionalFields?: { /** Whether the user's phone number will be sent as a contact when the button is pressed.Available in private chats only * @default false */ request_contact?: boolean | Expression; /** Whether the user's request_location * @default false */ request_location?: boolean | Expression; /** Launch the Telegram Web App * @default {} */ web_app?: { /** An HTTPS URL of a Web App to be opened */ url?: string | Expression | PlaceholderValue; }; }; }>; }; }>; }; /** * Reply Keyboard Options * @displayOptions.show { replyMarkup: ["replyKeyboard"] } * @default {} */ replyKeyboardOptions?: { /** Whether to request clients to resize the keyboard vertically for optimal fit * @default false */ resize_keyboard?: boolean | Expression; /** Whether to request clients to hide the keyboard as soon as it's been used * @default false */ one_time_keyboard?: boolean | Expression; /** Whether to show the keyboard to specific users only * @default false */ selective?: boolean | Expression; }; /** * Reply Keyboard Remove * @displayOptions.show { replyMarkup: ["replyKeyboardRemove"] } * @default {} */ replyKeyboardRemove?: { /** Whether to request clients to remove the custom keyboard * @default false */ remove_keyboard?: boolean | Expression; /** Whether to force reply from specific users only * @default false */ selective?: boolean | Expression; }; /** * Unique identifier for the target chat or username of the target channel (in the format @channelusername). To find your chat ID ask @get_id_bot. */ chatId?: string | Expression | PlaceholderValue; /** * Message */ message?: string | Expression | PlaceholderValue; /** * Response Type * @default approval */ responseType?: 'approval' | 'freeText' | 'customForm' | Expression; /** * Define Form * @displayOptions.show { responseType: ["customForm"] } * @default fields */ defineForm?: 'fields' | 'json'; /** * Form Fields * @hint <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.form/" target="_blank">See docs</a> for field syntax * @displayOptions.show { defineForm: ["json"], responseType: ["customForm"] } */ jsonOutput?: IDataObject | string | Expression; /** * Form Elements * @displayOptions.show { defineForm: ["fields"], responseType: ["customForm"] } * @default {} */ formFields?: { /** Values */ values?: Array<{ /** The name of the field, used in input attributes and referenced by the workflow * @displayOptions.hide { fieldType: ["html"] } */ fieldName?: string | Expression | PlaceholderValue; /** Label that appears above the input field * @displayOptions.hide { fieldType: ["hiddenField", "html"] } */ fieldLabel?: string | Expression | PlaceholderValue; /** Label that appears above the input field * @displayOptions.hide { fieldType: ["hiddenField", "html"] } */ fieldLabel?: string | Expression | PlaceholderValue; /** The name of the field, used in input attributes and referenced by the workflow * @displayOptions.show { fieldType: ["hiddenField"] } */ fieldName?: string | Expression | PlaceholderValue; /** The type of field to add to the form * @default text */ fieldType?: 'checkbox' | 'html' | 'date' | 'dropdown' | 'email' | 'file' | 'hiddenField' | 'number' | 'password' | 'radio' | 'text' | 'textarea' | Expression; /** Optional field. It can be used to include the html in the output. * @displayOptions.show { fieldType: ["html"] } */ elementName?: string | Expression | PlaceholderValue; /** The name of the field, used in input attributes and referenced by the workflow * @displayOptions.hide { fieldType: ["html"] } */ fieldName?: string | Expression | PlaceholderValue; /** Sample text to display inside the field * @displayOptions.hide { fieldType: ["dropdown", "date", "file", "html", "hiddenField", "radio", "checkbox"] } */ placeholder?: string | Expression | PlaceholderValue; /** Default value that will be pre-filled in the form field * @displayOptions.show { fieldType: ["text", "number", "email", "textarea"] } */ defaultValue?: string | Expression | PlaceholderValue; /** Default date value that will be pre-filled in the form field (format: YYYY-MM-DD) * @displayOptions.show { fieldType: ["date"] } */ defaultValue?: string | Expression; /** Default value that will be pre-selected. Must match one of the option labels. * @displayOptions.show { fieldType: ["dropdown", "radio"] } */ defaultValue?: string | Expression | PlaceholderValue; /** Default value(s) that will be pre-selected. Must match one or multiple of the option labels. Separate multiple pre-selected options with a comma. * @displayOptions.show { fieldType: ["checkbox"] } */ defaultValue?: string | Expression | PlaceholderValue; /** Input value can be set here or will be passed as a query parameter via Field Name if no value is set * @displayOptions.show { fieldType: ["hiddenField"] } */ fieldValue?: string | Expression | PlaceholderValue; /** List of options that can be selected from the dropdown * @displayOptions.show { fieldType: ["dropdown"] } * @default {"values":[{"option":""}]} */ fieldOptions?: { /** Values */ values?: Array<{ /** Option */ option?: string | Expression | PlaceholderValue; }>; }; /** Checkboxes * @displayOptions.show { fieldType: ["checkbox"] } * @default {"values":[{"option":""}]} */ fieldOptions?: { /** Values */ values?: Array<{ /** Checkbox Label */ option?: string | Expression | PlaceholderValue; }>; }; /** Radio Buttons * @displayOptions.show { fieldType: ["radio"] } * @default {"values":[{"option":""}]} */ fieldOptions?: { /** Values */ values?: Array<{ /** Radio Button Label */ option?: string | Expression | PlaceholderValue; }>; }; /** Whether to allow the user to select multiple options from the dropdown list * @displayOptions.show { fieldType: ["dropdown"] } * @default false */ multiselect?: boolean | Expression; /** Limit Selection * @displayOptions.show { fieldType: ["checkbox"] } * @default unlimited */ limitSelection?: 'exact' | 'range' | 'unlimited' | Expression; /** Number of Selections * @displayOptions.show { fieldType: ["checkbox"], limitSelection: ["exact"] } * @default 1 */ numberOfSelections?: number | Expression; /** Minimum Selections * @displayOptions.show { fieldType: ["checkbox"], limitSelection: ["range"] } * @default 0 */ minSelections?: number | Expression; /** Maximum Selections * @displayOptions.show { fieldType: ["checkbox"], limitSelection: ["range"] } * @default 1 */ maxSelections?: number | Expression; /** HTML elements to display on the form page * @hint Does not accept <code><script></code>, <code><style></code> or <code><input></code> tags * @displayOptions.show { fieldType: ["html"] } */ html?: string; /** Whether to allow the user to select multiple files from the file input or just one * @displayOptions.show { fieldType: ["file"] } * @default true */ multipleFiles?: boolean | Expression; /** Comma-separated list of allowed file extensions * @hint Leave empty to allow all file types * @displayOptions.show { fieldType: ["file"] } */ acceptFileTypes?: string | Expression | PlaceholderValue; /** Whether to require the user to enter a value for this field before submitting the form * @displayOptions.hide { fieldType: ["html", "hiddenField"] } * @default false */ requiredField?: boolean | Expression; }>; }; /** * Approval Options * @displayOptions.show { responseType: ["approval"] } * @default {} */ approvalOptions?: { /** Values */ values?: { /** Type of Approval * @default single */ approvalType?: 'single' | 'double' | Expression; /** Approve Button Label * @displayOptions.show { approvalType: ["single", "double"] } * @default ✅ Approve */ approveLabel?: string | Expression | PlaceholderValue; /** Disapprove Button Label * @displayOptions.show { approvalType: ["double"] } * @default ❌ Decline */ disapproveLabel?: string | Expression | PlaceholderValue; }; }; /** * Options * @displayOptions.show { responseType: ["approval", "freeText", "customForm"] } * @default {} */ options?: { /** Whether to limit the time this node should wait for a user response before execution resumes * @default {"values":{"limitType":"afterTimeInterval","resumeAmount":45,"resumeUnit":"minutes"}} */ limitWaitTime?: { /** Values */ values?: { /** Sets the condition for the execution to resume. Can be a specified date or after some time. * @default afterTimeInterval */ limitType?: 'afterTimeInterval' | 'atSpecifiedTime' | Expression; /** The time to wait * @displayOptions.show { limitType: ["afterTimeInterval"] } * @default 1 */ resumeAmount?: number | Expression; /** Unit of the interval value * @displayOptions.show { limitType: ["afterTimeInterval"] } * @default hours */ resumeUnit?: 'minutes' | 'hours' | 'days' | Expression; /** Continue execution after the specified date and time * @displayOptions.show { limitType: ["atSpecifiedTime"] } */ maxDateAndTime?: string | Expression; }; }; /** Whether to include the phrase "This message was sent automatically with n8n" to the end of the message * @default true */ appendAttribution?: boolean | Expression; }; }; export type TelegramV11MessageSendAndWaitOutput = { data?: { text?: string; }; }; export type TelegramV11MessageSendAndWaitNode = { type: 'n8n-nodes-base.telegram'; version: 1.1; credentials?: Credentials; config: NodeConfig; output?: Items; };