/** * Gmail Node - Version 2.2 * Discriminator: resource=thread, operation=getAll */ interface Credentials { googleApi: CredentialReference; gmailOAuth2: CredentialReference; } export type GmailV22ThreadGetAllParams = { resource: 'thread'; operation: 'getAll'; authentication?: 'oAuth2' | 'serviceAccount' | Expression; /** * Whether to return all results or only up to a given limit * @default false */ returnAll?: boolean | Expression; /** * Max number of results to return * @displayOptions.show { returnAll: [false] } * @default 50 */ limit?: number | Expression; /** * Filters * @default {} */ filters?: { /** Whether to include threads from SPAM and TRASH in the results * @default false */ includeSpamTrash?: boolean | Expression; /** Only return threads 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 * @hint Use the same format as in the Gmail search box. <a href="https://support.google.com/mail/answer/7190?hl=en">More info</a>. */ q?: string | Expression | PlaceholderValue; /** Read Status * @hint Filter emails by whether they have been read or not * @default unread */ readStatus?: 'both' | 'unread' | 'read' | Expression; /** Get all emails received after the specified date. In an expression you can set date using string in ISO format or a timestamp in miliseconds. */ receivedAfter?: string | Expression; /** Get all emails received before the specified date. In an expression you can set date using string in ISO format or a timestamp in miliseconds. */ receivedBefore?: string | Expression; }; }; export type GmailV22ThreadGetAllOutput = { historyId?: string; id?: string; snippet?: string; }; export type GmailV22ThreadGetAllNode = { type: 'n8n-nodes-base.gmail'; version: 2.2; credentials?: Credentials; config: NodeConfig; output?: Items; };