@acrewity/n8n-nodes-acrewity 0.1.6 → 0.1.8

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.
@@ -38,7 +38,7 @@ class Acrewity {
38
38
  { name: 'HTML to PDF', value: 'html_to_pdf', description: 'Convert HTML to PDF documents' },
39
39
  { name: 'Image Converter', value: 'image_converter', description: 'Convert images between formats' },
40
40
  { name: 'JSON Schema Validator', value: 'json_schema_validator', description: 'Validate JSON against schemas' },
41
- { name: 'JSON to Excel', value: 'excel_editor', description: 'Convert JSON to Excel files' },
41
+ { name: 'JSON to Excel', value: 'json_to_excel', description: 'Convert JSON to Excel files' },
42
42
  { name: 'Markdown Table', value: 'markdown_table_generator', description: 'Generate Markdown tables' },
43
43
  { name: 'Markdown to HTML', value: 'markdown_to_html', description: 'Convert Markdown to HTML' },
44
44
  { name: 'PDF Extract Page', value: 'pdf_extract_page', description: 'Extract pages from PDFs' },
@@ -257,9 +257,9 @@ class Acrewity {
257
257
  noDataExpression: true,
258
258
  displayOptions: { show: { resource: ['qr_code_generator'] } },
259
259
  options: [
260
- { name: 'Generate QR Code', value: 'generate_qr', action: 'Generate a QR code' },
260
+ { name: 'Generate QR Code', value: 'generate', action: 'Generate a QR code' },
261
261
  ],
262
- default: 'generate_qr',
262
+ default: 'generate',
263
263
  },
264
264
  {
265
265
  displayName: 'Text/URL',
@@ -383,9 +383,9 @@ class Acrewity {
383
383
  noDataExpression: true,
384
384
  displayOptions: { show: { resource: ['html_to_pdf'] } },
385
385
  options: [
386
- { name: 'Convert to PDF', value: 'convert_pdf', action: 'Convert HTML to PDF' },
386
+ { name: 'Convert to PDF', value: 'convert', action: 'Convert HTML to PDF' },
387
387
  ],
388
- default: 'convert_pdf',
388
+ default: 'convert',
389
389
  },
390
390
  {
391
391
  displayName: 'HTML Content',
@@ -474,9 +474,9 @@ class Acrewity {
474
474
  noDataExpression: true,
475
475
  displayOptions: { show: { resource: ['image_converter'] } },
476
476
  options: [
477
- { name: 'Convert Image', value: 'convert_image', action: 'Convert image format' },
477
+ { name: 'Convert Image', value: 'convert', action: 'Convert image format' },
478
478
  ],
479
- default: 'convert_image',
479
+ default: 'convert',
480
480
  },
481
481
  {
482
482
  displayName: 'Image URL',
@@ -496,6 +496,7 @@ class Acrewity {
496
496
  { name: 'JPEG', value: 'jpeg' },
497
497
  { name: 'PNG', value: 'png' },
498
498
  { name: 'WebP', value: 'webp' },
499
+ { name: 'ICO', value: 'ico' },
499
500
  ],
500
501
  default: 'jpeg',
501
502
  },
@@ -503,10 +504,28 @@ class Acrewity {
503
504
  displayName: 'Quality',
504
505
  name: 'quality',
505
506
  type: 'number',
506
- displayOptions: { show: { resource: ['image_converter'] } },
507
+ displayOptions: { show: { resource: ['image_converter'], format: ['jpeg', 'png', 'webp'] } },
507
508
  default: 85,
508
509
  typeOptions: { minValue: 1, maxValue: 100 },
509
- description: 'Output quality (1-100)',
510
+ description: 'Output quality (1-100). Does not apply to ICO format.',
511
+ },
512
+ {
513
+ displayName: 'Width',
514
+ name: 'width',
515
+ type: 'number',
516
+ displayOptions: { show: { resource: ['image_converter'] } },
517
+ default: 0,
518
+ typeOptions: { minValue: 0 },
519
+ description: 'Output width in pixels (0 = keep original)',
520
+ },
521
+ {
522
+ displayName: 'Height',
523
+ name: 'height',
524
+ type: 'number',
525
+ displayOptions: { show: { resource: ['image_converter'] } },
526
+ default: 0,
527
+ typeOptions: { minValue: 0 },
528
+ description: 'Output height in pixels (0 = keep original)',
510
529
  },
511
530
  // ============ Excel to JSON ============
512
531
  {
@@ -516,9 +535,12 @@ class Acrewity {
516
535
  noDataExpression: true,
517
536
  displayOptions: { show: { resource: ['excel_to_json'] } },
518
537
  options: [
519
- { name: 'Convert to JSON', value: 'convert', action: 'Convert excel to json' },
538
+ { name: 'List Sheets', value: 'list_sheets', action: 'List all sheet names in excel file' },
539
+ { name: 'Read Excel', value: 'read_excel', action: 'Read entire excel file' },
540
+ { name: 'Read Sheet', value: 'read_sheet', action: 'Read specific sheet from excel file' },
541
+ { name: 'Get Range', value: 'get_range', action: 'Get specific cell range from excel sheet' },
520
542
  ],
521
- default: 'convert',
543
+ default: 'read_excel',
522
544
  },
523
545
  {
524
546
  displayName: 'Excel File (Base64)',
@@ -534,9 +556,26 @@ class Acrewity {
534
556
  displayName: 'Sheet Name',
535
557
  name: 'sheetName',
536
558
  type: 'string',
537
- displayOptions: { show: { resource: ['excel_to_json'] } },
559
+ displayOptions: { show: { resource: ['excel_to_json'], operation: ['read_sheet', 'get_range'] } },
538
560
  default: 'Sheet1',
539
- description: 'Name of the sheet to convert',
561
+ description: 'Name of the sheet to read',
562
+ },
563
+ {
564
+ displayName: 'Cell Range',
565
+ name: 'range',
566
+ type: 'string',
567
+ displayOptions: { show: { resource: ['excel_to_json'], operation: ['get_range'] } },
568
+ default: 'A1:C10',
569
+ required: true,
570
+ description: 'Cell range in A1 notation (e.g., "A1:C10", "B2", "A:A" for entire column)',
571
+ },
572
+ {
573
+ displayName: 'Include Detected Tables',
574
+ name: 'includeDetectedTables',
575
+ type: 'boolean',
576
+ displayOptions: { show: { resource: ['excel_to_json'], operation: ['read_excel', 'read_sheet'] } },
577
+ default: true,
578
+ description: 'Whether to include intelligently detected tables in output',
540
579
  },
541
580
  // ============ JSON to Excel ============
542
581
  {
@@ -544,7 +583,7 @@ class Acrewity {
544
583
  name: 'operation',
545
584
  type: 'options',
546
585
  noDataExpression: true,
547
- displayOptions: { show: { resource: ['excel_editor'] } },
586
+ displayOptions: { show: { resource: ['json_to_excel'] } },
548
587
  options: [
549
588
  { name: 'Create Excel', value: 'create_excel', action: 'Create excel from json' },
550
589
  ],
@@ -555,7 +594,7 @@ class Acrewity {
555
594
  name: 'data',
556
595
  type: 'string',
557
596
  typeOptions: { rows: 6 },
558
- displayOptions: { show: { resource: ['excel_editor'] } },
597
+ displayOptions: { show: { resource: ['json_to_excel'] } },
559
598
  default: '[{"Name": "John", "Email": "john@example.com"}]',
560
599
  required: true,
561
600
  description: 'JSON array of objects to convert to Excel',
@@ -564,7 +603,7 @@ class Acrewity {
564
603
  displayName: 'Sheet Name',
565
604
  name: 'sheetName',
566
605
  type: 'string',
567
- displayOptions: { show: { resource: ['excel_editor'] } },
606
+ displayOptions: { show: { resource: ['json_to_excel'] } },
568
607
  default: 'Sheet1',
569
608
  description: 'Name of the Excel sheet',
570
609
  },
@@ -576,29 +615,19 @@ class Acrewity {
576
615
  noDataExpression: true,
577
616
  displayOptions: { show: { resource: ['pdf_merge'] } },
578
617
  options: [
579
- { name: 'Merge PDFs', value: 'merge', action: 'Merge two PDF files' },
618
+ { name: 'Merge PDFs', value: 'merge', action: 'Merge multiple PDF files' },
580
619
  ],
581
620
  default: 'merge',
582
621
  },
583
622
  {
584
- displayName: 'Source PDF (Base64)',
585
- name: 'source_pdf',
623
+ displayName: 'PDF Files (JSON Array)',
624
+ name: 'files',
586
625
  type: 'string',
587
- typeOptions: { rows: 4 },
588
- displayOptions: { show: { resource: ['pdf_merge'] } },
589
- default: '',
590
- required: true,
591
- description: 'First PDF file (Base64 encoded)',
592
- },
593
- {
594
- displayName: 'Target PDF (Base64)',
595
- name: 'target_pdf',
596
- type: 'string',
597
- typeOptions: { rows: 4 },
626
+ typeOptions: { rows: 6 },
598
627
  displayOptions: { show: { resource: ['pdf_merge'] } },
599
- default: '',
628
+ default: '[]',
600
629
  required: true,
601
- description: 'Second PDF file to append (Base64 encoded)',
630
+ description: 'JSON array of Base64-encoded PDF files to merge (e.g., ["base64data1", "base64data2"])',
602
631
  },
603
632
  // ============ PDF Extract Page ============
604
633
  {
@@ -692,15 +721,19 @@ class Acrewity {
692
721
  noDataExpression: true,
693
722
  displayOptions: { show: { resource: ['email_access'] } },
694
723
  options: [
695
- { name: 'Send Email', value: 'send_email', action: 'Send an email' },
724
+ { name: 'Send Email', value: 'send_email', action: 'Send an email via SMTP' },
725
+ { name: 'Fetch Emails (IMAP)', value: 'fetch_emails', action: 'Fetch emails from IMAP server' },
726
+ { name: 'Fetch Emails (POP3)', value: 'fetch_emails_pop3', action: 'Fetch emails from POP3 server' },
727
+ { name: 'Mark as Read', value: 'mark_as_read', action: 'Mark email as read via IMAP' },
696
728
  ],
697
729
  default: 'send_email',
698
730
  },
731
+ // Send Email fields
699
732
  {
700
733
  displayName: 'To',
701
734
  name: 'to',
702
735
  type: 'string',
703
- displayOptions: { show: { resource: ['email_access'] } },
736
+ displayOptions: { show: { resource: ['email_access'], operation: ['send_email'] } },
704
737
  default: '',
705
738
  required: true,
706
739
  description: 'Recipient email address',
@@ -709,7 +742,7 @@ class Acrewity {
709
742
  displayName: 'Subject',
710
743
  name: 'subject',
711
744
  type: 'string',
712
- displayOptions: { show: { resource: ['email_access'] } },
745
+ displayOptions: { show: { resource: ['email_access'], operation: ['send_email'] } },
713
746
  default: '',
714
747
  required: true,
715
748
  description: 'Email subject',
@@ -719,7 +752,7 @@ class Acrewity {
719
752
  name: 'text',
720
753
  type: 'string',
721
754
  typeOptions: { rows: 4 },
722
- displayOptions: { show: { resource: ['email_access'] } },
755
+ displayOptions: { show: { resource: ['email_access'], operation: ['send_email'] } },
723
756
  default: '',
724
757
  description: 'Plain text email body',
725
758
  },
@@ -727,7 +760,7 @@ class Acrewity {
727
760
  displayName: 'SMTP Host',
728
761
  name: 'smtp_host',
729
762
  type: 'string',
730
- displayOptions: { show: { resource: ['email_access'] } },
763
+ displayOptions: { show: { resource: ['email_access'], operation: ['send_email'] } },
731
764
  default: '',
732
765
  required: true,
733
766
  placeholder: 'smtp.example.com',
@@ -737,7 +770,7 @@ class Acrewity {
737
770
  displayName: 'SMTP Port',
738
771
  name: 'smtp_port',
739
772
  type: 'number',
740
- displayOptions: { show: { resource: ['email_access'] } },
773
+ displayOptions: { show: { resource: ['email_access'], operation: ['send_email'] } },
741
774
  default: 587,
742
775
  description: 'SMTP server port',
743
776
  },
@@ -745,7 +778,7 @@ class Acrewity {
745
778
  displayName: 'SMTP User',
746
779
  name: 'smtp_user',
747
780
  type: 'string',
748
- displayOptions: { show: { resource: ['email_access'] } },
781
+ displayOptions: { show: { resource: ['email_access'], operation: ['send_email'] } },
749
782
  default: '',
750
783
  required: true,
751
784
  description: 'SMTP username/email',
@@ -755,7 +788,7 @@ class Acrewity {
755
788
  name: 'smtp_pass',
756
789
  type: 'string',
757
790
  typeOptions: { password: true },
758
- displayOptions: { show: { resource: ['email_access'] } },
791
+ displayOptions: { show: { resource: ['email_access'], operation: ['send_email'] } },
759
792
  default: '',
760
793
  required: true,
761
794
  },
@@ -763,11 +796,111 @@ class Acrewity {
763
796
  displayName: 'From Email',
764
797
  name: 'from',
765
798
  type: 'string',
766
- displayOptions: { show: { resource: ['email_access'] } },
799
+ displayOptions: { show: { resource: ['email_access'], operation: ['send_email'] } },
767
800
  default: '',
768
801
  required: true,
769
802
  description: 'Sender email address',
770
803
  },
804
+ // IMAP fields (fetch_emails, mark_as_read)
805
+ {
806
+ displayName: 'IMAP Host',
807
+ name: 'imap_host',
808
+ type: 'string',
809
+ displayOptions: { show: { resource: ['email_access'], operation: ['fetch_emails', 'mark_as_read'] } },
810
+ default: '',
811
+ required: true,
812
+ placeholder: 'imap.example.com',
813
+ description: 'IMAP server hostname',
814
+ },
815
+ {
816
+ displayName: 'IMAP Port',
817
+ name: 'imap_port',
818
+ type: 'number',
819
+ displayOptions: { show: { resource: ['email_access'], operation: ['fetch_emails', 'mark_as_read'] } },
820
+ default: 993,
821
+ description: 'IMAP server port',
822
+ },
823
+ {
824
+ displayName: 'IMAP User',
825
+ name: 'imap_user',
826
+ type: 'string',
827
+ displayOptions: { show: { resource: ['email_access'], operation: ['fetch_emails', 'mark_as_read'] } },
828
+ default: '',
829
+ required: true,
830
+ description: 'IMAP username/email',
831
+ },
832
+ {
833
+ displayName: 'IMAP Password',
834
+ name: 'imap_pass',
835
+ type: 'string',
836
+ typeOptions: { password: true },
837
+ displayOptions: { show: { resource: ['email_access'], operation: ['fetch_emails', 'mark_as_read'] } },
838
+ default: '',
839
+ required: true,
840
+ },
841
+ {
842
+ displayName: 'Folder',
843
+ name: 'folder',
844
+ type: 'string',
845
+ displayOptions: { show: { resource: ['email_access'], operation: ['fetch_emails'] } },
846
+ default: 'INBOX',
847
+ description: 'IMAP folder to read from',
848
+ },
849
+ {
850
+ displayName: 'Limit',
851
+ name: 'limit',
852
+ type: 'number',
853
+ displayOptions: { show: { resource: ['email_access'], operation: ['fetch_emails', 'fetch_emails_pop3'] } },
854
+ default: 50,
855
+ typeOptions: { minValue: 1, maxValue: 100 },
856
+ description: 'Max number of results to return',
857
+ },
858
+ {
859
+ displayName: 'Email UID',
860
+ name: 'email_uid',
861
+ type: 'string',
862
+ displayOptions: { show: { resource: ['email_access'], operation: ['mark_as_read'] } },
863
+ default: '',
864
+ required: true,
865
+ description: 'UID of the email to mark as read',
866
+ },
867
+ // POP3 fields
868
+ {
869
+ displayName: 'POP3 Host',
870
+ name: 'pop3_host',
871
+ type: 'string',
872
+ displayOptions: { show: { resource: ['email_access'], operation: ['fetch_emails_pop3'] } },
873
+ default: '',
874
+ required: true,
875
+ placeholder: 'pop.example.com',
876
+ description: 'POP3 server hostname',
877
+ },
878
+ {
879
+ displayName: 'POP3 Port',
880
+ name: 'pop3_port',
881
+ type: 'number',
882
+ displayOptions: { show: { resource: ['email_access'], operation: ['fetch_emails_pop3'] } },
883
+ default: 995,
884
+ description: 'POP3 server port',
885
+ },
886
+ {
887
+ displayName: 'POP3 User',
888
+ name: 'pop3_user',
889
+ type: 'string',
890
+ displayOptions: { show: { resource: ['email_access'], operation: ['fetch_emails_pop3'] } },
891
+ default: '',
892
+ required: true,
893
+ description: 'POP3 username/email',
894
+ },
895
+ {
896
+ displayName: 'POP3 Password',
897
+ name: 'pop3_pass',
898
+ type: 'string',
899
+ typeOptions: { password: true },
900
+ displayOptions: { show: { resource: ['email_access'], operation: ['fetch_emails_pop3'] } },
901
+ default: '',
902
+ required: true,
903
+ },
771
904
  ],
772
905
  };
773
906
  }
@@ -849,22 +982,40 @@ class Acrewity {
849
982
  if (resource === 'image_converter') {
850
983
  parameters.imageUrl = this.getNodeParameter('imageUrl', i);
851
984
  parameters.format = this.getNodeParameter('format', i);
852
- parameters.quality = this.getNodeParameter('quality', i);
985
+ // Quality only applies to non-ICO formats
986
+ if (parameters.format !== 'ico') {
987
+ parameters.quality = this.getNodeParameter('quality', i);
988
+ }
989
+ const width = this.getNodeParameter('width', i);
990
+ const height = this.getNodeParameter('height', i);
991
+ if (width > 0) {
992
+ parameters.width = width;
993
+ }
994
+ if (height > 0) {
995
+ parameters.height = height;
996
+ }
853
997
  }
854
998
  // Excel to JSON
855
999
  if (resource === 'excel_to_json') {
856
1000
  parameters.file = this.getNodeParameter('file', i);
857
- parameters.sheetName = this.getNodeParameter('sheetName', i);
1001
+ if (operation === 'read_sheet' || operation === 'get_range') {
1002
+ parameters.sheetName = this.getNodeParameter('sheetName', i);
1003
+ }
1004
+ if (operation === 'get_range') {
1005
+ parameters.range = this.getNodeParameter('range', i);
1006
+ }
1007
+ if (operation === 'read_excel' || operation === 'read_sheet') {
1008
+ parameters.includeDetectedTables = this.getNodeParameter('includeDetectedTables', i);
1009
+ }
858
1010
  }
859
1011
  // JSON to Excel
860
- if (resource === 'excel_editor') {
1012
+ if (resource === 'json_to_excel') {
861
1013
  parameters.data = JSON.parse(this.getNodeParameter('data', i));
862
1014
  parameters.sheetName = this.getNodeParameter('sheetName', i);
863
1015
  }
864
1016
  // PDF Merge
865
1017
  if (resource === 'pdf_merge') {
866
- parameters.source_pdf = this.getNodeParameter('source_pdf', i);
867
- parameters.target_pdf = this.getNodeParameter('target_pdf', i);
1018
+ parameters.files = JSON.parse(this.getNodeParameter('files', i));
868
1019
  }
869
1020
  // PDF Extract Page
870
1021
  if (resource === 'pdf_extract_page') {
@@ -884,14 +1035,38 @@ class Acrewity {
884
1035
  }
885
1036
  // Email Access
886
1037
  if (resource === 'email_access') {
887
- parameters.to = this.getNodeParameter('to', i);
888
- parameters.subject = this.getNodeParameter('subject', i);
889
- parameters.text = this.getNodeParameter('text', i);
890
- parameters.smtp_host = this.getNodeParameter('smtp_host', i);
891
- parameters.smtp_port = this.getNodeParameter('smtp_port', i);
892
- parameters.smtp_user = this.getNodeParameter('smtp_user', i);
893
- parameters.smtp_pass = this.getNodeParameter('smtp_pass', i);
894
- parameters.from = this.getNodeParameter('from', i);
1038
+ if (operation === 'send_email') {
1039
+ parameters.to = this.getNodeParameter('to', i);
1040
+ parameters.subject = this.getNodeParameter('subject', i);
1041
+ parameters.text = this.getNodeParameter('text', i);
1042
+ parameters.smtp_host = this.getNodeParameter('smtp_host', i);
1043
+ parameters.smtp_port = this.getNodeParameter('smtp_port', i);
1044
+ parameters.smtp_user = this.getNodeParameter('smtp_user', i);
1045
+ parameters.smtp_pass = this.getNodeParameter('smtp_pass', i);
1046
+ parameters.from = this.getNodeParameter('from', i);
1047
+ }
1048
+ if (operation === 'fetch_emails') {
1049
+ parameters.imap_host = this.getNodeParameter('imap_host', i);
1050
+ parameters.imap_port = this.getNodeParameter('imap_port', i);
1051
+ parameters.imap_user = this.getNodeParameter('imap_user', i);
1052
+ parameters.imap_pass = this.getNodeParameter('imap_pass', i);
1053
+ parameters.folder = this.getNodeParameter('folder', i);
1054
+ parameters.limit = this.getNodeParameter('limit', i);
1055
+ }
1056
+ if (operation === 'mark_as_read') {
1057
+ parameters.imap_host = this.getNodeParameter('imap_host', i);
1058
+ parameters.imap_port = this.getNodeParameter('imap_port', i);
1059
+ parameters.imap_user = this.getNodeParameter('imap_user', i);
1060
+ parameters.imap_pass = this.getNodeParameter('imap_pass', i);
1061
+ parameters.email_uid = this.getNodeParameter('email_uid', i);
1062
+ }
1063
+ if (operation === 'fetch_emails_pop3') {
1064
+ parameters.pop3_host = this.getNodeParameter('pop3_host', i);
1065
+ parameters.pop3_port = this.getNodeParameter('pop3_port', i);
1066
+ parameters.pop3_user = this.getNodeParameter('pop3_user', i);
1067
+ parameters.pop3_pass = this.getNodeParameter('pop3_pass', i);
1068
+ parameters.limit = this.getNodeParameter('limit', i);
1069
+ }
895
1070
  }
896
1071
  // Make API request
897
1072
  const response = await this.helpers.httpRequest({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acrewity/n8n-nodes-acrewity",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "n8n community node for Acrewity API - A unified API platform with 20+ utility services including PDF processing, data conversion, QR codes, and more",
5
5
  "license": "MIT",
6
6
  "homepage": "https://acrewity.com",