/** * Email Trigger (IMAP) Node - Version 1 * Triggers the workflow when a new email is received */ export interface EmailReadImapV1Params { mailbox?: string | Expression | PlaceholderValue; /** * What to do after the email has been received. If "nothing" gets selected it will be processed multiple times. * @default read */ postProcessAction?: 'read' | 'nothing' | Expression; /** * Whether attachments of emails should be downloaded. Only set if needed as it increases processing. * @displayOptions.show { format: ["simple"] } * @default false */ downloadAttachments?: boolean | Expression; /** * The format to return the message in * @default simple */ format?: 'raw' | 'resolved' | 'simple' | Expression; /** * Prefix for name of the binary property to which to write the attachments. An index starting with 0 will be added. So if name is "attachment_" the first attachment is saved to "attachment_0" * @displayOptions.show { format: ["resolved"] } * @default attachment_ */ dataPropertyAttachmentsPrefixName?: string | Expression | PlaceholderValue; options?: { /** Custom email fetching rules. See <a href="https://github.com/mscdex/node-imap">node-imap</a>'s search function for more details. * @default ["UNSEEN"] */ customEmailConfig?: string | Expression | PlaceholderValue; /** Whether to connect even if SSL certificate validation is not possible * @default false */ allowUnauthorizedCerts?: boolean | Expression; /** Sets an interval (in minutes) to force a reconnection * @default 60 */ forceReconnect?: number | Expression; }; } export interface EmailReadImapV1Credentials { imap: CredentialReference; } interface EmailReadImapV1NodeBase { type: 'n8n-nodes-base.emailReadImap'; version: 1; credentials?: EmailReadImapV1Credentials; isTrigger: true; } export type EmailReadImapV1ParamsNode = EmailReadImapV1NodeBase & { config: NodeConfig; }; export type EmailReadImapV1Node = EmailReadImapV1ParamsNode;