n8n-nodes-base
Version:
Base nodes of n8n
82 lines (77 loc) • 2.47 kB
text/typescript
/**
* Gmail Node - Version 2.1
* Discriminator: resource=draft, operation=create
*/
interface Credentials {
googleApi: CredentialReference;
gmailOAuth2: CredentialReference;
}
export type GmailV21DraftCreateParams = {
resource: 'draft';
operation: 'create';
authentication?: 'oAuth2' | 'serviceAccount' | Expression<string>;
/**
* Subject
*/
subject?: string | Expression<string> | PlaceholderValue;
/**
* Email Type
* @default text
*/
emailType?: 'html' | 'text';
/**
* Message
*/
message?: string | Expression<string> | 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<string> | 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<string> | 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<string> | 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<string>;
/** The email address that the reply message is sent to
*/
replyTo?: string | Expression<string> | PlaceholderValue;
/** The identifier of the thread to attach the draft
*/
threadId?: string | Expression<string> | 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<string> | PlaceholderValue;
};
};
export type GmailV21DraftCreateOutput = {
id?: string;
message?: {
id?: string;
labelIds?: Array<string>;
threadId?: string;
};
};
export type GmailV21DraftCreateNode = {
type: 'n8n-nodes-base.gmail';
version: 2.1;
credentials?: Credentials;
config: NodeConfig<GmailV21DraftCreateParams>;
output?: Items<GmailV21DraftCreateOutput>;
};