Skip to content

Commit 65bbadd

Browse files
authored
Microsoft Outlook: Repy to Message action (#16067)
* reply-to-email action * pnpm-lock.yaml
1 parent 12a7e8c commit 65bbadd

File tree

19 files changed

+111
-21
lines changed

19 files changed

+111
-21
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ 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.3",
8+
version: "0.0.4",
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.1",
7+
version: "0.0.2",
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.10",
6+
version: "0.0.11",
77
name: "Create Contact",
88
description: "Add a contact to the root Contacts folder, [See the docs](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: 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-draft-email",
6-
version: "0.0.10",
6+
version: "0.0.11",
77
name: "Create Draft Email",
88
description: "Create a draft email, [See the docs](https://docs.microsoft.com/en-us/graph/api/user-post-messages)",
99
props: {

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.10",
6+
version: "0.0.11",
77
name: "Find Contacts",
88
description: "Finds contacts with given search string",
99
props: {

components/microsoft_outlook/actions/find-email/find-email.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-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.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
microsoftOutlook,

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.10",
6+
version: "0.0.11",
77
name: "List Contacts",
88
description: "Get a contact collection from the default contacts folder, [See the docs](https://docs.microsoft.com/en-us/graph/api/user-list-contacts)",
99
props: {

components/microsoft_outlook/actions/list-folders/list-folders.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-list-folders",
55
name: "List Folders",
66
description: "Retrieves a list of all folders in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/user-list-mailfolders)",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
microsoftOutlook,

components/microsoft_outlook/actions/list-labels/list-labels.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-list-labels",
55
name: "List Labels",
66
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)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
type: "action",
99
props: {
1010
microsoftOutlook,

components/microsoft_outlook/actions/move-email-to-folder/move-email-to-folder.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-move-email-to-folder",
55
name: "Move Email to Folder",
66
description: "Moves an email to the specified folder in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/message-move)",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
microsoftOutlook,

components/microsoft_outlook/actions/remove-label-from-email/remove-label-from-email.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-remove-label-from-email",
55
name: "Remove Label from Email",
66
description: "Removes a label/category from an email in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/message-update)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
type: "action",
99
props: {
1010
microsoftOutlook,
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
import microsoftOutlook from "../../microsoft_outlook.app.mjs";
2+
3+
export default {
4+
key: "microsoft_outlook-reply-to-email",
5+
name: "Reply to Email",
6+
description: "Reply to an email in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/message-reply)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
microsoftOutlook,
11+
messageId: {
12+
propDefinition: [
13+
microsoftOutlook,
14+
"messageId",
15+
],
16+
description: "The identifier of the message to reply to",
17+
},
18+
recipients: {
19+
propDefinition: [
20+
microsoftOutlook,
21+
"recipients",
22+
],
23+
},
24+
ccRecipients: {
25+
propDefinition: [
26+
microsoftOutlook,
27+
"ccRecipients",
28+
],
29+
},
30+
bccRecipients: {
31+
propDefinition: [
32+
microsoftOutlook,
33+
"bccRecipients",
34+
],
35+
},
36+
subject: {
37+
propDefinition: [
38+
microsoftOutlook,
39+
"subject",
40+
],
41+
},
42+
comment: {
43+
propDefinition: [
44+
microsoftOutlook,
45+
"content",
46+
],
47+
description: "Content of the reply in text format",
48+
},
49+
files: {
50+
propDefinition: [
51+
microsoftOutlook,
52+
"files",
53+
],
54+
},
55+
expand: {
56+
propDefinition: [
57+
microsoftOutlook,
58+
"expand",
59+
],
60+
description: "Additional email details, [See object definition](https://docs.microsoft.com/en-us/graph/api/resources/message)",
61+
},
62+
},
63+
async run({ $ }) {
64+
await this.microsoftOutlook.replyToEmail({
65+
$,
66+
messageId: this.messageId,
67+
data: {
68+
comment: this.comment,
69+
message: {
70+
...this.microsoftOutlook.prepareMessageBody(this),
71+
...this.expand,
72+
},
73+
},
74+
});
75+
$.export("$summary", "Email has been replied to.");
76+
},
77+
};

components/microsoft_outlook/actions/send-email/send-email.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-send-email",
6-
version: "0.0.11",
6+
version: "0.0.12",
77
name: "Send Email",
88
description: "Send an email to one or multiple recipients, [See the docs](https://docs.microsoft.com/en-us/graph/api/user-sendmail)",
99
props: {

components/microsoft_outlook/actions/update-contact/update-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-update-contact",
6-
version: "0.0.10",
6+
version: "0.0.11",
77
name: "Update Contact",
88
description: "Add a contact to the root Contacts folder, [See the docs](https://docs.microsoft.com/en-us/graph/api/user-post-contacts)",
99
props: {

components/microsoft_outlook/microsoft_outlook.app.mjs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,14 +255,16 @@ export default {
255255
}
256256
const message = {
257257
subject: self.subject,
258-
body: {
259-
content: self.content,
260-
contentType: self.contentType,
261-
},
262-
toRecipients,
263258
attachments,
264259
};
265260

261+
if (self.content) {
262+
message.body = {
263+
content: self.content,
264+
contentType: self.contentType,
265+
};
266+
}
267+
if (toRecipients.length > 0) message.toRecipients = toRecipients;
266268
if (ccRecipients.length > 0) message.ccRecipients = ccRecipients;
267269
if (bccRecipients.length > 0) message.bccRecipients = bccRecipients;
268270

@@ -275,6 +277,15 @@ export default {
275277
...args,
276278
});
277279
},
280+
async replyToEmail({
281+
messageId, ...args
282+
}) {
283+
return await this._makeRequest({
284+
method: "POST",
285+
path: `/me/messages/${messageId}/reply`,
286+
...args,
287+
});
288+
},
278289
async createDraft({ ...args } = {}) {
279290
return await this._makeRequest({
280291
method: "POST",

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.3.0",
3+
"version": "1.4.0",
44
"description": "Pipedream Microsoft Outlook Components",
55
"main": "microsoft_outlook.app.mjs",
66
"keywords": [

components/microsoft_outlook/sources/new-contact/new-contact.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "microsoft_outlook-new-contact",
66
name: "New Contact Event (Instant)",
77
description: "Emit new event when a new Contact is created",
8-
version: "0.0.11",
8+
version: "0.0.12",
99
type: "source",
1010
hooks: {
1111
...common.hooks,

components/microsoft_outlook/sources/new-email/new-email.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
key: "microsoft_outlook-new-email",
88
name: "New Email Event (Instant)",
99
description: "Emit new event when an email is received in specified folders.",
10-
version: "0.0.14",
10+
version: "0.0.15",
1111
type: "source",
1212
dedupe: "unique",
1313
props: {

pnpm-lock.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)