You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Create a new draft as a reply to the last message in the conversation. [See the documentation](https://dev.frontapp.com/reference/create-draft-reply)",
8
+
version: "0.0.1",
9
+
type: "action",
10
+
props: {
11
+
frontApp,
12
+
conversationId: {
13
+
propDefinition: [
14
+
frontApp,
15
+
"conversationId",
16
+
],
17
+
},
18
+
channelId: {
19
+
propDefinition: [
20
+
frontApp,
21
+
"channelId",
22
+
],
23
+
},
24
+
body: {
25
+
type: "string",
26
+
label: "Body",
27
+
description: "Body of the draft reply. Accepts HTML",
description: "Create a draft message which is the first message of a new conversation. [See the documentation](https://dev.frontapp.com/reference/create-draft)",
8
+
version: "0.0.1",
9
+
type: "action",
10
+
props: {
11
+
frontApp,
12
+
channelId: {
13
+
propDefinition: [
14
+
frontApp,
15
+
"channelId",
16
+
],
17
+
},
18
+
body: {
19
+
type: "string",
20
+
label: "Body",
21
+
description: "Body of the draft message. Accepts HTML",
22
+
},
23
+
subject: {
24
+
type: "string",
25
+
label: "Subject",
26
+
description: "Subject of the draft",
27
+
optional: true,
28
+
},
29
+
authorId: {
30
+
propDefinition: [
31
+
frontApp,
32
+
"teammateId",
33
+
],
34
+
label: "Author ID",
35
+
optional: true,
36
+
},
37
+
to: {
38
+
propDefinition: [
39
+
frontApp,
40
+
"to",
41
+
],
42
+
optional: true,
43
+
},
44
+
cc: {
45
+
propDefinition: [
46
+
frontApp,
47
+
"cc",
48
+
],
49
+
},
50
+
bcc: {
51
+
propDefinition: [
52
+
frontApp,
53
+
"bcc",
54
+
],
55
+
},
56
+
attachments: {
57
+
propDefinition: [
58
+
frontApp,
59
+
"attachments",
60
+
],
61
+
},
62
+
},
63
+
asyncrun({ $ }){
64
+
constresponse=awaitthis.frontApp.createDraft({
65
+
$,
66
+
channelId: this.channelId,
67
+
data: {
68
+
body: this.body,
69
+
author_id: this.authorId,
70
+
to: this.to,
71
+
cc: this.cc,
72
+
bcc: this.bcc,
73
+
attachments: this.attachments,
74
+
},
75
+
headers: utils.hasArrayItems(this.attachments)&&{
76
+
"Content-Type": "multipart/form-data",
77
+
},
78
+
});
79
+
$.export("$summary",`Successfully created draft with ID: ${response.id}`);
0 commit comments