Skip to content

Commit

Permalink
feat: add "UID" to search filters in "Get Emails" operation
Browse files Browse the repository at this point in the history
  • Loading branch information
umanamente committed Oct 15, 2024
1 parent 1015d1a commit fa0260e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion nodes/Imap/utils/EmailSearchParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum EmailSearchFilters {
Subject = 'subject',
Text = 'text',
To = 'to',
UID = 'uid',
}

export const emailSearchParameters : INodeProperties[] = [
Expand Down Expand Up @@ -148,7 +149,14 @@ export const emailSearchParameters : INodeProperties[] = [
default: "",
description: "Email address of recipient",
},

{
displayName: "UID",
name: EmailSearchFilters.UID,
type: "string",
default: "",
description: 'Comma-separated list of UIDs',
placeholder: '1,2,3',
},
],
},
];
Expand Down Expand Up @@ -215,6 +223,9 @@ export function getEmailSearchParametersFromNode(context: IExecuteFunctions, ite
if (EmailSearchFilters.To in emailSearchFiltersObj) {
searchObject.to = emailSearchFiltersObj[EmailSearchFilters.To] as string;
}
if (EmailSearchFilters.UID in emailSearchFiltersObj) {
searchObject.uid = emailSearchFiltersObj[EmailSearchFilters.UID] as string;
}

return searchObject;
}

0 comments on commit fa0260e

Please sign in to comment.