diff --git a/components/devin/devin.app.mjs b/components/devin/devin.app.mjs index 03fe3bc115c5d..0d89f667ea23d 100644 --- a/components/devin/devin.app.mjs +++ b/components/devin/devin.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/microsoft_outlook/actions/add-label-to-email/add-label-to-email.mjs b/components/microsoft_outlook/actions/add-label-to-email/add-label-to-email.mjs index d22e1912a27ff..1b5388d57aca4 100644 --- a/components/microsoft_outlook/actions/add-label-to-email/add-label-to-email.mjs +++ b/components/microsoft_outlook/actions/add-label-to-email/add-label-to-email.mjs @@ -1,11 +1,11 @@ -import microsoftOutlook from "../../microsoft_outlook.app.mjs"; import { ConfigurationError } from "@pipedream/platform"; +import microsoftOutlook from "../../microsoft_outlook.app.mjs"; export default { key: "microsoft_outlook-add-label-to-email", name: "Add Label to Email", description: "Adds a label/category to an email in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/message-update)", - version: "0.0.8", + version: "0.0.9", type: "action", props: { microsoftOutlook, diff --git a/components/microsoft_outlook/actions/approve-workflow/approve-workflow.mjs b/components/microsoft_outlook/actions/approve-workflow/approve-workflow.mjs index 6e08830188af0..33ffd0b4f1d5b 100644 --- a/components/microsoft_outlook/actions/approve-workflow/approve-workflow.mjs +++ b/components/microsoft_outlook/actions/approve-workflow/approve-workflow.mjs @@ -4,7 +4,7 @@ export default { key: "microsoft_outlook-approve-workflow", name: "Approve Workflow", description: "Suspend the workflow until approved by email. [See the documentation](https://pipedream.com/docs/code/nodejs/rerun#flowsuspend)", - version: "0.0.6", + version: "0.0.7", type: "action", props: { microsoftOutlook, diff --git a/components/microsoft_outlook/actions/create-contact/create-contact.mjs b/components/microsoft_outlook/actions/create-contact/create-contact.mjs index 73d72b8dae914..2cc43a2379f7b 100644 --- a/components/microsoft_outlook/actions/create-contact/create-contact.mjs +++ b/components/microsoft_outlook/actions/create-contact/create-contact.mjs @@ -3,7 +3,7 @@ import microsoftOutlook from "../../microsoft_outlook.app.mjs"; export default { type: "action", key: "microsoft_outlook-create-contact", - version: "0.0.15", + version: "0.0.16", name: "Create Contact", description: "Add a contact to the root Contacts folder, [See the documentation](https://docs.microsoft.com/en-us/graph/api/user-post-contacts)", props: { diff --git a/components/microsoft_outlook/actions/create-draft-email/create-draft-email.mjs b/components/microsoft_outlook/actions/create-draft-email/create-draft-email.mjs index 50086eb809420..e6a24ae3624fb 100644 --- a/components/microsoft_outlook/actions/create-draft-email/create-draft-email.mjs +++ b/components/microsoft_outlook/actions/create-draft-email/create-draft-email.mjs @@ -1,10 +1,10 @@ -import microsoftOutlook from "../../microsoft_outlook.app.mjs"; import { parseObject } from "../../common/utils.mjs"; +import microsoftOutlook from "../../microsoft_outlook.app.mjs"; export default { type: "action", key: "microsoft_outlook-create-draft-email", - version: "0.0.15", + version: "0.0.16", name: "Create Draft Email", description: "Create a draft email, [See the documentation](https://docs.microsoft.com/en-us/graph/api/user-post-messages)", props: { diff --git a/components/microsoft_outlook/actions/download-attachment/download-attachment.mjs b/components/microsoft_outlook/actions/download-attachment/download-attachment.mjs index 5ec9482c8f222..69521d0e54a7e 100644 --- a/components/microsoft_outlook/actions/download-attachment/download-attachment.mjs +++ b/components/microsoft_outlook/actions/download-attachment/download-attachment.mjs @@ -1,12 +1,12 @@ -import microsoftOutlook from "../../microsoft_outlook.app.mjs"; import fs from "fs"; import mime from "mime-types"; +import microsoftOutlook from "../../microsoft_outlook.app.mjs"; export default { key: "microsoft_outlook-download-attachment", name: "Download Attachment", description: "Downloads an attachment to the /tmp directory. [See the documentation](https://learn.microsoft.com/en-us/graph/api/attachment-get?view=graph-rest-1.0&tabs=http)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { microsoftOutlook, diff --git a/components/microsoft_outlook/actions/find-contacts/find-contacts.mjs b/components/microsoft_outlook/actions/find-contacts/find-contacts.mjs index b6aed0590ed97..9a1dcf3b2c392 100644 --- a/components/microsoft_outlook/actions/find-contacts/find-contacts.mjs +++ b/components/microsoft_outlook/actions/find-contacts/find-contacts.mjs @@ -3,7 +3,7 @@ import microsoftOutlook from "../../microsoft_outlook.app.mjs"; export default { type: "action", key: "microsoft_outlook-find-contacts", - version: "0.0.15", + version: "0.0.16", name: "Find Contacts", description: "Finds contacts with the given search string. [See the documentation](https://docs.microsoft.com/en-us/graph/api/user-list-contacts)", props: { diff --git a/components/microsoft_outlook/actions/find-email/find-email.mjs b/components/microsoft_outlook/actions/find-email/find-email.mjs index 809fffec6f40b..aeea67144769f 100644 --- a/components/microsoft_outlook/actions/find-email/find-email.mjs +++ b/components/microsoft_outlook/actions/find-email/find-email.mjs @@ -4,7 +4,7 @@ export default { key: "microsoft_outlook-find-email", name: "Find Email", description: "Search for an email in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/user-list-messages)", - version: "0.0.9", + version: "0.0.10", type: "action", props: { microsoftOutlook, @@ -13,17 +13,23 @@ export default { alertType: "info", content: "When you specify `$filter`, the service infers a sort order for the results. If you use both `$orderby` and `$filter` to get messages, because the server always infers a sort order for the results of a `$filter`, you must [specify properties in certain ways](https://learn.microsoft.com/en-us/graph/api/user-list-messages#using-filter-and-orderby-in-the-same-query).", }, + search: { + propDefinition: [ + microsoftOutlook, + "search", + ], + }, filter: { - type: "string", - label: "Filter", - description: "Filters results. For example, `contains(subject, 'meet for lunch?')` will include messages whose subject contains ‘meet for lunch?’. [See documentation](https://learn.microsoft.com/en-us/graph/filter-query-parameter) for the full list of operations.", - optional: true, + propDefinition: [ + microsoftOutlook, + "filter", + ], }, orderBy: { - type: "string", - label: "Order By", - description: "Order results by a property. For example, `receivedDateTime desc` will order messages by the received date in descending order.", - optional: true, + propDefinition: [ + microsoftOutlook, + "orderBy", + ], }, maxResults: { propDefinition: [ @@ -38,6 +44,7 @@ export default { args: { $, params: { + "$search": this.search, "$filter": this.filter, "$orderby": this.orderBy, }, diff --git a/components/microsoft_outlook/actions/find-shared-folder-email/find-shared-folder-email.mjs b/components/microsoft_outlook/actions/find-shared-folder-email/find-shared-folder-email.mjs new file mode 100644 index 0000000000000..2c949c68127a4 --- /dev/null +++ b/components/microsoft_outlook/actions/find-shared-folder-email/find-shared-folder-email.mjs @@ -0,0 +1,82 @@ +import microsoftOutlook from "../../microsoft_outlook.app.mjs"; + +export default { + key: "microsoft_outlook-find-shared-folder-email", + name: "Find Shared Folder Email", + description: "Search for an email in a shared folder in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/user-list-messages)", + version: "0.0.1", + type: "action", + props: { + microsoftOutlook, + userId: { + propDefinition: [ + microsoftOutlook, + "userId", + ], + }, + sharedFolderId: { + propDefinition: [ + microsoftOutlook, + "sharedFolderId", + ({ userId }) => ({ + userId, + }), + ], + }, + info: { + type: "alert", + alertType: "info", + content: "When you specify `$filter`, the service infers a sort order for the results. If you use both `$orderby` and `$filter` to get messages, because the server always infers a sort order for the results of a `$filter`, you must [specify properties in certain ways](https://learn.microsoft.com/en-us/graph/api/user-list-messages#using-filter-and-orderby-in-the-same-query).", + }, + search: { + propDefinition: [ + microsoftOutlook, + "search", + ], + }, + filter: { + propDefinition: [ + microsoftOutlook, + "filter", + ], + }, + orderBy: { + propDefinition: [ + microsoftOutlook, + "orderBy", + ], + }, + maxResults: { + propDefinition: [ + microsoftOutlook, + "maxResults", + ], + }, + }, + async run({ $ }) { + const items = this.microsoftOutlook.paginate({ + fn: this.microsoftOutlook.listSharedFolderMessages, + args: { + $, + userId: this.userId, + sharedFolderId: this.sharedFolderId, + params: { + "$search": this.search, + "$filter": this.filter, + "$orderby": this.orderBy, + }, + }, + max: this.maxResults, + }); + + const emails = []; + for await (const item of items) { + emails.push(item); + } + + $.export("$summary", `Successfully retrieved ${emails.length} shared folder message${emails.length != 1 + ? "s" + : ""}.`); + return emails; + }, +}; diff --git a/components/microsoft_outlook/actions/list-contacts/list-contacts.mjs b/components/microsoft_outlook/actions/list-contacts/list-contacts.mjs index c4683f6899607..b3afca19c79af 100644 --- a/components/microsoft_outlook/actions/list-contacts/list-contacts.mjs +++ b/components/microsoft_outlook/actions/list-contacts/list-contacts.mjs @@ -3,7 +3,7 @@ import microsoftOutlook from "../../microsoft_outlook.app.mjs"; export default { type: "action", key: "microsoft_outlook-list-contacts", - version: "0.0.15", + version: "0.0.16", name: "List Contacts", description: "Get a contact collection from the default contacts folder, [See the documentation](https://docs.microsoft.com/en-us/graph/api/user-list-contacts)", props: { diff --git a/components/microsoft_outlook/actions/list-folders/list-folders.mjs b/components/microsoft_outlook/actions/list-folders/list-folders.mjs index e52b1ee21423b..20deaa00a752f 100644 --- a/components/microsoft_outlook/actions/list-folders/list-folders.mjs +++ b/components/microsoft_outlook/actions/list-folders/list-folders.mjs @@ -4,7 +4,7 @@ export default { key: "microsoft_outlook-list-folders", name: "List Folders", description: "Retrieves a list of all folders in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/user-list-mailfolders)", - version: "0.0.6", + version: "0.0.7", type: "action", props: { microsoftOutlook, diff --git a/components/microsoft_outlook/actions/list-labels/list-labels.mjs b/components/microsoft_outlook/actions/list-labels/list-labels.mjs index 7c8677d91caec..9810d07bb1e1c 100644 --- a/components/microsoft_outlook/actions/list-labels/list-labels.mjs +++ b/components/microsoft_outlook/actions/list-labels/list-labels.mjs @@ -4,7 +4,7 @@ export default { key: "microsoft_outlook-list-labels", name: "List Labels", description: "Get all the labels/categories that have been defined for a user. [See the documentation](https://learn.microsoft.com/en-us/graph/api/outlookuser-list-mastercategories)", - version: "0.0.8", + version: "0.0.9", type: "action", props: { microsoftOutlook, diff --git a/components/microsoft_outlook/actions/move-email-to-folder/move-email-to-folder.mjs b/components/microsoft_outlook/actions/move-email-to-folder/move-email-to-folder.mjs index f28d384d2da51..43d75cda78ff5 100644 --- a/components/microsoft_outlook/actions/move-email-to-folder/move-email-to-folder.mjs +++ b/components/microsoft_outlook/actions/move-email-to-folder/move-email-to-folder.mjs @@ -4,7 +4,7 @@ export default { key: "microsoft_outlook-move-email-to-folder", name: "Move Email to Folder", description: "Moves an email to the specified folder in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/message-move)", - version: "0.0.6", + version: "0.0.7", type: "action", props: { microsoftOutlook, diff --git a/components/microsoft_outlook/actions/remove-label-from-email/remove-label-from-email.mjs b/components/microsoft_outlook/actions/remove-label-from-email/remove-label-from-email.mjs index d7137db6af781..5cb184df4ba10 100644 --- a/components/microsoft_outlook/actions/remove-label-from-email/remove-label-from-email.mjs +++ b/components/microsoft_outlook/actions/remove-label-from-email/remove-label-from-email.mjs @@ -4,7 +4,7 @@ export default { key: "microsoft_outlook-remove-label-from-email", name: "Remove Label from Email", description: "Removes a label/category from an email in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/message-update)", - version: "0.0.8", + version: "0.0.9", type: "action", props: { microsoftOutlook, diff --git a/components/microsoft_outlook/actions/reply-to-email/reply-to-email.mjs b/components/microsoft_outlook/actions/reply-to-email/reply-to-email.mjs index 5a7c0ca0f62e8..e44b02e4e4ebf 100644 --- a/components/microsoft_outlook/actions/reply-to-email/reply-to-email.mjs +++ b/components/microsoft_outlook/actions/reply-to-email/reply-to-email.mjs @@ -4,7 +4,7 @@ export default { key: "microsoft_outlook-reply-to-email", name: "Reply to Email", description: "Reply to an email in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/message-reply)", - version: "0.0.5", + version: "0.0.6", type: "action", props: { microsoftOutlook, diff --git a/components/microsoft_outlook/actions/send-email/send-email.mjs b/components/microsoft_outlook/actions/send-email/send-email.mjs index b873c817176ce..46ce0a5f3e9fa 100644 --- a/components/microsoft_outlook/actions/send-email/send-email.mjs +++ b/components/microsoft_outlook/actions/send-email/send-email.mjs @@ -1,10 +1,10 @@ -import microsoftOutlook from "../../microsoft_outlook.app.mjs"; import { parseObject } from "../../common/utils.mjs"; +import microsoftOutlook from "../../microsoft_outlook.app.mjs"; export default { type: "action", key: "microsoft_outlook-send-email", - version: "0.0.16", + version: "0.0.17", name: "Send Email", description: "Send an email to one or multiple recipients, [See the docs](https://docs.microsoft.com/en-us/graph/api/user-sendmail)", props: { diff --git a/components/microsoft_outlook/actions/update-contact/update-contact.mjs b/components/microsoft_outlook/actions/update-contact/update-contact.mjs index 856cc55e92f2c..09967ffdba29e 100644 --- a/components/microsoft_outlook/actions/update-contact/update-contact.mjs +++ b/components/microsoft_outlook/actions/update-contact/update-contact.mjs @@ -3,9 +3,9 @@ import microsoftOutlook from "../../microsoft_outlook.app.mjs"; export default { type: "action", key: "microsoft_outlook-update-contact", - version: "0.0.15", + version: "0.0.16", name: "Update Contact", - description: "Add a contact to the root Contacts folder, [See the docs](https://docs.microsoft.com/en-us/graph/api/user-post-contacts)", + description: "Update an existing contact, [See the docs](https://docs.microsoft.com/en-us/graph/api/user-post-contacts)", props: { microsoftOutlook, contact: { diff --git a/components/microsoft_outlook/microsoft_outlook.app.mjs b/components/microsoft_outlook/microsoft_outlook.app.mjs index b2f6aea116f71..44dd6fb7f8815 100644 --- a/components/microsoft_outlook/microsoft_outlook.app.mjs +++ b/components/microsoft_outlook/microsoft_outlook.app.mjs @@ -191,6 +191,43 @@ export default { })) || []; }, }, + userId: { + type: "string", + label: "User ID", + description: "The ID of the user to get messages for", + async options() { + const { value: users } = await this.listUsers(); + return users?.map(({ + id: value, displayName, mail, + }) => ({ + value, + label: `${displayName} (${mail})`, + })) || []; + }, + }, + sharedFolderId: { + type: "string", + label: "Shared Folder ID", + description: "The ID of the shared folder to get messages for", + async options({ + userId, page, + }) { + const sharedFolders = await this.listSharedFolders({ + userId, + params: { + $top: DEFAULT_LIMIT, + $skip: DEFAULT_LIMIT * page, + }, + }); + + return sharedFolders?.map(({ + id: value, displayName, + }) => ({ + value, + label: displayName, + })) || []; + }, + }, maxResults: { type: "integer", label: "Max Results", @@ -198,6 +235,24 @@ export default { default: 100, optional: true, }, + search: { + type: "string", + label: "Search", + description: "Search for an email in Microsoft Outlook. Can search for specific message properties such as `to:example@example.com` or `subject:example`. If the property is excluded, the search targets the default propertes `from`, `subject`, and `body`. For example, `pizza` will search for messages with the word `pizza` in the subject, body, or from address, but `to:example@example.com` will only search for messages to `example@example.com`.", + optional: true, + }, + filter: { + type: "string", + label: "Filter", + description: "Filters results. For example, `contains(subject, 'meet for lunch?')` will include messages whose subject contains ‘meet for lunch?’. [See documentation](https://learn.microsoft.com/en-us/graph/filter-query-parameter) for the full list of operations.", + optional: true, + }, + orderBy: { + type: "string", + label: "Order By", + description: "Order results by a property. For example, `receivedDateTime desc` will order messages by the received date in descending order.", + optional: true, + }, }, methods: { _getUrl(path) { @@ -221,6 +276,7 @@ export default { headers: this._getHeaders(headers), ...otherConfig, }; + return axios($ ?? this, config); }, async createHook({ ...args } = {}) { @@ -396,6 +452,15 @@ export default { ...args, }); }, + async listSharedFolderMessages({ + userId, sharedFolderId, ...args + } = {}) { + return await this._makeRequest({ + method: "GET", + path: `/users/${userId}/mailFolders/${sharedFolderId}/messages`, + ...args, + }); + }, async getContact({ contactId, ...args @@ -452,6 +517,34 @@ export default { ...args, }); }, + listUsers(args = {}) { + return this._makeRequest({ + path: "/users", + ...args, + }); + }, + async listSharedFolders({ + userId, parentFolderId, ...args + } = {}) { + const { value } = await this._makeRequest({ + path: `/users/${userId}/mailFolders${parentFolderId + ? `/${parentFolderId}/childFolders` + : ""}`, + ...args, + }); + + const foldersArray = []; + for (const folder of value) { + foldersArray.push(folder); + foldersArray.push(...await this.listSharedFolders({ + userId, + parentFolderId: folder.id, + ...args, + })); + } + + return foldersArray; + }, async *paginate({ fn, args = {}, max, }) { diff --git a/components/microsoft_outlook/package.json b/components/microsoft_outlook/package.json index b07eafe4b3368..4401cd1c10019 100644 --- a/components/microsoft_outlook/package.json +++ b/components/microsoft_outlook/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/microsoft_outlook", - "version": "1.5.5", + "version": "1.6.0", "description": "Pipedream Microsoft Outlook Components", "main": "microsoft_outlook.app.mjs", "keywords": [ diff --git a/components/microsoft_outlook/sources/new-attachment-received/new-attachment-received.mjs b/components/microsoft_outlook/sources/new-attachment-received/new-attachment-received.mjs index 41744b4aab553..79c32119e6183 100644 --- a/components/microsoft_outlook/sources/new-attachment-received/new-attachment-received.mjs +++ b/components/microsoft_outlook/sources/new-attachment-received/new-attachment-received.mjs @@ -5,7 +5,7 @@ export default { key: "microsoft_outlook-new-attachment-received", name: "New Attachment Received (Instant)", description: "Emit new event when a new email containing one or more attachments arrives in a specified Microsoft Outlook folder.", - version: "0.0.4", + version: "0.0.5", type: "source", dedupe: "unique", methods: { diff --git a/components/microsoft_outlook/sources/new-contact/new-contact.mjs b/components/microsoft_outlook/sources/new-contact/new-contact.mjs index b7afe98fccafb..1f0a51c3f2991 100644 --- a/components/microsoft_outlook/sources/new-contact/new-contact.mjs +++ b/components/microsoft_outlook/sources/new-contact/new-contact.mjs @@ -5,7 +5,7 @@ export default { key: "microsoft_outlook-new-contact", name: "New Contact Event (Instant)", description: "Emit new event when a new Contact is created", - version: "0.0.16", + version: "0.0.17", type: "source", hooks: { ...common.hooks, diff --git a/components/microsoft_outlook/sources/new-email-in-shared-folder/new-email-in-shared-folder.mjs b/components/microsoft_outlook/sources/new-email-in-shared-folder/new-email-in-shared-folder.mjs new file mode 100644 index 0000000000000..097fbb229cc42 --- /dev/null +++ b/components/microsoft_outlook/sources/new-email-in-shared-folder/new-email-in-shared-folder.mjs @@ -0,0 +1,87 @@ +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import microsoftOutlook from "../../microsoft_outlook.app.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + key: "microsoft_outlook-new-email-in-shared-folder", + name: "New Email in Shared Folder Event", + description: "Emit new event when an email is received in specified shared folders.", + version: "0.0.1", + type: "source", + dedupe: "unique", + props: { + microsoftOutlook, + db: "$.service.db", + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + userId: { + propDefinition: [ + microsoftOutlook, + "userId", + ], + }, + sharedFolderId: { + propDefinition: [ + microsoftOutlook, + "sharedFolderId", + ({ userId }) => ({ + userId, + }), + ], + }, + }, + methods: { + _getLastDate() { + return this.db.get("lastDate") || "1970-01-01T00:00:00Z"; + }, + _setLastDate(lastDate) { + this.db.set("lastDate", lastDate); + }, + async startEvent(maxResults = 0) { + const lastDate = this._getLastDate(); + const items = this.microsoftOutlook.paginate({ + fn: this.microsoftOutlook.listSharedFolderMessages, + args: { + params: { + $orderBy: "createdDateTime desc", + $filter: `createdDateTime gt ${lastDate}`, + }, + sharedFolderId: this.sharedFolderId, + userId: this.userId, + }, + max: maxResults, + }); + + let responseArray = []; + + for await (const item of items) { + responseArray.push(item); + } + if (responseArray.length) this._setLastDate(responseArray[0].createdDateTime); + + for (const item of responseArray.reverse()) { + this.$emit( + item, + { + id: item.conversationId, + summary: `A new email with id: "${item.conversationId}" was received!`, + ts: item.createdDateTime, + }, + ); + } + }, + }, + hooks: { + async deploy() { + await this.startEvent(25); + }, + }, + async run() { + await this.startEvent(); + }, + sampleEmit, +}; diff --git a/components/microsoft_outlook/sources/new-email-in-shared-folder/test-event.mjs b/components/microsoft_outlook/sources/new-email-in-shared-folder/test-event.mjs new file mode 100644 index 0000000000000..b4ef95f1dc92b --- /dev/null +++ b/components/microsoft_outlook/sources/new-email-in-shared-folder/test-event.mjs @@ -0,0 +1,55 @@ +export default { + "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('hungvturing%40outlook.com')/messages/$entity", + "@odata.etag": "W/\"CQAAABYAAjSvdS5Q4eKWQh5kr77AAA1qCBu\"", + "id": "AQMkADAwATMwAi0wMAoARgAAA5s75F287T1HnVlwotePjeEHAAaU2NK91LlDh4pZCHmSvvsAAAIBDAAAAAaU2NK91LlDh4pZCHmSvvsAAAA1qWTHAAAA", + "createdDateTime": "2023-07-03T09:32:32Z", + "lastModifiedDateTime": "2023-07-03T09:32:33Z", + "changeKey": "CQAAABYAvdS5Q4eKWQh5kr77AAA1qCBu", + "categories": [], + "receivedDateTime": "2023-07-03T09:32:33Z", + "sentDateTime": "2023-07-03T09:32:17Z", + "hasAttachments": false, + "internetMessageId": "", + "subject": "Hi hello", + "bodyPreview": "Hi hello how are you?", + "importance": "normal", + "parentFolderId": "AQMkADAwATMwM0YjM3LTAwAi0wMAoALgAAA5s75F287T1HnVlwotePjeEBAAaU2NK91LlDh4pZCHmSvvsAAAIBDAAAAA==", + "conversationId": "AQQkADAwATMwM0YjM3LTAwAi0wMAoAEAA_cUTd_wdjS71eaRr3Nrqc", + "conversationIndex": "AQHZrZFLY0u9Xmka9za6nA==", + "isDeliveryReceiptRequested": null, + "isReadReceiptRequested": false, + "isRead": false, + "isDraft": false, + "webLink": "https://outlook.live.com/owa/?ItemID=AQMkADAwATMwYjM3LTAwAi0wMAoARgAAA5s75F287T1HnVlwotePjeEHAAaU2NK91LlDh4pZCHmSvvsAAAIBDAAAAAaU2NK91LlDh4pZCHmSvvsAAAA1qWTHAAAA&exvsurl=1&viewmodel=ReadMessageItem", + "inferenceClassification": "focused", + "body": { + "contentType": "html", + "content": "\r\n
Hi hello how are you?
" + }, + "sender": { + "emailAddress": { + "name": "John Doe", + "address": "john@doe.com" + } + }, + "from": { + "emailAddress": { + "name": "John Doe", + "address": "john@doe.com" + } + }, + "toRecipients": [ + { + "emailAddress": { + "name": "johndoe@outlook.com", + "address": "johndoe@outlook.com" + } + } + ], + "ccRecipients": [], + "bccRecipients": [], + "replyTo": [], + "flag": { + "flagStatus": "notFlagged" + } + } \ No newline at end of file diff --git a/components/microsoft_outlook/sources/new-email/new-email.mjs b/components/microsoft_outlook/sources/new-email/new-email.mjs index 186d9cf7ab868..957f1fb49d3ef 100644 --- a/components/microsoft_outlook/sources/new-email/new-email.mjs +++ b/components/microsoft_outlook/sources/new-email/new-email.mjs @@ -1,5 +1,5 @@ -import common from "../common/common-new-email.mjs"; import md5 from "md5"; +import common from "../common/common-new-email.mjs"; import sampleEmit from "./test-event.mjs"; export default { @@ -7,7 +7,7 @@ export default { key: "microsoft_outlook-new-email", name: "New Email Event (Instant)", description: "Emit new event when an email is received in specified folders.", - version: "0.1.0", + version: "0.1.1", type: "source", dedupe: "unique", methods: {