n8n-nodes-aivencerealtycrm 1.0.9 → 1.1.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.
|
@@ -40,6 +40,10 @@ class AivenceRealty {
|
|
|
40
40
|
name: 'Property',
|
|
41
41
|
value: 'property',
|
|
42
42
|
},
|
|
43
|
+
{
|
|
44
|
+
name: 'Email',
|
|
45
|
+
value: 'email',
|
|
46
|
+
},
|
|
43
47
|
{
|
|
44
48
|
name: 'Maintenance Request',
|
|
45
49
|
value: 'maintenanceRequest',
|
|
@@ -124,7 +128,7 @@ class AivenceRealty {
|
|
|
124
128
|
},
|
|
125
129
|
// Lead Create/Update: JSON from previous node
|
|
126
130
|
{
|
|
127
|
-
displayName: '
|
|
131
|
+
displayName: 'Modo de entrada',
|
|
128
132
|
name: 'useJsonInput',
|
|
129
133
|
type: 'boolean',
|
|
130
134
|
displayOptions: {
|
|
@@ -134,7 +138,7 @@ class AivenceRealty {
|
|
|
134
138
|
},
|
|
135
139
|
},
|
|
136
140
|
default: false,
|
|
137
|
-
description: '
|
|
141
|
+
description: 'Usar JSON del nodo anterior (true) o campos individuales (false). Por defecto muestra campos individuales para mayor claridad.',
|
|
138
142
|
},
|
|
139
143
|
// ============================================
|
|
140
144
|
// LEAD CREATE/UPDATE FIELDS (Structured)
|
|
@@ -591,6 +595,88 @@ class AivenceRealty {
|
|
|
591
595
|
description: 'Búsqueda en lenguaje natural (ej: "Busco un apartamento de 3 dormitorios en Palermo con balcón")',
|
|
592
596
|
},
|
|
593
597
|
// ============================================
|
|
598
|
+
// EMAIL OPERATIONS
|
|
599
|
+
// ============================================
|
|
600
|
+
{
|
|
601
|
+
displayName: 'Operación',
|
|
602
|
+
name: 'operation',
|
|
603
|
+
type: 'options',
|
|
604
|
+
noDataExpression: true,
|
|
605
|
+
displayOptions: {
|
|
606
|
+
show: {
|
|
607
|
+
resource: ['email'],
|
|
608
|
+
},
|
|
609
|
+
},
|
|
610
|
+
options: [
|
|
611
|
+
{
|
|
612
|
+
name: 'Ingest',
|
|
613
|
+
value: 'ingest',
|
|
614
|
+
description: 'Ingestar email clasificado desde N8N',
|
|
615
|
+
action: 'Ingestar email',
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
name: 'List',
|
|
619
|
+
value: 'list',
|
|
620
|
+
description: 'Listar emails con filtros',
|
|
621
|
+
action: 'Listar emails',
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
name: 'Get',
|
|
625
|
+
value: 'get',
|
|
626
|
+
description: 'Obtener email por ID',
|
|
627
|
+
action: 'Obtener email',
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
name: 'Reply',
|
|
631
|
+
value: 'reply',
|
|
632
|
+
description: 'Enviar respuesta a un email',
|
|
633
|
+
action: 'Responder email',
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
name: 'Regenerate AI',
|
|
637
|
+
value: 'regenerateAi',
|
|
638
|
+
description: 'Regenerar respuesta IA con Gemini',
|
|
639
|
+
action: 'Regenerar IA',
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
name: 'Mark as Read',
|
|
643
|
+
value: 'markAsRead',
|
|
644
|
+
description: 'Marcar email como leído',
|
|
645
|
+
action: 'Marcar como leído',
|
|
646
|
+
},
|
|
647
|
+
],
|
|
648
|
+
default: 'ingest',
|
|
649
|
+
},
|
|
650
|
+
// Email ID para get, reply, regenerateAi, markAsRead
|
|
651
|
+
{
|
|
652
|
+
displayName: 'Email ID',
|
|
653
|
+
name: 'emailId',
|
|
654
|
+
type: 'string',
|
|
655
|
+
required: true,
|
|
656
|
+
displayOptions: {
|
|
657
|
+
show: {
|
|
658
|
+
resource: ['email'],
|
|
659
|
+
operation: ['get', 'reply', 'regenerateAi', 'markAsRead'],
|
|
660
|
+
},
|
|
661
|
+
},
|
|
662
|
+
default: '',
|
|
663
|
+
description: 'ID del email',
|
|
664
|
+
},
|
|
665
|
+
// Email Ingest: JSON from previous node
|
|
666
|
+
{
|
|
667
|
+
displayName: 'Modo de entrada',
|
|
668
|
+
name: 'useJsonInput',
|
|
669
|
+
type: 'boolean',
|
|
670
|
+
displayOptions: {
|
|
671
|
+
show: {
|
|
672
|
+
resource: ['email'],
|
|
673
|
+
operation: ['ingest', 'reply'],
|
|
674
|
+
},
|
|
675
|
+
},
|
|
676
|
+
default: true,
|
|
677
|
+
description: 'Usar JSON del nodo anterior (true) o campos individuales (false). Por defecto muestra campos individuales para mayor claridad.',
|
|
678
|
+
},
|
|
679
|
+
// ============================================
|
|
594
680
|
// MAINTENANCE REQUEST OPERATIONS
|
|
595
681
|
// ============================================
|
|
596
682
|
{
|
|
@@ -674,7 +760,7 @@ class AivenceRealty {
|
|
|
674
760
|
description: 'ID del contratista a asignar',
|
|
675
761
|
},
|
|
676
762
|
{
|
|
677
|
-
displayName: '
|
|
763
|
+
displayName: 'Modo de entrada',
|
|
678
764
|
name: 'useJsonInput',
|
|
679
765
|
type: 'boolean',
|
|
680
766
|
displayOptions: {
|
|
@@ -683,8 +769,8 @@ class AivenceRealty {
|
|
|
683
769
|
operation: ['create', 'update', 'addMessage'],
|
|
684
770
|
},
|
|
685
771
|
},
|
|
686
|
-
default:
|
|
687
|
-
description: '
|
|
772
|
+
default: false,
|
|
773
|
+
description: 'Usar JSON del nodo anterior (true) o campos individuales (false). Por defecto muestra campos individuales para mayor claridad.',
|
|
688
774
|
},
|
|
689
775
|
// ============================================
|
|
690
776
|
// CONTRACTOR OPERATIONS
|
|
@@ -744,7 +830,7 @@ class AivenceRealty {
|
|
|
744
830
|
},
|
|
745
831
|
// Contractor Create: JSON from previous node
|
|
746
832
|
{
|
|
747
|
-
displayName: '
|
|
833
|
+
displayName: 'Modo de entrada',
|
|
748
834
|
name: 'useJsonInput',
|
|
749
835
|
type: 'boolean',
|
|
750
836
|
displayOptions: {
|
|
@@ -753,7 +839,7 @@ class AivenceRealty {
|
|
|
753
839
|
operation: ['create'],
|
|
754
840
|
},
|
|
755
841
|
},
|
|
756
|
-
default:
|
|
842
|
+
default: false,
|
|
757
843
|
description: 'Si está activado, usará el JSON completo del nodo anterior con campos: name, email, phone, specialties, rating, availability',
|
|
758
844
|
},
|
|
759
845
|
// ============================================
|
|
@@ -808,7 +894,7 @@ class AivenceRealty {
|
|
|
808
894
|
},
|
|
809
895
|
// Tenant Create: JSON from previous node
|
|
810
896
|
{
|
|
811
|
-
displayName: '
|
|
897
|
+
displayName: 'Modo de entrada',
|
|
812
898
|
name: 'useJsonInput',
|
|
813
899
|
type: 'boolean',
|
|
814
900
|
displayOptions: {
|
|
@@ -817,7 +903,7 @@ class AivenceRealty {
|
|
|
817
903
|
operation: ['create'],
|
|
818
904
|
},
|
|
819
905
|
},
|
|
820
|
-
default:
|
|
906
|
+
default: false,
|
|
821
907
|
description: 'Si está activado, usará el JSON completo del nodo anterior con campos: name, email, phone, property_id, lease_start, lease_end, monthly_rent',
|
|
822
908
|
},
|
|
823
909
|
// ============================================
|
|
@@ -868,7 +954,7 @@ class AivenceRealty {
|
|
|
868
954
|
default: 'list',
|
|
869
955
|
},
|
|
870
956
|
{
|
|
871
|
-
displayName: '
|
|
957
|
+
displayName: 'Modo de entrada',
|
|
872
958
|
name: 'useJsonInput',
|
|
873
959
|
type: 'boolean',
|
|
874
960
|
displayOptions: {
|
|
@@ -877,8 +963,8 @@ class AivenceRealty {
|
|
|
877
963
|
operation: ['create'],
|
|
878
964
|
},
|
|
879
965
|
},
|
|
880
|
-
default:
|
|
881
|
-
description: '
|
|
966
|
+
default: false,
|
|
967
|
+
description: 'Usar JSON del nodo anterior (true) o campos individuales (false). Por defecto muestra campos individuales para mayor claridad.',
|
|
882
968
|
},
|
|
883
969
|
// Appointment ID para get, updateStatus y delete
|
|
884
970
|
{
|
|
@@ -1159,6 +1245,63 @@ class AivenceRealty {
|
|
|
1159
1245
|
}
|
|
1160
1246
|
}
|
|
1161
1247
|
// ============================================
|
|
1248
|
+
// EMAIL RESOURCE
|
|
1249
|
+
// ============================================
|
|
1250
|
+
else if (resource === 'email') {
|
|
1251
|
+
if (operation === 'ingest') {
|
|
1252
|
+
const useJsonInput = this.getNodeParameter('useJsonInput', i, true);
|
|
1253
|
+
const body = useJsonInput ? items[i].json : {};
|
|
1254
|
+
responseData = await this.helpers.httpRequest({
|
|
1255
|
+
method: 'POST',
|
|
1256
|
+
url: `${baseUrl}/api/v1/emails/ingest`,
|
|
1257
|
+
body,
|
|
1258
|
+
json: true,
|
|
1259
|
+
});
|
|
1260
|
+
}
|
|
1261
|
+
else if (operation === 'list') {
|
|
1262
|
+
responseData = await this.helpers.httpRequest({
|
|
1263
|
+
method: 'GET',
|
|
1264
|
+
url: `${baseUrl}/api/v1/emails`,
|
|
1265
|
+
json: true,
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
else if (operation === 'get') {
|
|
1269
|
+
const emailId = this.getNodeParameter('emailId', i);
|
|
1270
|
+
responseData = await this.helpers.httpRequest({
|
|
1271
|
+
method: 'GET',
|
|
1272
|
+
url: `${baseUrl}/api/v1/emails/${emailId}`,
|
|
1273
|
+
json: true,
|
|
1274
|
+
});
|
|
1275
|
+
}
|
|
1276
|
+
else if (operation === 'reply') {
|
|
1277
|
+
const emailId = this.getNodeParameter('emailId', i);
|
|
1278
|
+
const useJsonInput = this.getNodeParameter('useJsonInput', i, true);
|
|
1279
|
+
const body = useJsonInput ? items[i].json : {};
|
|
1280
|
+
responseData = await this.helpers.httpRequest({
|
|
1281
|
+
method: 'POST',
|
|
1282
|
+
url: `${baseUrl}/api/v1/emails/${emailId}/reply`,
|
|
1283
|
+
body,
|
|
1284
|
+
json: true,
|
|
1285
|
+
});
|
|
1286
|
+
}
|
|
1287
|
+
else if (operation === 'regenerateAi') {
|
|
1288
|
+
const emailId = this.getNodeParameter('emailId', i);
|
|
1289
|
+
responseData = await this.helpers.httpRequest({
|
|
1290
|
+
method: 'POST',
|
|
1291
|
+
url: `${baseUrl}/api/v1/emails/${emailId}/regenerate-ai`,
|
|
1292
|
+
json: true,
|
|
1293
|
+
});
|
|
1294
|
+
}
|
|
1295
|
+
else if (operation === 'markAsRead') {
|
|
1296
|
+
const emailId = this.getNodeParameter('emailId', i);
|
|
1297
|
+
responseData = await this.helpers.httpRequest({
|
|
1298
|
+
method: 'PATCH',
|
|
1299
|
+
url: `${baseUrl}/api/v1/emails/${emailId}/mark-read`,
|
|
1300
|
+
json: true,
|
|
1301
|
+
});
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
// ============================================
|
|
1162
1305
|
// MAINTENANCE REQUEST RESOURCE
|
|
1163
1306
|
// ============================================
|
|
1164
1307
|
else if (resource === 'maintenanceRequest') {
|