-
Notifications
You must be signed in to change notification settings - Fork 732
/
Copy pathexamples.tsx
144 lines (143 loc) · 3.83 KB
/
examples.tsx
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
import type { CreateRuleBody } from "@/utils/actions/rule.validation";
import { ActionType } from "@/generated/prisma";
import { ConditionType } from "@/utils/config";
import {
ForwardIcon,
ShieldAlertIcon,
MailQuestionIcon,
NewspaperIcon,
CalendarIcon,
PresentationIcon,
} from "lucide-react";
export const examples: {
title: string;
description: string;
icon: React.ReactNode;
rule: CreateRuleBody;
automate?: boolean;
runOnThreads?: boolean;
}[] = [
{
title: "Forward receipts",
description: "Forward receipts to alice@accountant.com.",
icon: <ForwardIcon className="h-4 w-4" />,
rule: {
name: "Forward receipts",
conditions: [
{
type: ConditionType.AI,
instructions: "Forward receipts to alice@accountant.com.",
},
],
actions: [
{ type: ActionType.FORWARD, to: { value: "alice@accountant.com" } },
],
},
},
{
title: "Archive and label newsletters",
description: "Archive newsletters and label them as 'Newsletter'.",
icon: <NewspaperIcon className="h-4 w-4" />,
rule: {
name: "Archive and label newsletters",
conditions: [
{
type: ConditionType.AI,
instructions: "Archive newsletters and label them as 'Newsletter'.",
},
],
actions: [
{ type: ActionType.ARCHIVE },
{ type: ActionType.LABEL, label: { value: "Newsletter" } },
],
},
},
{
title: "Label high priority emails",
description: `Label high priority emails as "High Priority"`,
icon: <ShieldAlertIcon className="h-4 w-4" />,
rule: {
name: "Label high priority emails",
conditions: [
{
type: ConditionType.AI,
instructions: `Mark high priority emails as "High Priority". Examples include:
* Customer wants to cancel their plan
* Customer wants to purchase
* Customer complaint`,
},
],
actions: [{ type: ActionType.LABEL, label: { value: "High Priority" } }],
},
},
{
title: "Respond to common question",
description:
"If someone asks how much the premium plan is, respond: 'Our premium plan is $10 per month.'",
icon: <MailQuestionIcon className="h-4 w-4" />,
rule: {
name: "Respond to question",
conditions: [
{
type: ConditionType.AI,
instructions:
"If someone asks how much the premium plan is, respond: 'Our premium plan is $10 per month.'",
},
],
actions: [
{
type: ActionType.REPLY,
content: { value: "Hey, our premium plan is $10 per month!" },
},
],
},
},
{
title: "Draft a response to set a meeting",
description: "Select this rule when someone asks to book a meeting.",
icon: <CalendarIcon className="h-4 w-4" />,
rule: {
name: "Draft meeting response",
conditions: [
{
type: ConditionType.AI,
instructions: "Select this rule when someone asks to book a meeting.",
},
],
actions: [
{
type: ActionType.DRAFT_EMAIL,
content: {
value:
"Draft a response with my calendar booking link: https://cal.com/me/call",
ai: true,
},
},
],
automate: true,
runOnThreads: true,
},
},
{
title: "Label founder pitch decks",
description: "Label founder pitch decks as 'Pitch'.",
icon: <PresentationIcon className="h-4 w-4" />,
rule: {
name: "Label founder pitch decks",
conditions: [
{
type: ConditionType.AI,
instructions: "Label founder pitch decks as 'Pitch'.",
},
],
actions: [
{
type: ActionType.LABEL,
content: { value: "Pitch" },
},
],
automate: true,
runOnThreads: true,
},
},
];