Skip to content

Commit 79b4fdf

Browse files
authored
Merging pull request #18295
* Enhance Microsoft Outlook component with new features and updates - Added userId and sharedFolderId props for retrieving messages from shared folders. - Introduced search, filter, and orderBy props for more refined email searches. - Implemented listUsers and listSharedFolders methods for user and folder management. - Added new action to find emails in shared folders. - Updated existing actions and sources with version bumps and minor fixes. - Bumped component version to 1.6.0. * pnpm update * Update Microsoft Outlook components with version bumps for find-email, new-attachment-received, and new-email sources * Bump version of new-email source to 0.1.1 for Microsoft Outlook component * Update find-email action to include search parameter and modify update-contact description for clarity
1 parent ef68123 commit 79b4fdf

File tree

24 files changed

+358
-34
lines changed

24 files changed

+358
-34
lines changed

components/devin/devin.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export default {
88
console.log(Object.keys(this.$auth));
99
},
1010
},
11-
};
11+
};

components/microsoft_outlook/actions/add-label-to-email/add-label-to-email.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import microsoftOutlook from "../../microsoft_outlook.app.mjs";
21
import { ConfigurationError } from "@pipedream/platform";
2+
import microsoftOutlook from "../../microsoft_outlook.app.mjs";
33

44
export default {
55
key: "microsoft_outlook-add-label-to-email",
66
name: "Add Label to Email",
77
description: "Adds a label/category to an email in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/message-update)",
8-
version: "0.0.8",
8+
version: "0.0.9",
99
type: "action",
1010
props: {
1111
microsoftOutlook,

components/microsoft_outlook/actions/approve-workflow/approve-workflow.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "microsoft_outlook-approve-workflow",
55
name: "Approve Workflow",
66
description: "Suspend the workflow until approved by email. [See the documentation](https://pipedream.com/docs/code/nodejs/rerun#flowsuspend)",
7-
version: "0.0.6",
7+
version: "0.0.7",
88
type: "action",
99
props: {
1010
microsoftOutlook,

components/microsoft_outlook/actions/create-contact/create-contact.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import microsoftOutlook from "../../microsoft_outlook.app.mjs";
33
export default {
44
type: "action",
55
key: "microsoft_outlook-create-contact",
6-
version: "0.0.15",
6+
version: "0.0.16",
77
name: "Create Contact",
88
description: "Add a contact to the root Contacts folder, [See the documentation](https://docs.microsoft.com/en-us/graph/api/user-post-contacts)",
99
props: {

components/microsoft_outlook/actions/create-draft-email/create-draft-email.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import microsoftOutlook from "../../microsoft_outlook.app.mjs";
21
import { parseObject } from "../../common/utils.mjs";
2+
import microsoftOutlook from "../../microsoft_outlook.app.mjs";
33

44
export default {
55
type: "action",
66
key: "microsoft_outlook-create-draft-email",
7-
version: "0.0.15",
7+
version: "0.0.16",
88
name: "Create Draft Email",
99
description: "Create a draft email, [See the documentation](https://docs.microsoft.com/en-us/graph/api/user-post-messages)",
1010
props: {

components/microsoft_outlook/actions/download-attachment/download-attachment.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import microsoftOutlook from "../../microsoft_outlook.app.mjs";
21
import fs from "fs";
32
import mime from "mime-types";
3+
import microsoftOutlook from "../../microsoft_outlook.app.mjs";
44

55
export default {
66
key: "microsoft_outlook-download-attachment",
77
name: "Download Attachment",
88
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)",
9-
version: "0.0.3",
9+
version: "0.0.4",
1010
type: "action",
1111
props: {
1212
microsoftOutlook,

components/microsoft_outlook/actions/find-contacts/find-contacts.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import microsoftOutlook from "../../microsoft_outlook.app.mjs";
33
export default {
44
type: "action",
55
key: "microsoft_outlook-find-contacts",
6-
version: "0.0.15",
6+
version: "0.0.16",
77
name: "Find Contacts",
88
description: "Finds contacts with the given search string. [See the documentation](https://docs.microsoft.com/en-us/graph/api/user-list-contacts)",
99
props: {

components/microsoft_outlook/actions/find-email/find-email.mjs

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "microsoft_outlook-find-email",
55
name: "Find Email",
66
description: "Search for an email in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/user-list-messages)",
7-
version: "0.0.9",
7+
version: "0.0.10",
88
type: "action",
99
props: {
1010
microsoftOutlook,
@@ -13,17 +13,23 @@ export default {
1313
alertType: "info",
1414
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).",
1515
},
16+
search: {
17+
propDefinition: [
18+
microsoftOutlook,
19+
"search",
20+
],
21+
},
1622
filter: {
17-
type: "string",
18-
label: "Filter",
19-
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.",
20-
optional: true,
23+
propDefinition: [
24+
microsoftOutlook,
25+
"filter",
26+
],
2127
},
2228
orderBy: {
23-
type: "string",
24-
label: "Order By",
25-
description: "Order results by a property. For example, `receivedDateTime desc` will order messages by the received date in descending order.",
26-
optional: true,
29+
propDefinition: [
30+
microsoftOutlook,
31+
"orderBy",
32+
],
2733
},
2834
maxResults: {
2935
propDefinition: [
@@ -38,6 +44,7 @@ export default {
3844
args: {
3945
$,
4046
params: {
47+
"$search": this.search,
4148
"$filter": this.filter,
4249
"$orderby": this.orderBy,
4350
},
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import microsoftOutlook from "../../microsoft_outlook.app.mjs";
2+
3+
export default {
4+
key: "microsoft_outlook-find-shared-folder-email",
5+
name: "Find Shared Folder Email",
6+
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)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
microsoftOutlook,
11+
userId: {
12+
propDefinition: [
13+
microsoftOutlook,
14+
"userId",
15+
],
16+
},
17+
sharedFolderId: {
18+
propDefinition: [
19+
microsoftOutlook,
20+
"sharedFolderId",
21+
({ userId }) => ({
22+
userId,
23+
}),
24+
],
25+
},
26+
info: {
27+
type: "alert",
28+
alertType: "info",
29+
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).",
30+
},
31+
search: {
32+
propDefinition: [
33+
microsoftOutlook,
34+
"search",
35+
],
36+
},
37+
filter: {
38+
propDefinition: [
39+
microsoftOutlook,
40+
"filter",
41+
],
42+
},
43+
orderBy: {
44+
propDefinition: [
45+
microsoftOutlook,
46+
"orderBy",
47+
],
48+
},
49+
maxResults: {
50+
propDefinition: [
51+
microsoftOutlook,
52+
"maxResults",
53+
],
54+
},
55+
},
56+
async run({ $ }) {
57+
const items = this.microsoftOutlook.paginate({
58+
fn: this.microsoftOutlook.listSharedFolderMessages,
59+
args: {
60+
$,
61+
userId: this.userId,
62+
sharedFolderId: this.sharedFolderId,
63+
params: {
64+
"$search": this.search,
65+
"$filter": this.filter,
66+
"$orderby": this.orderBy,
67+
},
68+
},
69+
max: this.maxResults,
70+
});
71+
72+
const emails = [];
73+
for await (const item of items) {
74+
emails.push(item);
75+
}
76+
77+
$.export("$summary", `Successfully retrieved ${emails.length} shared folder message${emails.length != 1
78+
? "s"
79+
: ""}.`);
80+
return emails;
81+
},
82+
};

components/microsoft_outlook/actions/list-contacts/list-contacts.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import microsoftOutlook from "../../microsoft_outlook.app.mjs";
33
export default {
44
type: "action",
55
key: "microsoft_outlook-list-contacts",
6-
version: "0.0.15",
6+
version: "0.0.16",
77
name: "List Contacts",
88
description: "Get a contact collection from the default contacts folder, [See the documentation](https://docs.microsoft.com/en-us/graph/api/user-list-contacts)",
99
props: {

0 commit comments

Comments
 (0)