-
Notifications
You must be signed in to change notification settings - Fork 5.3k
/
Copy pathreply-to-email.mjs
77 lines (76 loc) · 1.76 KB
/
reply-to-email.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import microsoftOutlook from "../../microsoft_outlook.app.mjs";
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.3",
type: "action",
props: {
microsoftOutlook,
messageId: {
propDefinition: [
microsoftOutlook,
"messageId",
],
description: "The identifier of the message to reply to",
},
recipients: {
propDefinition: [
microsoftOutlook,
"recipients",
],
},
ccRecipients: {
propDefinition: [
microsoftOutlook,
"ccRecipients",
],
},
bccRecipients: {
propDefinition: [
microsoftOutlook,
"bccRecipients",
],
},
subject: {
propDefinition: [
microsoftOutlook,
"subject",
],
},
comment: {
propDefinition: [
microsoftOutlook,
"content",
],
description: "Content of the reply in text format",
},
files: {
propDefinition: [
microsoftOutlook,
"files",
],
},
expand: {
propDefinition: [
microsoftOutlook,
"expand",
],
description: "Additional email details, [See object definition](https://docs.microsoft.com/en-us/graph/api/resources/message)",
},
},
async run({ $ }) {
await this.microsoftOutlook.replyToEmail({
$,
messageId: this.messageId,
data: {
comment: this.comment,
message: {
...this.microsoftOutlook.prepareMessageBody(this),
...this.expand,
},
},
});
$.export("$summary", "Email has been replied to.");
},
};