@connectorx/n8n-nodes-cortex 0.1.41 → 0.1.42

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.
@@ -644,7 +644,7 @@ class Cortex {
644
644
  const response = await this.helpers.request(options);
645
645
  const data = Array.isArray(response) ? response : (response.data || response.users || []);
646
646
  return data.map((u) => ({
647
- name: u.name || u.email || u.id || u.user_id || 'Unknown User',
647
+ name: u.is_ai_agent ? `\u{1F916} ${u.name || 'AI Agent'}` : (u.name || u.email || u.id || u.user_id || 'Unknown User'),
648
648
  value: u.id || u.user_id
649
649
  })).filter(u => u.value);
650
650
  }
@@ -14,8 +14,8 @@ class CortexTrigger {
14
14
  name: 'Cortex Trigger',
15
15
  },
16
16
  inputs: [],
17
- outputs: ['main', 'main'],
18
- outputNames: ['Messages', 'Prompt Updates'],
17
+ outputs: ['main', 'main', 'main'],
18
+ outputNames: ['Messages', 'Prompt Updates', 'Conversation Assigned'],
19
19
  properties: [
20
20
  {
21
21
  displayName: 'Webhook Secret',
@@ -34,6 +34,7 @@ class CortexTrigger {
34
34
  { name: 'All Events', value: '*' },
35
35
  { name: 'New Message', value: 'new_message' },
36
36
  { name: 'Agent Prompt Updated', value: 'agent_prompt_updated' },
37
+ { name: 'Conversation Assigned', value: 'ai_assignment' },
37
38
  ],
38
39
  default: ['*'],
39
40
  description: 'Which events to listen for. Select specific events or "All Events" to receive everything.',
@@ -114,10 +115,13 @@ class CortexTrigger {
114
115
  }
115
116
  const outputData = this.helpers.returnJsonArray(body);
116
117
  if (eventType === 'agent_prompt_updated') {
117
- return { workflowData: [[], outputData] };
118
+ return { workflowData: [[], outputData, []] };
119
+ }
120
+ else if (eventType === 'ai_assignment') {
121
+ return { workflowData: [[], [], outputData] };
118
122
  }
119
123
  else {
120
- return { workflowData: [outputData, []] };
124
+ return { workflowData: [outputData, [], []] };
121
125
  }
122
126
  }
123
127
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectorx/n8n-nodes-cortex",
3
- "version": "0.1.41",
3
+ "version": "0.1.42",
4
4
  "description": "n8n nodes for Cortex API",
5
5
  "keywords": [
6
6
  "n8n-community-node-package"