/** * Gmail Node - Version 2 * Discriminator: resource=draft, operation=create */ interface Credentials { googleApi: CredentialReference; gmailOAuth2: CredentialReference; } export type GmailV2DraftCreateParams = { resource: 'draft'; operation: 'create'; authentication?: 'oAuth2' | 'serviceAccount' | Expression; /** * Subject */ subject?: string | Expression | PlaceholderValue; /** * Email Type * @default text */ emailType?: 'html' | 'text'; /** * Message */ message?: string | Expression | PlaceholderValue; /** * Options * @default {} */ options?: { /** Array of supported attachments to add to the message * @default {} */ attachmentsUi?: { /** Attachment Binary */ attachmentsBinary?: Array<{ /** Add the field name from the input node. Multiple properties can be set separated by comma. */ property?: string | Expression | PlaceholderValue; }>; }; /** The email addresses of the blind copy recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com. */ bccList?: string | Expression | PlaceholderValue; /** The email addresses of the copy recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com. */ ccList?: string | Expression | PlaceholderValue; /** Select the alias to send the email from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. */ fromAlias?: string | Expression; /** The email address that the reply message is sent to */ replyTo?: string | Expression | PlaceholderValue; /** The identifier of the thread to attach the draft */ threadId?: string | Expression | PlaceholderValue; /** The email addresses of the recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com. */ sendTo?: string | Expression | PlaceholderValue; }; }; export type GmailV2DraftCreateOutput = { id?: string; message?: { id?: string; labelIds?: Array; threadId?: string; }; }; export type GmailV2DraftCreateNode = { type: 'n8n-nodes-base.gmail'; version: 2; credentials?: Credentials; config: NodeConfig; output?: Items; };