n8n-nodes-base
Version:
Base nodes of n8n
60 lines (56 loc) • 2.22 kB
text/typescript
/**
* Gmail Node - Version 1
* Discriminator: resource=message, operation=getAll
*/
interface Credentials {
googleApi: CredentialReference;
gmailOAuth2: CredentialReference;
}
export type GmailV1MessageGetAllParams = {
resource: 'message';
operation: 'getAll';
authentication?: 'oAuth2' | 'serviceAccount' | Expression<string>;
/**
* Whether to return all results or only up to a given limit
* @default false
*/
returnAll?: boolean | Expression<boolean>;
/**
* Max number of results to return
* @displayOptions.show { returnAll: [false] }
* @default 10
*/
limit?: number | Expression<number>;
/**
* Additional Fields
* @default {}
*/
additionalFields?: {
/** Prefix for name of the binary property to which to write the attachment. An index starting with 0 will be added. So if name is "attachment_" the first attachment is saved to "attachment_0".
* @displayOptions.hide { format: ["full", "ids", "metadata", "minimal", "raw"] }
* @default attachment_
*/
dataPropertyAttachmentsPrefixName?: string | Expression<string> | PlaceholderValue;
/** The format to return the message in
* @default resolved
*/
format?: 'full' | 'ids' | 'metadata' | 'minimal' | 'raw' | 'resolved' | Expression<string>;
/** Whether to include messages from SPAM and TRASH in the results
* @default false
*/
includeSpamTrash?: boolean | Expression<boolean>;
/** Only return messages with labels that match all of the specified label IDs. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
* @default []
*/
labelIds?: string[];
/** Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid:<somemsgid@example.com> is:unread". Parameter cannot be used when accessing the api using the gmail.metadata scope.
*/
q?: string | Expression<string> | PlaceholderValue;
};
};
export type GmailV1MessageGetAllNode = {
type: 'n8n-nodes-base.gmail';
version: 1;
credentials?: Credentials;
config: NodeConfig<GmailV1MessageGetAllParams>;
};