/** * SendGrid Node - Version 1 * Discriminator: resource=mail, operation=send */ interface Credentials { sendGridApi: CredentialReference; } /** Send an email */ export type SendGridV1MailSendParams = { resource: 'mail'; operation: 'send'; /** * Email address of the sender of the email */ fromEmail?: string | Expression | PlaceholderValue; /** * Name of the sender of the email */ fromName?: string | Expression | PlaceholderValue; /** * Comma-separated list of recipient email addresses */ toEmail?: string | Expression | PlaceholderValue; /** * Subject of the email to send * @displayOptions.show { dynamicTemplate: [false] } */ subject?: string | Expression | PlaceholderValue; /** * Whether this email will contain a dynamic template * @default false */ dynamicTemplate?: boolean | Expression; /** * MIME type of the email to send * @displayOptions.show { dynamicTemplate: [false] } * @default text/plain */ contentType?: 'text/plain' | 'text/html' | Expression; /** * Message body of the email to send * @displayOptions.show { dynamicTemplate: [false] } */ contentValue?: string | Expression | PlaceholderValue; /** * Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a> * @displayOptions.show { dynamicTemplate: [true] } * @default [] */ templateId?: string | Expression; /** * Dynamic Template Fields * @displayOptions.show { dynamicTemplate: [true] } * @default {} */ dynamicTemplateFields?: { /** Fields */ fields?: Array<{ /** Key of the dynamic template field */ key?: string | Expression | PlaceholderValue; /** Value for the field */ value?: string | Expression | PlaceholderValue; }>; }; /** * Additional Fields * @default {} */ additionalFields?: { /** Comma-separated list of binary properties */ attachments?: string | Expression | PlaceholderValue; /** Comma-separated list of emails of the recipients of a blind carbon copy of the email */ bccEmail?: string | Expression | PlaceholderValue; /** Comma-separated list of categories. Each category name may not exceed 255 characters. */ categories?: string | Expression | PlaceholderValue; /** Comma-separated list of emails of the recipients of a carbon copy of the email */ ccEmail?: string | Expression | PlaceholderValue; /** Whether to use to the sandbox for testing out email-sending functionality * @default false */ enableSandbox?: boolean | Expression; /** The IP Pool that you would like to send this email from */ ipPoolName?: string | Expression | PlaceholderValue; /** Comma-separated list of email addresses that will appear in the reply-to field of the email */ replyToEmail?: string | Expression | PlaceholderValue; /** Headers * @default {} */ headers?: { /** Details */ details?: Array<{ /** Key to set in the header object */ key?: string | Expression | PlaceholderValue; /** Value to set in the header object */ value?: string | Expression | PlaceholderValue; }>; }; /** When to deliver the email. Scheduling more than 72 hours in advance is forbidden. */ sendAt?: string | Expression; }; }; export type SendGridV1MailSendOutput = { messageId?: string; }; export type SendGridV1MailSendNode = { type: 'n8n-nodes-base.sendGrid'; version: 1; credentials?: Credentials; config: NodeConfig; output?: Items; };