UNPKG

n8n-nodes-base

Version:

Base nodes of n8n

118 lines (112 loc) 4.96 kB
/** * Microsoft Outlook Trigger Node - Version 1 * Fetches emails from Microsoft Outlook and starts the workflow on specified polling intervals. */ export interface MicrosoftOutlookTriggerV1Params { /** * Time at which polling should occur * @default {"item":[{"mode":"everyMinute"}]} */ pollTimes?: { /** Item */ item?: Array<{ /** How often to trigger. * @default everyDay */ mode?: 'everyMinute' | 'everyHour' | 'everyDay' | 'everyWeek' | 'everyMonth' | 'everyX' | 'custom' | Expression<string>; /** The hour of the day to trigger (24h format) * @displayOptions.hide { mode: ["custom", "everyHour", "everyMinute", "everyX"] } * @default 14 */ hour?: number | Expression<number>; /** The minute of the day to trigger * @displayOptions.hide { mode: ["custom", "everyMinute", "everyX"] } * @default 0 */ minute?: number | Expression<number>; /** The day of the month to trigger * @displayOptions.show { mode: ["everyMonth"] } * @default 1 */ dayOfMonth?: number | Expression<number>; /** The weekday to trigger * @displayOptions.show { mode: ["everyWeek"] } * @default 1 */ weekday?: '1' | '2' | '3' | '4' | '5' | '6' | '0' | Expression<string>; /** Use custom cron expression. Values and ranges as follows:&lt;ul&gt;&lt;li&gt;Seconds: 0-59&lt;/li&gt;&lt;li&gt;Minutes: 0 - 59&lt;/li&gt;&lt;li&gt;Hours: 0 - 23&lt;/li&gt;&lt;li&gt;Day of Month: 1 - 31&lt;/li&gt;&lt;li&gt;Months: 0 - 11 (Jan - Dec)&lt;/li&gt;&lt;li&gt;Day of Week: 0 - 6 (Sun - Sat)&lt;/li&gt;&lt;/ul&gt; * @displayOptions.show { mode: ["custom"] } * @default * * * * * * */ cronExpression?: string | Expression<string> | PlaceholderValue; /** All how many X minutes/hours it should trigger * @displayOptions.show { mode: ["everyX"] } * @default 2 */ value?: number | Expression<number>; /** If it should trigger all X minutes or hours * @displayOptions.show { mode: ["everyX"] } * @default hours */ unit?: 'minutes' | 'hours' | Expression<string>; }>; }; event?: 'messageReceived' | Expression<string>; output?: 'simple' | 'raw' | 'fields' | Expression<string>; /** * The fields to add to the output * @displayOptions.show { output: ["fields"] } * @default [] */ fields?: Array<'bccRecipients' | 'body' | 'bodyPreview' | 'categories' | 'ccRecipients' | 'changeKey' | 'conversationId' | 'createdDateTime' | 'flag' | 'from' | 'hasAttachments' | 'importance' | 'inferenceClassification' | 'internetMessageId' | 'isDeliveryReceiptRequested' | 'isDraft' | 'isRead' | 'isReadReceiptRequested' | 'lastModifiedDateTime' | 'parentFolderId' | 'receivedDateTime' | 'replyTo' | 'sender' | 'sentDateTime' | 'subject' | 'toRecipients' | 'webLink'>; filters?: { /** Filter Query * @hint Search query to filter messages. &lt;a href="https://learn.microsoft.com/en-us/graph/filter-query-parameter"&gt;More info&lt;/a&gt;. */ custom?: string | Expression<string> | PlaceholderValue; /** Has Attachments * @default false */ hasAttachments?: boolean | Expression<boolean>; /** Choose from the list, or specify IDs using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt; * @default [] */ foldersToExclude?: string[]; /** Choose from the list, or specify IDs using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt; * @default [] */ foldersToInclude?: string[]; /** Read Status * @hint Filter messages by whether they have been read or not * @default unread */ readStatus?: 'both' | 'unread' | 'read' | Expression<string>; /** Sender name or email to filter by */ sender?: string | Expression<string> | PlaceholderValue; }; options?: { /** Prefix for name of the output fields to put the binary files data in. An index starting from 0 will be added. So if name is "attachment_" the first attachment is saved to "attachment_0". * @default attachment_ */ attachmentsPrefix?: string | Expression<string> | PlaceholderValue; /** Whether the message's attachments will be downloaded and included in the output * @default false */ downloadAttachments?: boolean | Expression<boolean>; }; } export interface MicrosoftOutlookTriggerV1Credentials { microsoftOutlookOAuth2Api: CredentialReference; } interface MicrosoftOutlookTriggerV1NodeBase { type: 'n8n-nodes-base.microsoftOutlookTrigger'; version: 1; credentials?: MicrosoftOutlookTriggerV1Credentials; isTrigger: true; } export type MicrosoftOutlookTriggerV1ParamsNode = MicrosoftOutlookTriggerV1NodeBase & { config: NodeConfig<MicrosoftOutlookTriggerV1Params>; }; export type MicrosoftOutlookTriggerV1Node = MicrosoftOutlookTriggerV1ParamsNode;