n8n-nodes-clientify 0.2.0 → 0.2.2

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/dist/README.md ADDED
@@ -0,0 +1,574 @@
1
+ # n8n-nodes-clientify
2
+
3
+ [![npm version](https://badge.fury.io/js/n8n-nodes-clientify.svg)](https://www.npmjs.com/package/n8n-nodes-clientify)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ Official n8n node for integrating with Clientify CRM via Model Context Protocol (MCP). This node provides seamless access to all Clientify CRM operations including contacts, companies, deals, tasks, and more.
7
+
8
+ ## Table of Contents
9
+
10
+ - [Installation](#installation)
11
+ - [Prerequisites](#prerequisites)
12
+ - [Configuration](#configuration)
13
+ - [Available Operations](#available-operations)
14
+ - [Trigger Events](#trigger-events)
15
+ - [Usage Examples](#usage-examples)
16
+ - [Troubleshooting](#troubleshooting)
17
+ - [Support](#support)
18
+ - [License](#license)
19
+
20
+ ## Installation
21
+
22
+ ### In n8n (GUI)
23
+
24
+ 1. Go to **Settings** → **Community Nodes**
25
+ 2. Click **Install**
26
+ 3. Enter: `n8n-nodes-clientify`
27
+ 4. Click **I understand the risks** and then **Install**
28
+ 5. **Restart n8n** (important - the node won't appear until you restart)
29
+
30
+ ### Via npm (Command Line)
31
+
32
+ ```bash
33
+ cd ~/.n8n/nodes
34
+ npm install n8n-nodes-clientify
35
+ # Restart n8n
36
+ ```
37
+
38
+ ### Docker
39
+
40
+ If running n8n in Docker, ensure you persist the nodes directory:
41
+
42
+ ```yaml
43
+ volumes:
44
+ - n8n_data:/home/node/.n8n
45
+ ```
46
+
47
+ Or enable auto-reinstall on restart:
48
+
49
+ ```yaml
50
+ environment:
51
+ - N8N_REINSTALL_MISSING_PACKAGES=true
52
+ ```
53
+
54
+ ## Prerequisites
55
+
56
+ - **n8n version:** 0.180.0 or higher
57
+ - **Node.js version:** 20.15 or higher
58
+ - **Clientify Account:** Active Clientify CRM account with API access
59
+ - **Authentication Token:** JWT token from Clientify MCP server
60
+
61
+ ## Configuration
62
+
63
+ ### Step 1: Obtain Your Clientify MCP Token
64
+
65
+ 1. Log into your Clientify account
66
+ 2. Navigate to API settings or contact your Clientify administrator
67
+ 3. Generate or copy your MCP authentication token (JWT format)
68
+
69
+ ### Step 2: Add Credentials in n8n
70
+
71
+ 1. In n8n, go to **Credentials** → **New**
72
+ 2. Search for **"Clientify MCP API"**
73
+ 3. Enter your **Authentication Token** (JWT)
74
+ 4. Click **Save**
75
+
76
+ ### Step 3: Use the Node
77
+
78
+ 1. In your workflow, click **+** to add a node
79
+ 2. Search for **"Clientify"**
80
+ 3. Select the **Clientify** node
81
+ 4. Choose your saved credentials
82
+ 5. Select an operation from the dropdown
83
+ 6. Configure the parameters for your operation
84
+
85
+ ## Available Operations
86
+
87
+ This node dynamically supports **26 operations** from the Clientify MCP API:
88
+
89
+ ### 📊 Companies
90
+ - **List Companies** - Retrieve all companies with pagination
91
+ - **Get Company** - Get detailed information for a specific company by ID
92
+ - **Create Company** - Create a new company in the CRM
93
+ - **Update Company** - Update an existing company
94
+ - **Delete Company** - Remove a company from the CRM
95
+ - **Search Companies** - Search for companies by criteria
96
+
97
+ ### 👥 Contacts
98
+ - **List Contacts** - Retrieve all contacts or search for specific contacts
99
+ - **Get Contact** - Get detailed information for a specific contact by ID
100
+ - **Create Contact** - Create a new contact in the CRM
101
+ - **Update Contact** - Update an existing contact
102
+ - **Delete Contact** - Remove a contact from the CRM
103
+
104
+ ### 💼 Deals
105
+ - **List Deals** - Retrieve all deals with filtering and pagination
106
+ - **List Deals By Stage** - Filter deals by pipeline stage
107
+ - **Get Deal** - Get detailed information for a specific deal by ID
108
+ - **Create Deal** - Create a new deal/opportunity
109
+ - **Update Deal** - Update an existing deal
110
+ - **Delete Deal** - Remove a deal from the CRM
111
+ - **Mark Deal Won** - Mark a deal as won/closed successfully
112
+ - **Mark Deal Lost** - Mark a deal as lost/closed unsuccessfully
113
+
114
+ ### ✅ Tasks
115
+ - **List Tasks** - Retrieve all tasks with pagination
116
+ - **Get Task** - Get detailed information for a specific task by ID
117
+ - **Create Task** - Create a new task/activity
118
+ - **List Activity Types** - Get available activity types for tasks
119
+
120
+ ### ⚙️ Configuration & Utilities
121
+ - **List Pipelines** - Retrieve all available sales pipelines
122
+ - **Get Current User** - Get information about the authenticated user
123
+ - **Get Current Time** - Get current date/time with timezone awareness
124
+
125
+ ## Trigger Events
126
+
127
+ **NEW in v0.2.0!** The Clientify Trigger node enables automatic workflow execution when events occur in Clientify CRM. With 16 event types covering contacts, companies, deals, and tasks, you can automate workflows instantly when things happen in your CRM.
128
+
129
+ ### How It Works
130
+
131
+ 1. Add "Clientify Trigger" node to your n8n workflow
132
+ 2. Select which event should start the workflow (e.g., "Contact Created")
133
+ 3. Activate the workflow to get your unique webhook URL
134
+ 4. Configure the webhook in Clientify to point to your n8n URL
135
+ 5. When the event happens in Clientify, your workflow runs automatically with the data
136
+
137
+ ### 16 Available Triggers
138
+
139
+ | Event | Trigger Name | When It Fires | Common Use Cases |
140
+ |-------|--------------|---------------|------------------|
141
+ | 👥 **Contacts** | | | |
142
+ | | Contact Created | New contact added | Welcome email, create follow-up task, add to CRM |
143
+ | | Contact Updated | Contact details changed | Sync to other systems, log changes, update records |
144
+ | | Contact Deleted | Contact removed | Archive data, remove from email lists, cleanup |
145
+ | 📊 **Companies** | | | |
146
+ | | Company Created | New company added | Research company, assign account manager, notify team |
147
+ | | Company Updated | Company details changed | Update external systems, track changes |
148
+ | | Company Deleted | Company removed | Clean up related data, archive records |
149
+ | 💼 **Deals** | | | |
150
+ | | Deal Created | New deal/opportunity created | Notify sales team, create tasks, log in analytics |
151
+ | | Deal Updated | Deal details changed | Track value changes, update forecasts, log activity |
152
+ | | Deal Won | Deal closed successfully | Send celebration, create invoice, start onboarding |
153
+ | | Deal Lost | Deal closed unsuccessfully | Add to nurture campaign, analyze loss reason |
154
+ | | Deal Stage Changed | Deal moved to different stage | Stage-specific actions (send pricing, generate contract) |
155
+ | | Deal Deleted | Deal removed | Log deletion, archive data |
156
+ | ✅ **Tasks** | | | |
157
+ | | Task Created | New task added | Add to calendar, notify assignee, sync to project tools |
158
+ | | Task Completed | Task marked complete | Log activity, update metrics, trigger next steps |
159
+ | | Task Due Soon | Task approaching due date | Send reminder to assignee |
160
+ | | Task Overdue | Task past due date | Escalate to manager, send urgent notification |
161
+
162
+ ### Setup Instructions
163
+
164
+ **In n8n:**
165
+ 1. Add "Clientify Trigger" node to your workflow
166
+ 2. Select the event from the dropdown
167
+ 3. Choose your Clientify MCP credentials
168
+ 4. Save and **activate** the workflow (toggle ON)
169
+ 5. Click the trigger node → Expand "Webhook URLs"
170
+ 6. Switch to "Production URL" tab
171
+ 7. Copy the webhook URL
172
+
173
+ **In Clientify:**
174
+ 1. Go to Settings → Webhooks
175
+ 2. Click "Add Webhook"
176
+ 3. Select the matching event (e.g., "contact.created")
177
+ 4. Paste your n8n webhook URL
178
+ 5. Set status to "Active"
179
+ 6. Save
180
+
181
+ **Test It:**
182
+ Create a contact, deal, or task in Clientify → Check n8n executions → Your workflow should have run!
183
+
184
+ ### Data You'll Receive
185
+
186
+ All webhook data is automatically flattened so you can easily access it in your workflow. Here's what you get for each event type:
187
+
188
+ **Contact Events** (`contact.created`, `contact.updated`, `contact.deleted`)
189
+ ```json
190
+ {
191
+ "event": "contact.created",
192
+ "timestamp": "2025-10-02T15:30:00Z",
193
+ "contact_id": 12345,
194
+ "first_name": "John",
195
+ "last_name": "Doe",
196
+ "email": "john.doe@example.com",
197
+ "phone": "+1234567890",
198
+ "company_id": 456,
199
+ "company_name": "Acme Corp",
200
+ "changes": { /* only for .updated events */ }
201
+ }
202
+ ```
203
+ Access with: `{{$json.first_name}}`, `{{$json.email}}`, `{{$json.company_name}}`
204
+
205
+ **Company Events** (`company.created`, `company.updated`, `company.deleted`)
206
+ ```json
207
+ {
208
+ "event": "company.created",
209
+ "timestamp": "2025-10-02T18:00:00Z",
210
+ "company_id": 999,
211
+ "name": "Tech Startup Inc",
212
+ "domain": "techstartup.com",
213
+ "industry": "Technology",
214
+ "size": "50-100",
215
+ "country": "USA"
216
+ }
217
+ ```
218
+ Access with: `{{$json.name}}`, `{{$json.domain}}`, `{{$json.industry}}`
219
+
220
+ **Deal Events** (`deal.created`, `deal.updated`, `deal.won`, `deal.lost`, `deal.stage_changed`, `deal.deleted`)
221
+ ```json
222
+ {
223
+ "event": "deal.won",
224
+ "timestamp": "2025-10-02T23:00:00Z",
225
+ "deal_id": 98765,
226
+ "title": "Enterprise License Sale",
227
+ "value": 60000,
228
+ "currency": "USD",
229
+ "contact_id": 12345,
230
+ "contact_name": "John Doe",
231
+ "company_id": 999,
232
+ "company_name": "Tech Startup Inc",
233
+ "stage_name": "Won",
234
+ "won_at": "2025-10-02T23:00:00Z"
235
+ }
236
+ ```
237
+ Access with: `{{$json.title}}`, `{{$json.value}}`, `{{$json.contact_name}}`
238
+
239
+ **Task Events** (`task.created`, `task.completed`, `task.due_soon`, `task.overdue`)
240
+ ```json
241
+ {
242
+ "event": "task.created",
243
+ "timestamp": "2025-10-03T03:00:00Z",
244
+ "task_id": 5555,
245
+ "title": "Follow up with John Doe",
246
+ "description": "Discuss pricing options",
247
+ "type": "call",
248
+ "contact_id": 12345,
249
+ "contact_name": "John Doe",
250
+ "deal_id": 98765,
251
+ "assigned_to_name": "Sales Rep",
252
+ "due_date": "2025-10-05"
253
+ }
254
+ ```
255
+ Access with: `{{$json.title}}`, `{{$json.contact_name}}`, `{{$json.due_date}}`
256
+
257
+ ### Important Notes
258
+
259
+ - **Event names are case-sensitive**: Use exact names like `contact.created` (not `Contact.Created`)
260
+ - **Webhook URLs are unique** per workflow - if you recreate a workflow, you'll get a new URL
261
+ - **Workflows must be active** for webhooks to work - inactive workflows won't receive events
262
+ - **All data includes `_raw`** field with the original payload for advanced use cases
263
+ - **Update events include `changes`** object showing what changed (old/new values)
264
+
265
+ ## Usage Examples
266
+
267
+ ### Example 1: List All Contacts
268
+
269
+ Retrieve a paginated list of all contacts in your CRM.
270
+
271
+ **Configuration:**
272
+ - **Operation:** `List Contacts`
273
+ - **Parameters:** Leave empty for all contacts, or add filters
274
+
275
+ **Output:** Array of contact objects with names, emails, phone numbers, and IDs.
276
+
277
+ ```json
278
+ [
279
+ {
280
+ "id": 123,
281
+ "first_name": "John",
282
+ "last_name": "Doe",
283
+ "email": "john.doe@example.com",
284
+ "phone": "+1234567890",
285
+ "company_id": 456
286
+ }
287
+ ]
288
+ ```
289
+
290
+ ---
291
+
292
+ ### Example 2: Create a New Company
293
+
294
+ Add a new company to your Clientify CRM.
295
+
296
+ **Configuration:**
297
+ - **Operation:** `Create Company`
298
+ - **Parameters:**
299
+ - **name** (required): `Acme Corporation`
300
+ - **domain**: `acme.com`
301
+ - **industry**: `Technology`
302
+ - **description**: `Leading software provider`
303
+
304
+ **Output:** Created company object with assigned ID.
305
+
306
+ ```json
307
+ {
308
+ "id": 789,
309
+ "name": "Acme Corporation",
310
+ "domain": "acme.com",
311
+ "industry": "Technology",
312
+ "created_at": "2025-10-01T12:00:00Z"
313
+ }
314
+ ```
315
+
316
+ ---
317
+
318
+ ### Example 3: Update a Deal and Mark as Won
319
+
320
+ Update deal details and mark it as successfully closed.
321
+
322
+ **Workflow:**
323
+ 1. **First Node:** Get the deal you want to update
324
+ - **Operation:** `Get Deal`
325
+ - **deal_id:** `{{$json.deal_id}}`
326
+
327
+ 2. **Second Node:** Update the deal
328
+ - **Operation:** `Update Deal`
329
+ - **deal_id:** `{{$json.id}}`
330
+ - **value:** `50000`
331
+ - **notes:** `Final negotiations completed`
332
+
333
+ 3. **Third Node:** Mark as won
334
+ - **Operation:** `Mark Deal Won`
335
+ - **deal_id:** `{{$json.id}}`
336
+
337
+ ---
338
+
339
+ ### Example 4: Search Companies and Create Contacts
340
+
341
+ Find a company by name and create a new contact associated with it.
342
+
343
+ **Workflow:**
344
+ 1. **Search Companies:**
345
+ - **Operation:** `Search Companies`
346
+ - **query:** `Acme`
347
+
348
+ 2. **Create Contact:**
349
+ - **Operation:** `Create Contact`
350
+ - **first_name:** `Jane`
351
+ - **last_name:** `Smith`
352
+ - **email:** `jane.smith@acme.com`
353
+ - **company_id:** `{{$json.id}}` (from previous node)
354
+
355
+ ---
356
+
357
+ ### Example 5: List All Deals in a Specific Pipeline Stage
358
+
359
+ Retrieve deals that are in the "Negotiation" stage.
360
+
361
+ **Configuration:**
362
+ - **Operation:** `List Deals By Stage`
363
+ - **Parameters:**
364
+ - **stage:** `Negotiation`
365
+
366
+ **Use Case:** Create automated alerts when deals reach certain stages, or generate reports on pipeline health.
367
+
368
+ ---
369
+
370
+ ### Example 6: Auto-Send Welcome Email (Using Trigger)
371
+
372
+ **NEW in v0.2.0!** Automatically send a welcome email when a new contact is created.
373
+
374
+ **Workflow:**
375
+ 1. **Clientify Trigger**
376
+ - Event: `Contact Created`
377
+
378
+ 2. **Send Email**
379
+ - To: `{{$json.email}}`
380
+ - Subject: `Welcome {{$json.first_name}}!`
381
+ - Body: Welcome message
382
+
383
+ 3. **Create Task**
384
+ - Title: `Follow up with {{$json.first_name}} {{$json.last_name}}`
385
+ - Contact ID: `{{$json.contact_id}}`
386
+ - Due: 3 days from now
387
+
388
+ **Result:** When someone creates a contact "Jane Smith" in Clientify:
389
+ - Jane automatically receives welcome email
390
+ - Follow-up task is created for sales team
391
+ - All happens instantly without manual intervention
392
+
393
+ ---
394
+
395
+ ### Example 7: Deal Won Notification (Using Trigger)
396
+
397
+ **NEW in v0.2.0!** Notify your team when a deal is won.
398
+
399
+ **Workflow:**
400
+ 1. **Clientify Trigger**
401
+ - Event: `Deal Won`
402
+
403
+ 2. **Slack** (or Email)
404
+ - Message: `🎉 Deal Won! {{$json.title}} - ${{$json.value}} - {{$json.contact_name}}`
405
+ - Channel: `#sales-wins`
406
+
407
+ 3. **Clientify** (Action Node)
408
+ - Operation: `Create Task`
409
+ - Title: `Onboard {{$json.contact_name}}`
410
+ - Deal ID: `{{$json.deal_id}}`
411
+
412
+ **Result:** When a deal is marked as won:
413
+ - Team gets instant Slack notification
414
+ - Onboarding task is automatically created
415
+ - No manual steps required
416
+
417
+ ---
418
+
419
+ ## Troubleshooting
420
+
421
+ ### Node Doesn't Appear After Installation
422
+
423
+ **Problem:** The Clientify node doesn't show up in the node panel after installing.
424
+
425
+ **Solution:**
426
+ 1. **Restart n8n completely** (required for new nodes)
427
+ 2. Clear your browser cache (Ctrl+Shift+Delete or Cmd+Shift+Delete)
428
+ 3. Search for "Clientify" (not the package name) in the node search
429
+ 4. Verify installation in **Settings → Community Nodes**
430
+
431
+ ### Authentication Errors
432
+
433
+ **Problem:** "Authentication failed" or 401/403 errors.
434
+
435
+ **Solution:**
436
+ 1. Verify your JWT token is valid and not expired
437
+ 2. Check that the token has the correct permissions in Clientify
438
+ 3. Ensure you're using the Clientify MCP token (not a regular API key)
439
+ 4. Try creating a new credential with a fresh token
440
+
441
+ ### "Missing required parameter" Errors
442
+
443
+ **Problem:** Operation fails with missing parameter errors.
444
+
445
+ **Solution:**
446
+ 1. Check which fields are marked as **required** (indicated by red asterisk)
447
+ 2. Some operations require specific IDs (contact_id, company_id, etc.)
448
+ 3. Use `Get` operations first to retrieve IDs, then pass them to `Update` or `Delete` operations
449
+ 4. Review the parameter descriptions for expected format
450
+
451
+ ### Operations Return Empty Results
452
+
453
+ **Problem:** List operations return no results even though data exists.
454
+
455
+ **Solution:**
456
+ 1. Check pagination parameters (page, page_size)
457
+ 2. Verify your token has permission to access the requested resources
458
+ 3. Try without filters first to confirm data access
459
+ 4. Check the Clientify web UI to confirm data exists
460
+
461
+ ### Node Execution Fails in Docker
462
+
463
+ **Problem:** Node fails with "package not found" errors in Docker environments.
464
+
465
+ **Solution:**
466
+ 1. Ensure nodes directory is persisted in volumes:
467
+ ```yaml
468
+ volumes:
469
+ - n8n_data:/home/node/.n8n
470
+ ```
471
+ 2. Or enable auto-reinstall:
472
+ ```yaml
473
+ environment:
474
+ - N8N_REINSTALL_MISSING_PACKAGES=true
475
+ ```
476
+ 3. Restart the container after installing the node
477
+
478
+ ### Rate Limiting Errors
479
+
480
+ **Problem:** "Too many requests" or 429 errors.
481
+
482
+ **Solution:**
483
+ 1. Add delay between operations using n8n's **Wait** node
484
+ 2. Reduce the frequency of scheduled workflows
485
+ 3. Batch operations where possible
486
+ 4. Contact Clientify support to increase rate limits if needed
487
+
488
+ ## Parameter Reference
489
+
490
+ ### Common Parameters
491
+
492
+ Most operations support these common parameters:
493
+
494
+ - **page** (number): Page number for pagination (default: 1)
495
+ - **page_size** (number): Number of results per page (default: 20, max: 100)
496
+ - **sort_by** (string): Field to sort by (e.g., "created_at", "name")
497
+ - **sort_order** (string): Sort direction ("asc" or "desc")
498
+
499
+ ### ID Parameters
500
+
501
+ Operations that work with specific records require an ID parameter:
502
+
503
+ - **company_id** (number): Unique identifier for a company
504
+ - **contact_id** (number): Unique identifier for a contact
505
+ - **deal_id** (number): Unique identifier for a deal
506
+ - **task_id** (number): Unique identifier for a task
507
+
508
+ ## Advanced Usage
509
+
510
+ ### Combining Multiple Operations
511
+
512
+ Create powerful workflows by chaining operations:
513
+
514
+ ```
515
+ Trigger → Search Companies → Create Contact → Create Deal → Create Task
516
+ ```
517
+
518
+ ### Error Handling
519
+
520
+ Use n8n's built-in error handling:
521
+
522
+ 1. Enable **"Continue On Fail"** in node settings
523
+ 2. Add an **IF** node to check for errors
524
+ 3. Route errors to notification nodes (Email, Slack, etc.)
525
+
526
+ ### Data Transformation
527
+
528
+ Use n8n's **Code** or **Function** nodes to transform data between operations:
529
+
530
+ ```
531
+ List Contacts → Code Node (transform) → External API
532
+ ```
533
+
534
+ ## Development & Contribution
535
+
536
+ This is an official Clientify node. Contributions are welcome!
537
+
538
+ **Repository:** https://github.com/contacteitor/clientify_n8n
539
+
540
+ **Report Issues:** https://github.com/contacteitor/clientify_n8n/issues
541
+
542
+ **Documentation:** See the repository for full documentation
543
+
544
+ ## Support
545
+
546
+ - **Issues & Bugs:** https://github.com/contacteitor/clientify_n8n/issues
547
+ - **Email:** develop@clientify.com
548
+ - **Clientify Documentation:** https://mcp.clientify.com/docs
549
+
550
+ ## Version History
551
+
552
+ - **v0.2.0** (2025-10-02): Trigger support added
553
+ - **NEW:** Clientify Trigger node for webhook events
554
+ - 16 trigger events (contact, company, deal, task)
555
+ - Automatic workflow execution on Clientify events
556
+ - Flattened webhook payload for easy data access
557
+
558
+ - **v0.1.0** (2025-10-01): Initial release
559
+ - 26 MCP operations supported
560
+ - Dynamic field generation from MCP API
561
+ - Full CRUD operations for contacts, companies, deals, tasks
562
+ - Pipeline and user management
563
+
564
+ ## License
565
+
566
+ MIT License - see [LICENSE](LICENSE) file for details.
567
+
568
+ Copyright (c) 2025 Clientify
569
+
570
+ ---
571
+
572
+ **Made with ❤️ by Clientify**
573
+
574
+ *This is an official Clientify node. n8n is a trademark of its respective owner.*