n8n-nodes-richpanel 1.0.0
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/LICENSE.md +21 -0
- package/README.md +291 -0
- package/dist/credentials/RichpanelApi.credentials.d.ts +9 -0
- package/dist/credentials/RichpanelApi.credentials.js +37 -0
- package/dist/nodes/Richpanel/Richpanel.node.d.ts +5 -0
- package/dist/nodes/Richpanel/Richpanel.node.js +1783 -0
- package/dist/nodes/Richpanel/richpanel-logo.png +0 -0
- package/dist/nodes/Richpanel/richpanel.svg +5 -0
- package/package.json +66 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
# n8n-nodes-richpanel
|
|
2
|
+
|
|
3
|
+
This is an n8n community node that provides integration with the [Richpanel](https://www.richpanel.com/) customer support platform.
|
|
4
|
+
|
|
5
|
+
[n8n](https://n8n.io/) is a fair-code licensed workflow automation platform.
|
|
6
|
+
|
|
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
|
+
|
|
9
|
+
## Table of Contents
|
|
10
|
+
|
|
11
|
+
- [Installation](#installation)
|
|
12
|
+
- [Prerequisites](#prerequisites)
|
|
13
|
+
- [Credentials](#credentials)
|
|
14
|
+
- [Supported Operations](#supported-operations)
|
|
15
|
+
- [Usage Examples](#usage-examples)
|
|
16
|
+
- [Compatibility](#compatibility)
|
|
17
|
+
- [Resources](#resources)
|
|
18
|
+
- [License](#license)
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
|
|
23
|
+
|
|
24
|
+
### Community Node Installation
|
|
25
|
+
|
|
26
|
+
1. Go to **Settings > Community Nodes** in your n8n instance
|
|
27
|
+
2. Select **Install**
|
|
28
|
+
3. Enter `n8n-nodes-richpanel` in **Enter npm package name**
|
|
29
|
+
4. Agree to the risks and select **Install**
|
|
30
|
+
|
|
31
|
+
After installing the node, you can use it like any other node in n8n.
|
|
32
|
+
|
|
33
|
+
### Manual Installation
|
|
34
|
+
|
|
35
|
+
To get started, install the package in your n8n root directory:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install n8n-nodes-richpanel
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
For Docker-based deployments, add the following line to your `package.json` in the n8n custom nodes section:
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
"n8n-nodes-richpanel": "^1.0.0"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Prerequisites
|
|
48
|
+
|
|
49
|
+
- n8n installed (version 0.187.0 or above)
|
|
50
|
+
- A Richpanel account
|
|
51
|
+
|
|
52
|
+
## Credentials
|
|
53
|
+
|
|
54
|
+
To use this node, you'll need a Richpanel API key. Here's how to obtain it:
|
|
55
|
+
|
|
56
|
+
1. Log in to your Richpanel account
|
|
57
|
+
2. Navigate to **Settings** → **Integrations** → **API Keys**
|
|
58
|
+
3. Generate a new API key or copy an existing one
|
|
59
|
+
4. In n8n, create new **Richpanel API** credentials
|
|
60
|
+
5. Paste your API key in the **API Key** field
|
|
61
|
+
|
|
62
|
+
## Supported Operations
|
|
63
|
+
|
|
64
|
+
### Conversation
|
|
65
|
+
|
|
66
|
+
- **Create**: Create a new conversation/ticket
|
|
67
|
+
- **Update**: Update an existing conversation
|
|
68
|
+
- **Get**: Retrieve a conversation by ID
|
|
69
|
+
- **Get by Number**: Retrieve a conversation by conversation number
|
|
70
|
+
- **Get by Customer**: Retrieve conversations by customer email or phone
|
|
71
|
+
- **Add Tags**: Add tags to a conversation
|
|
72
|
+
- **Remove Tags**: Remove tags from a conversation
|
|
73
|
+
- **Attach Order**: Attach an order to a conversation
|
|
74
|
+
|
|
75
|
+
### Customer
|
|
76
|
+
|
|
77
|
+
- **Create or Update**: Create a new customer or update an existing one
|
|
78
|
+
- **Get**: Retrieve a customer by email or phone number
|
|
79
|
+
|
|
80
|
+
### Order
|
|
81
|
+
|
|
82
|
+
- **Create or Update**: Create a new order or update an existing one
|
|
83
|
+
- **Get**: Retrieve an order by ID
|
|
84
|
+
- **Get from Conversation**: Retrieve an order linked to a conversation
|
|
85
|
+
|
|
86
|
+
### Subscription
|
|
87
|
+
|
|
88
|
+
- **Create or Update**: Create a new subscription or update an existing one
|
|
89
|
+
|
|
90
|
+
### User (Agent)
|
|
91
|
+
|
|
92
|
+
- **Get**: Retrieve a specific user/agent by ID
|
|
93
|
+
- **Get Many**: Retrieve all users/agents (with pagination support)
|
|
94
|
+
|
|
95
|
+
### Tag
|
|
96
|
+
|
|
97
|
+
- **Create**: Create a new tag
|
|
98
|
+
- **Get Many**: Retrieve all tags (with pagination support)
|
|
99
|
+
|
|
100
|
+
### Channel
|
|
101
|
+
|
|
102
|
+
- **Get**: Retrieve a specific channel by ID
|
|
103
|
+
- **Get Many**: Retrieve all channels (with pagination support)
|
|
104
|
+
|
|
105
|
+
## Usage Examples
|
|
106
|
+
|
|
107
|
+
### Example 1: Create a Conversation from Email
|
|
108
|
+
|
|
109
|
+
This workflow creates a new support ticket when an email is received:
|
|
110
|
+
|
|
111
|
+
1. Add an **Email Trigger** node (or any other trigger)
|
|
112
|
+
2. Add the **Richpanel** node
|
|
113
|
+
3. Configure:
|
|
114
|
+
- **Resource**: Conversation
|
|
115
|
+
- **Operation**: Create
|
|
116
|
+
- **Message Body**: `{{$json.body}}`
|
|
117
|
+
- **Channel**: Email
|
|
118
|
+
- **From**: `{{$json.from}}`
|
|
119
|
+
- **To**: `support@yourcompany.com`
|
|
120
|
+
|
|
121
|
+
### Example 2: Create or Update Customer
|
|
122
|
+
|
|
123
|
+
Sync customer data from your e-commerce platform:
|
|
124
|
+
|
|
125
|
+
1. Add a trigger node (e.g., Webhook, Shopify)
|
|
126
|
+
2. Add the **Richpanel** node
|
|
127
|
+
3. Configure:
|
|
128
|
+
- **Resource**: Customer
|
|
129
|
+
- **Operation**: Create or Update
|
|
130
|
+
- **Customer Fields**:
|
|
131
|
+
- First Name: `{{$json.customer.first_name}}`
|
|
132
|
+
- Last Name: `{{$json.customer.last_name}}`
|
|
133
|
+
- Email: `{{$json.customer.email}}`
|
|
134
|
+
- Phone: `{{$json.customer.phone}}`
|
|
135
|
+
|
|
136
|
+
### Example 3: Create Order
|
|
137
|
+
|
|
138
|
+
Create an order in Richpanel when a purchase is completed:
|
|
139
|
+
|
|
140
|
+
1. Add a trigger node from your e-commerce platform
|
|
141
|
+
2. Add the **Richpanel** node
|
|
142
|
+
3. Configure:
|
|
143
|
+
- **Resource**: Order
|
|
144
|
+
- **Operation**: Create or Update
|
|
145
|
+
- **App Client ID**: Your API Key
|
|
146
|
+
- **Order ID**: `{{$json.order.id}}`
|
|
147
|
+
- **Amount**: `{{$json.order.total}}`
|
|
148
|
+
- **User UID**: `{{$json.customer.id}}`
|
|
149
|
+
- **Items**:
|
|
150
|
+
```json
|
|
151
|
+
[
|
|
152
|
+
{
|
|
153
|
+
"id": "{{$json.items[0].id}}",
|
|
154
|
+
"price": {{$json.items[0].price}},
|
|
155
|
+
"name": "{{$json.items[0].name}}",
|
|
156
|
+
"quantity": {{$json.items[0].quantity}}
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Example 4: Add Tags to Conversation
|
|
162
|
+
|
|
163
|
+
Automatically tag conversations based on keywords:
|
|
164
|
+
|
|
165
|
+
1. Add a **Richpanel Trigger** or webhook
|
|
166
|
+
2. Add an **IF** node to check for specific keywords
|
|
167
|
+
3. Add the **Richpanel** node
|
|
168
|
+
4. Configure:
|
|
169
|
+
- **Resource**: Conversation
|
|
170
|
+
- **Operation**: Add Tags
|
|
171
|
+
- **Conversation ID**: `{{$json.ticket.id}}`
|
|
172
|
+
- **Tags**: `urgent, billing` (comma-separated)
|
|
173
|
+
|
|
174
|
+
### Example 5: Get Customer Information
|
|
175
|
+
|
|
176
|
+
Retrieve customer details for further processing:
|
|
177
|
+
|
|
178
|
+
1. Add a trigger node
|
|
179
|
+
2. Add the **Richpanel** node
|
|
180
|
+
3. Configure:
|
|
181
|
+
- **Resource**: Customer
|
|
182
|
+
- **Operation**: Get
|
|
183
|
+
- **Type**: Email
|
|
184
|
+
- **Customer Identifier**: `customer@example.com`
|
|
185
|
+
|
|
186
|
+
## Pagination
|
|
187
|
+
|
|
188
|
+
For operations that return multiple results (Get Many), pagination is supported:
|
|
189
|
+
|
|
190
|
+
- **Page**: Specify which page to retrieve (default: 1)
|
|
191
|
+
- **Per Page**: Number of records per page (max: 100, default: 100)
|
|
192
|
+
- **Return All**: Automatically paginate through all results
|
|
193
|
+
|
|
194
|
+
Example usage:
|
|
195
|
+
1. Set "Return All" to `true` to automatically fetch all pages
|
|
196
|
+
2. Or manually control pagination with "Page" and "Per Page" options
|
|
197
|
+
|
|
198
|
+
## API Rate Limiting
|
|
199
|
+
|
|
200
|
+
Richpanel API has the following rate limits:
|
|
201
|
+
|
|
202
|
+
- **100 calls per minute**
|
|
203
|
+
- Rate limit headers are included in responses:
|
|
204
|
+
- `X-RateLimit-Limit`: Total allowed requests
|
|
205
|
+
- `X-RateLimit-Remaining`: Remaining requests
|
|
206
|
+
- `Retry-After`: Seconds to wait when rate limited
|
|
207
|
+
|
|
208
|
+
The node will return rate limit errors if you exceed these limits. Consider adding delay nodes in your workflows to stay within limits.
|
|
209
|
+
|
|
210
|
+
## Compatibility
|
|
211
|
+
|
|
212
|
+
- Minimum n8n version: 0.187.0
|
|
213
|
+
- Tested with n8n version: 1.0.0+
|
|
214
|
+
|
|
215
|
+
## Resources
|
|
216
|
+
|
|
217
|
+
- [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
|
|
218
|
+
- [Richpanel API Documentation](https://developer.richpanel.com/reference/getting-started-with-your-api)
|
|
219
|
+
- [Richpanel Authentication Guide](https://developer.richpanel.com/reference/authentication)
|
|
220
|
+
|
|
221
|
+
## Development
|
|
222
|
+
|
|
223
|
+
To develop and test this node locally:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
# Clone the repository
|
|
227
|
+
git clone https://github.com/yourusername/n8n-nodes-richpanel.git
|
|
228
|
+
cd n8n-nodes-richpanel
|
|
229
|
+
|
|
230
|
+
# Install dependencies
|
|
231
|
+
npm install
|
|
232
|
+
|
|
233
|
+
# Build the node
|
|
234
|
+
npm run build
|
|
235
|
+
|
|
236
|
+
# Link to your local n8n installation
|
|
237
|
+
npm link
|
|
238
|
+
cd ~/.n8n/nodes
|
|
239
|
+
npm link n8n-nodes-richpanel
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## Support
|
|
243
|
+
|
|
244
|
+
For issues, questions, or contributions:
|
|
245
|
+
|
|
246
|
+
- [GitHub Issues](https://github.com/yourusername/n8n-nodes-richpanel/issues)
|
|
247
|
+
- [Richpanel Support](mailto:tech@richpanel.com)
|
|
248
|
+
- [n8n Community Forum](https://community.n8n.io/)
|
|
249
|
+
|
|
250
|
+
## Contributing
|
|
251
|
+
|
|
252
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
253
|
+
|
|
254
|
+
1. Fork the repository
|
|
255
|
+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
|
|
256
|
+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
|
|
257
|
+
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
|
258
|
+
5. Open a Pull Request
|
|
259
|
+
|
|
260
|
+
## License
|
|
261
|
+
|
|
262
|
+
[MIT](LICENSE.md)
|
|
263
|
+
|
|
264
|
+
## Version History
|
|
265
|
+
|
|
266
|
+
### 1.0.0 (Initial Release)
|
|
267
|
+
|
|
268
|
+
- Support for Conversation operations (create, update, get, tag management)
|
|
269
|
+
- Support for Customer operations (create/update, get)
|
|
270
|
+
- Support for Order operations (create/update)
|
|
271
|
+
- Support for User/Agent operations (get, list)
|
|
272
|
+
- Support for Tag operations (create, list)
|
|
273
|
+
- Support for Channel operations (get, list)
|
|
274
|
+
- API Key authentication
|
|
275
|
+
- Full TypeScript support
|
|
276
|
+
|
|
277
|
+
## Roadmap
|
|
278
|
+
|
|
279
|
+
- [ ] Add pagination support for list operations
|
|
280
|
+
- [ ] Add file upload functionality
|
|
281
|
+
- [ ] Add webhook trigger node
|
|
282
|
+
- [ ] Add team management operations
|
|
283
|
+
- [ ] Add subscription management operations
|
|
284
|
+
- [ ] Add bulk operations support
|
|
285
|
+
|
|
286
|
+
## Notes
|
|
287
|
+
|
|
288
|
+
- This is a community-maintained node and is not officially supported by Richpanel
|
|
289
|
+
- Partial updates are supported for conversation and customer updates (only send the fields you want to modify)
|
|
290
|
+
- Custom properties can be added to customers using the Custom Properties field (JSON format)
|
|
291
|
+
- For phone channels, use ID fields instead of address fields in the source configuration
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class RichpanelApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RichpanelApi = void 0;
|
|
4
|
+
class RichpanelApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'richpanelApi';
|
|
7
|
+
this.displayName = 'Richpanel API';
|
|
8
|
+
this.documentationUrl = 'https://developer.richpanel.com/reference/authentication';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'API Key',
|
|
12
|
+
name: 'apiKey',
|
|
13
|
+
type: 'string',
|
|
14
|
+
typeOptions: { password: true },
|
|
15
|
+
default: '',
|
|
16
|
+
required: true,
|
|
17
|
+
description: 'API Key from Settings -> Integrations -> API Keys in your Richpanel account',
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
this.authenticate = {
|
|
21
|
+
type: 'generic',
|
|
22
|
+
properties: {
|
|
23
|
+
headers: {
|
|
24
|
+
'x-richpanel-key': '={{$credentials.apiKey}}',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
this.test = {
|
|
29
|
+
request: {
|
|
30
|
+
baseURL: 'https://api.richpanel.com/v1',
|
|
31
|
+
url: '/users',
|
|
32
|
+
method: 'GET',
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.RichpanelApi = RichpanelApi;
|