/** * Send Email Node - Version 2 * Sends an email using SMTP protocol */ export interface EmailSendV2Params { resource?: unknown; /** * Operation * @displayOptions.show { resource: ["email"] } * @default send */ operation?: 'send' | 'sendAndWait'; /** * Email address of the sender. You can also specify a name: Nathan Doe <nate@n8n.io>. * @displayOptions.show { resource: ["email"], operation: ["send"] } */ fromEmail?: string | Expression | PlaceholderValue; /** * Email address of the recipient. You can also specify a name: Nathan Doe <nate@n8n.io>. * @displayOptions.show { resource: ["email"], operation: ["send"] } */ toEmail?: string | Expression | PlaceholderValue; /** * Subject line of the email * @displayOptions.show { resource: ["email"], operation: ["send"] } */ subject?: string | Expression | PlaceholderValue; /** * Email Format * @displayOptions.show { resource: ["email"], operation: ["send"] } * @default text */ emailFormat?: 'text' | 'html' | 'both' | Expression; /** * Plain text message of email * @displayOptions.show { emailFormat: ["text", "both"], resource: ["email"], operation: ["send"] } */ text?: string | Expression | PlaceholderValue; /** * HTML text message of email * @displayOptions.show { emailFormat: ["html", "both"], resource: ["email"], operation: ["send"] } */ html?: string | Expression | PlaceholderValue; /** * Options * @displayOptions.show { resource: ["email"], operation: ["send"] } * @default {} */ options?: { /** Whether to include the phrase “This email was sent automatically with n8n” to the end of the email * @default true */ appendAttribution?: boolean | Expression; /** Name of the binary properties that contain data to add to email as attachment. Multiple ones can be comma-separated. Reference embedded images or other content within the body of an email message, e.g. <img src="cid:image_1"> */ attachments?: string | Expression | PlaceholderValue; /** Email address of CC recipient */ ccEmail?: string | Expression | PlaceholderValue; /** Email address of BCC recipient */ bccEmail?: string | Expression | PlaceholderValue; /** Whether to connect even if SSL certificate validation is not possible * @default false */ allowUnauthorizedCerts?: boolean | Expression; /** The email address to send the reply to */ replyTo?: string | Expression | PlaceholderValue; /** 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; }; }; /** Message Button Label * @default Respond */ messageButtonLabel?: string | Expression | PlaceholderValue; /** Title of the form that the user can access to provide their response */ responseFormTitle?: string | Expression | PlaceholderValue; /** Description of the form that the user can access to provide their response */ responseFormDescription?: string | Expression | PlaceholderValue; /** Response Form Button Label * @default Submit */ responseFormButtonLabel?: string | Expression | PlaceholderValue; /** Override default styling of the response form with CSS */ responseFormCustomCss?: string | Expression | PlaceholderValue; }; /** * Message * @displayOptions.show { resource: ["email"], operation: ["sendAndWait"] } */ message?: string | Expression | PlaceholderValue; /** * Response Type * @displayOptions.show { resource: ["email"], operation: ["sendAndWait"] } * @default approval */ responseType?: 'approval' | 'freeText' | 'customForm' | Expression; /** * Define Form * @displayOptions.show { responseType: ["customForm"], resource: ["email"], operation: ["sendAndWait"] } * @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"], resource: ["email"], operation: ["sendAndWait"] } */ jsonOutput?: IDataObject | string | Expression; /** * Form Elements * @displayOptions.show { defineForm: ["fields"], responseType: ["customForm"], resource: ["email"], operation: ["sendAndWait"] } * @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"], resource: ["email"], operation: ["sendAndWait"] } * @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; /** Approve Button Style * @displayOptions.show { approvalType: ["single", "double"] } * @default primary */ buttonApprovalStyle?: 'primary' | 'secondary' | Expression; /** Disapprove Button Label * @displayOptions.show { approvalType: ["double"] } * @default Decline */ disapproveLabel?: string | Expression | PlaceholderValue; /** Disapprove Button Style * @displayOptions.show { approvalType: ["double"] } * @default secondary */ buttonDisapprovalStyle?: 'primary' | 'secondary' | Expression; }; }; } export interface EmailSendV2Credentials { smtp: CredentialReference; } interface EmailSendV2NodeBase { type: 'n8n-nodes-base.emailSend'; version: 2; credentials?: EmailSendV2Credentials; } export type EmailSendV2ParamsNode = EmailSendV2NodeBase & { config: NodeConfig; }; export type EmailSendV2Node = EmailSendV2ParamsNode;