n8n-nodes-richpanel 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -6,6 +6,10 @@ This is an n8n community node that provides integration with the [Richpanel](htt
|
|
|
6
6
|
|
|
7
7
|
[Richpanel](https://www.richpanel.com/) is a customer service platform for e-commerce businesses that combines live chat, helpdesk, and self-service capabilities.
|
|
8
8
|
|
|
9
|
+
## ✨ NEW: AI Agent Support
|
|
10
|
+
|
|
11
|
+
This package includes **AI Agent tool support**! Enable AI assistants (OpenAI, Claude, etc.) to automatically perform Richpanel actions. [Read the AI Agent Guide](AI_AGENT_GUIDE.md) to get started.
|
|
12
|
+
|
|
9
13
|
## Table of Contents
|
|
10
14
|
|
|
11
15
|
- [Installation](#installation)
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RichpanelTool = void 0;
|
|
4
|
+
class RichpanelTool {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.description = {
|
|
7
|
+
displayName: 'Richpanel Tool',
|
|
8
|
+
name: 'richpanelTool',
|
|
9
|
+
icon: 'file:richpanel-logo.png',
|
|
10
|
+
group: ['transform'],
|
|
11
|
+
version: 1,
|
|
12
|
+
description: 'Use Richpanel with AI Agents - enable AI to manage support conversations, customers, and orders',
|
|
13
|
+
defaults: {
|
|
14
|
+
name: 'Richpanel Tool',
|
|
15
|
+
},
|
|
16
|
+
codex: {
|
|
17
|
+
categories: ['AI'],
|
|
18
|
+
subcategories: {
|
|
19
|
+
AI: ['Tools'],
|
|
20
|
+
},
|
|
21
|
+
resources: {
|
|
22
|
+
primaryDocumentation: [
|
|
23
|
+
{
|
|
24
|
+
url: 'https://developer.richpanel.com/reference/getting-started-with-your-api',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
inputs: [],
|
|
30
|
+
outputs: ['ai_tool'],
|
|
31
|
+
outputNames: ['Tool'],
|
|
32
|
+
credentials: [
|
|
33
|
+
{
|
|
34
|
+
name: 'richpanelApi',
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
requestDefaults: {
|
|
39
|
+
baseURL: 'https://api.richpanel.com/v1',
|
|
40
|
+
headers: {
|
|
41
|
+
Accept: 'application/json',
|
|
42
|
+
'Content-Type': 'application/json',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
properties: [
|
|
46
|
+
{
|
|
47
|
+
displayName: 'Connect this node to an AI Agent to give it access to Richpanel operations. The AI can create tickets, look up customers, check orders, and more.',
|
|
48
|
+
name: 'notice',
|
|
49
|
+
type: 'notice',
|
|
50
|
+
default: '',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
displayName: 'Available Operations',
|
|
54
|
+
name: 'operations',
|
|
55
|
+
type: 'multiOptions',
|
|
56
|
+
description: 'Select which Richpanel operations the AI agent can perform',
|
|
57
|
+
default: ['getConversation', 'createConversation', 'getCustomer', 'getOrder'],
|
|
58
|
+
options: [
|
|
59
|
+
{
|
|
60
|
+
name: 'Create Conversation',
|
|
61
|
+
value: 'createConversation',
|
|
62
|
+
description: 'Let AI create new support tickets',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'Get Conversation',
|
|
66
|
+
value: 'getConversation',
|
|
67
|
+
description: 'Let AI retrieve conversation details',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'Update Conversation',
|
|
71
|
+
value: 'updateConversation',
|
|
72
|
+
description: 'Let AI update conversation status or priority',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'Get Customer',
|
|
76
|
+
value: 'getCustomer',
|
|
77
|
+
description: 'Let AI look up customer information',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'Create/Update Customer',
|
|
81
|
+
value: 'upsertCustomer',
|
|
82
|
+
description: 'Let AI create or update customer records',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'Get Order',
|
|
86
|
+
value: 'getOrder',
|
|
87
|
+
description: 'Let AI retrieve order information',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'Add Tags',
|
|
91
|
+
value: 'addTags',
|
|
92
|
+
description: 'Let AI add tags to conversations',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'List Users',
|
|
96
|
+
value: 'listUsers',
|
|
97
|
+
description: 'Let AI see available support agents',
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
async supplyData() {
|
|
105
|
+
const operations = this.getNodeParameter('operations', 0, []);
|
|
106
|
+
const toolDefinitions = [];
|
|
107
|
+
// Create Conversation Tool
|
|
108
|
+
if (operations.includes('createConversation')) {
|
|
109
|
+
toolDefinitions.push({
|
|
110
|
+
name: 'richpanel_create_conversation',
|
|
111
|
+
description: 'Create a new support conversation/ticket in Richpanel. Use this when a customer needs help, reports an issue, or has a question that needs tracking.',
|
|
112
|
+
schema: {
|
|
113
|
+
type: 'object',
|
|
114
|
+
properties: {
|
|
115
|
+
messageBody: {
|
|
116
|
+
type: 'string',
|
|
117
|
+
description: 'The customer message content or issue description',
|
|
118
|
+
},
|
|
119
|
+
customerEmail: {
|
|
120
|
+
type: 'string',
|
|
121
|
+
description: 'Customer email address',
|
|
122
|
+
},
|
|
123
|
+
subject: {
|
|
124
|
+
type: 'string',
|
|
125
|
+
description: 'Subject line for the conversation/ticket',
|
|
126
|
+
},
|
|
127
|
+
priority: {
|
|
128
|
+
type: 'string',
|
|
129
|
+
enum: ['HIGH', 'LOW'],
|
|
130
|
+
description: 'Priority level (HIGH for urgent issues, LOW for general questions)',
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
required: ['messageBody', 'customerEmail'],
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
// Get Conversation Tool
|
|
138
|
+
if (operations.includes('getConversation')) {
|
|
139
|
+
toolDefinitions.push({
|
|
140
|
+
name: 'richpanel_get_conversation',
|
|
141
|
+
description: 'Retrieve details about an existing conversation/ticket by ID. Use this to check ticket status, see assigned agent, read conversation history, or verify if an issue is resolved.',
|
|
142
|
+
schema: {
|
|
143
|
+
type: 'object',
|
|
144
|
+
properties: {
|
|
145
|
+
conversationId: {
|
|
146
|
+
type: 'string',
|
|
147
|
+
description: 'The unique ID of the conversation/ticket',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
required: ['conversationId'],
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
// Update Conversation Tool
|
|
155
|
+
if (operations.includes('updateConversation')) {
|
|
156
|
+
toolDefinitions.push({
|
|
157
|
+
name: 'richpanel_update_conversation',
|
|
158
|
+
description: 'Update conversation properties like status or priority. Use this to close resolved tickets, change priority levels, or update conversation state.',
|
|
159
|
+
schema: {
|
|
160
|
+
type: 'object',
|
|
161
|
+
properties: {
|
|
162
|
+
conversationId: {
|
|
163
|
+
type: 'string',
|
|
164
|
+
description: 'The unique ID of the conversation to update',
|
|
165
|
+
},
|
|
166
|
+
status: {
|
|
167
|
+
type: 'string',
|
|
168
|
+
enum: ['OPEN', 'CLOSED'],
|
|
169
|
+
description: 'New status (CLOSED when issue is resolved, OPEN otherwise)',
|
|
170
|
+
},
|
|
171
|
+
priority: {
|
|
172
|
+
type: 'string',
|
|
173
|
+
enum: ['HIGH', 'LOW'],
|
|
174
|
+
description: 'New priority level',
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
required: ['conversationId'],
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
// Get Customer Tool
|
|
182
|
+
if (operations.includes('getCustomer')) {
|
|
183
|
+
toolDefinitions.push({
|
|
184
|
+
name: 'richpanel_get_customer',
|
|
185
|
+
description: 'Retrieve customer information by email or phone number. Use this to look up customer details, see order history, check customer status, or verify customer information.',
|
|
186
|
+
schema: {
|
|
187
|
+
type: 'object',
|
|
188
|
+
properties: {
|
|
189
|
+
identifier: {
|
|
190
|
+
type: 'string',
|
|
191
|
+
description: 'Customer email address or phone number',
|
|
192
|
+
},
|
|
193
|
+
type: {
|
|
194
|
+
type: 'string',
|
|
195
|
+
enum: ['email', 'phone'],
|
|
196
|
+
description: 'Type of identifier (email or phone)',
|
|
197
|
+
default: 'email',
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
required: ['identifier'],
|
|
201
|
+
},
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
// Create/Update Customer Tool
|
|
205
|
+
if (operations.includes('upsertCustomer')) {
|
|
206
|
+
toolDefinitions.push({
|
|
207
|
+
name: 'richpanel_create_update_customer',
|
|
208
|
+
description: 'Create a new customer or update existing customer information. Use this when a customer provides updated details or to add a new customer to the system.',
|
|
209
|
+
schema: {
|
|
210
|
+
type: 'object',
|
|
211
|
+
properties: {
|
|
212
|
+
email: {
|
|
213
|
+
type: 'string',
|
|
214
|
+
description: 'Customer email address (required)',
|
|
215
|
+
},
|
|
216
|
+
firstName: {
|
|
217
|
+
type: 'string',
|
|
218
|
+
description: 'Customer first name',
|
|
219
|
+
},
|
|
220
|
+
lastName: {
|
|
221
|
+
type: 'string',
|
|
222
|
+
description: 'Customer last name',
|
|
223
|
+
},
|
|
224
|
+
phone: {
|
|
225
|
+
type: 'string',
|
|
226
|
+
description: 'Customer phone number',
|
|
227
|
+
},
|
|
228
|
+
city: {
|
|
229
|
+
type: 'string',
|
|
230
|
+
description: 'Customer city',
|
|
231
|
+
},
|
|
232
|
+
country: {
|
|
233
|
+
type: 'string',
|
|
234
|
+
description: 'Customer country',
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
required: ['email'],
|
|
238
|
+
},
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
// Get Order Tool
|
|
242
|
+
if (operations.includes('getOrder')) {
|
|
243
|
+
toolDefinitions.push({
|
|
244
|
+
name: 'richpanel_get_order',
|
|
245
|
+
description: 'Retrieve order information by order ID. Use this when a customer asks about order status, shipping, tracking, or order details.',
|
|
246
|
+
schema: {
|
|
247
|
+
type: 'object',
|
|
248
|
+
properties: {
|
|
249
|
+
orderId: {
|
|
250
|
+
type: 'string',
|
|
251
|
+
description: 'The unique order ID/number',
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
required: ['orderId'],
|
|
255
|
+
},
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
// Add Tags Tool
|
|
259
|
+
if (operations.includes('addTags')) {
|
|
260
|
+
toolDefinitions.push({
|
|
261
|
+
name: 'richpanel_add_tags',
|
|
262
|
+
description: 'Add tags to a conversation for categorization and organization. Use this to tag tickets by issue type, urgency, department, or any other category.',
|
|
263
|
+
schema: {
|
|
264
|
+
type: 'object',
|
|
265
|
+
properties: {
|
|
266
|
+
conversationId: {
|
|
267
|
+
type: 'string',
|
|
268
|
+
description: 'The conversation ID to add tags to',
|
|
269
|
+
},
|
|
270
|
+
tags: {
|
|
271
|
+
type: 'array',
|
|
272
|
+
items: {
|
|
273
|
+
type: 'string',
|
|
274
|
+
},
|
|
275
|
+
description: 'Array of tag names (e.g., ["billing", "urgent", "refund"])',
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
required: ['conversationId', 'tags'],
|
|
279
|
+
},
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
// List Users Tool
|
|
283
|
+
if (operations.includes('listUsers')) {
|
|
284
|
+
toolDefinitions.push({
|
|
285
|
+
name: 'richpanel_list_users',
|
|
286
|
+
description: 'Get a list of all support agents/users in Richpanel. Use this when a customer asks to speak with an agent, or to find available support staff.',
|
|
287
|
+
schema: {
|
|
288
|
+
type: 'object',
|
|
289
|
+
properties: {},
|
|
290
|
+
},
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
// Return tool definitions for AI agent
|
|
294
|
+
return {
|
|
295
|
+
response: toolDefinitions.map((tool) => ({
|
|
296
|
+
type: 'function',
|
|
297
|
+
function: {
|
|
298
|
+
name: tool.name,
|
|
299
|
+
description: tool.description,
|
|
300
|
+
parameters: tool.schema,
|
|
301
|
+
},
|
|
302
|
+
})),
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
exports.RichpanelTool = RichpanelTool;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-richpanel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "n8n community node for Richpanel customer support platform - manage conversations, customers, orders, and subscriptions",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n",
|
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
"dist/credentials/RichpanelApi.credentials.js"
|
|
49
49
|
],
|
|
50
50
|
"nodes": [
|
|
51
|
-
"dist/nodes/Richpanel/Richpanel.node.js"
|
|
51
|
+
"dist/nodes/Richpanel/Richpanel.node.js",
|
|
52
|
+
"dist/nodes/Richpanel/RichpanelTool.tool.js"
|
|
52
53
|
]
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|