Skip to content

Commit eecb53d

Browse files
committed
[FIX] Dedup key in Outlook Shared Email Received causing events to be dropped
1 parent a1c1a86 commit eecb53d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

components/microsoft_outlook/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/microsoft_outlook",
3-
"version": "1.7.3",
3+
"version": "1.7.4",
44
"description": "Pipedream Microsoft Outlook Components",
55
"main": "microsoft_outlook.app.mjs",
66
"keywords": [

components/microsoft_outlook/sources/new-email-in-shared-folder/new-email-in-shared-folder.mjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "microsoft_outlook-new-email-in-shared-folder",
77
name: "New Email in Shared Folder Event",
88
description: "Emit new event when an email is received in specified shared folders.",
9-
version: "0.0.3",
9+
version: "0.0.4",
1010
type: "source",
1111
dedupe: "unique",
1212
props: {
@@ -46,6 +46,7 @@ export default {
4646
const items = this.microsoftOutlook.paginate({
4747
fn: this.microsoftOutlook.listSharedFolderMessages,
4848
args: {
49+
debug: true,
4950
params: {
5051
$orderBy: "createdDateTime desc",
5152
$filter: `createdDateTime gt ${lastDate}`,
@@ -64,12 +65,13 @@ export default {
6465
if (responseArray.length) this._setLastDate(responseArray[0].createdDateTime);
6566

6667
for (const item of responseArray.reverse()) {
68+
const ts = Date.parse(item.createdDateTime);
6769
this.$emit(
6870
item,
6971
{
70-
id: item.conversationId,
72+
id: `${item.conversationId}-${ts}`,
7173
summary: `A new email with id: "${item.conversationId}" was received!`,
72-
ts: item.createdDateTime,
74+
ts,
7375
},
7476
);
7577
}

0 commit comments

Comments
 (0)