n8n-nodes-datatable-manager-select 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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Thomas Braun
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,432 @@
1
+ # n8n-nodes-datatable-manager-select
2
+
3
+ Ein n8n Community Node zur Verwaltung von internen Data Tables mit benutzerfreundlicher Namensauswahl per Dropdown.
4
+
5
+ An n8n community node for managing internal Data Tables with user-friendly name-based dropdown selection.
6
+
7
+ ---
8
+
9
+ ## Inhaltsverzeichnis / Table of Contents
10
+
11
+ - [Deutsch](#deutsch)
12
+ - [Beschreibung](#beschreibung)
13
+ - [Features](#features)
14
+ - [Installation](#installation)
15
+ - [Verwendung](#verwendung)
16
+ - [Screenshots](#screenshots)
17
+ - [Beispiele](#beispiele)
18
+ - [English](#english)
19
+ - [Description](#description)
20
+ - [Features](#features-1)
21
+ - [Installation](#installation-1)
22
+ - [Usage](#usage)
23
+ - [Screenshots](#screenshots-1)
24
+ - [Examples](#examples)
25
+ - [License](#license)
26
+
27
+ ---
28
+
29
+ # Deutsch
30
+
31
+ ## Beschreibung
32
+
33
+ Dieser n8n Community Node ermoeglicht die vollstaendige Verwaltung von n8n internen Data Tables direkt aus Ihren Workflows heraus. Im Gegensatz zur Standard-Version werden Tabellen und Spalten ueber benutzerfreundliche Dropdown-Menues mit Namen ausgewaehlt - keine manuelle Eingabe von IDs mehr erforderlich!
34
+
35
+ ### Hauptvorteile gegenueber der Basis-Version:
36
+
37
+ - **Namensbasierte Auswahl**: Waehlen Sie Tabellen und Spalten aus Dropdown-Listen statt IDs einzugeben
38
+ - **Dynamisches Laden**: Die verfuegbaren Optionen werden live aus Ihrer n8n-Instanz geladen
39
+ - **Fehlerreduzierung**: Keine Tippfehler bei IDs mehr moeglich
40
+ - **Bessere Uebersicht**: Sehen Sie sofort alle verfuegbaren Tabellen und Spalten
41
+
42
+ ## Features
43
+
44
+ ### Tabellen-Operationen
45
+ - **Create**: Neue Data Tables mit benutzerdefinierten Spalten erstellen
46
+ - **Get All**: Alle vorhandenen Data Tables auflisten
47
+ - **Update**: Tabellen umbenennen (Auswahl per Dropdown)
48
+ - **Delete**: Tabellen loeschen (Auswahl per Dropdown)
49
+
50
+ ### Spalten-Operationen
51
+ - **Add**: Neue Spalten zu bestehenden Tabellen hinzufuegen
52
+ - **Get All**: Alle Spalten einer Tabelle auflisten
53
+ - **Rename**: Spalten umbenennen (Auswahl per Dropdown)
54
+ - **Delete**: Spalten loeschen (Auswahl per Dropdown)
55
+
56
+ ### Unterstuetzte Spaltentypen
57
+ - String (Text)
58
+ - Number (Zahl)
59
+ - Boolean (Ja/Nein)
60
+ - Date (Datum)
61
+
62
+ ## Installation
63
+
64
+ ### Ueber die n8n Community Nodes (empfohlen)
65
+
66
+ 1. Oeffnen Sie n8n
67
+ 2. Gehen Sie zu **Settings** > **Community Nodes**
68
+ 3. Klicken Sie auf **Install**
69
+ 4. Geben Sie ein: `n8n-nodes-datatable-manager-select`
70
+ 5. Klicken Sie auf **Install**
71
+ 6. Starten Sie n8n neu
72
+
73
+ ### Manuelle Installation
74
+
75
+ ```bash
76
+ # Navigieren Sie zum n8n-Installationsverzeichnis
77
+ cd ~/.n8n
78
+
79
+ # Erstellen Sie den custom-Ordner falls nicht vorhanden
80
+ mkdir -p custom
81
+
82
+ # Installieren Sie den Node
83
+ npm install n8n-nodes-datatable-manager-select
84
+
85
+ # Starten Sie n8n neu
86
+ ```
87
+
88
+ ### Docker
89
+
90
+ Fuegen Sie das Paket zu Ihrer Docker-Konfiguration hinzu:
91
+
92
+ ```yaml
93
+ environment:
94
+ - N8N_CUSTOM_EXTENSIONS=n8n-nodes-datatable-manager-select
95
+ ```
96
+
97
+ Oder installieren Sie es im laufenden Container:
98
+
99
+ ```bash
100
+ docker exec -it n8n npm install n8n-nodes-datatable-manager-select
101
+ docker restart n8n
102
+ ```
103
+
104
+ ## Verwendung
105
+
106
+ ### Verbindungseinstellungen
107
+
108
+ Jeder Node benoetigt folgende Einstellungen:
109
+
110
+ | Parameter | Beschreibung | Beispiel |
111
+ |-----------|-------------|----------|
112
+ | Base URL | Die URL Ihrer n8n-Instanz | `http://localhost:5678` |
113
+ | Email | Ihr n8n Login-Email | `admin@example.com` |
114
+ | Password | Ihr n8n Login-Passwort | `********` |
115
+
116
+ ### Tabelle erstellen
117
+
118
+ 1. Waehlen Sie **Resource**: Table
119
+ 2. Waehlen Sie **Operation**: Create
120
+ 3. Geben Sie den **Table Name** ein
121
+ 4. Fuegen Sie Spalten hinzu (optional)
122
+ - Column Name: Name der Spalte
123
+ - Column Type: String, Number, Boolean oder Date
124
+
125
+ ### Tabelle aktualisieren/loeschen
126
+
127
+ 1. Waehlen Sie **Resource**: Table
128
+ 2. Waehlen Sie **Operation**: Update oder Delete
129
+ 3. **Waehlen Sie die Tabelle aus dem Dropdown** - hier werden alle verfuegbaren Tabellen angezeigt!
130
+ 4. Bei Update: Geben Sie den neuen Namen ein
131
+
132
+ ### Spalte hinzufuegen
133
+
134
+ 1. Waehlen Sie **Resource**: Column
135
+ 2. Waehlen Sie **Operation**: Add
136
+ 3. **Waehlen Sie die Tabelle aus dem Dropdown**
137
+ 4. Geben Sie den Spaltennamen und -typ ein
138
+
139
+ ### Spalte umbenennen/loeschen
140
+
141
+ 1. Waehlen Sie **Resource**: Column
142
+ 2. Waehlen Sie **Operation**: Rename oder Delete
143
+ 3. **Waehlen Sie die Tabelle aus dem Dropdown**
144
+ 4. **Waehlen Sie die Spalte aus dem Dropdown** - hier werden alle Spalten der gewaehlten Tabelle angezeigt!
145
+ 5. Bei Rename: Geben Sie den neuen Namen ein
146
+
147
+ ## Screenshots
148
+
149
+ ### Node-Uebersicht
150
+ [Screenshot: Der Data Table Manager Node in der n8n Node-Palette mit dem charakteristischen Tabellen-Icon]
151
+
152
+ ### Tabellen-Dropdown
153
+ [Screenshot: Das Dropdown-Menue zur Tabellenauswahl zeigt alle verfuegbaren Tabellen mit ihren Namen an]
154
+
155
+ ### Spalten-Dropdown
156
+ [Screenshot: Nach Auswahl einer Tabelle zeigt das Spalten-Dropdown alle verfuegbaren Spalten mit Namen und Typ an]
157
+
158
+ ### Tabelle erstellen
159
+ [Screenshot: Das Formular zum Erstellen einer neuen Tabelle mit Spalten-Definition]
160
+
161
+ ### Workflow-Beispiel
162
+ [Screenshot: Ein kompletter Workflow der mehrere Data Table Manager Nodes verwendet]
163
+
164
+ ## Beispiele
165
+
166
+ ### Beispiel 1: Dynamische Tabellenerstellung
167
+
168
+ Erstellen Sie eine Tabelle mit Kundendaten:
169
+
170
+ ```
171
+ Resource: Table
172
+ Operation: Create
173
+ Table Name: Customers
174
+ Columns:
175
+ - name: customer_id, type: string
176
+ - name: email, type: string
177
+ - name: created_at, type: date
178
+ - name: is_active, type: boolean
179
+ ```
180
+
181
+ ### Beispiel 2: Spalte zu bestehender Tabelle hinzufuegen
182
+
183
+ ```
184
+ Resource: Column
185
+ Operation: Add
186
+ Table: [Waehlen Sie "Customers" aus dem Dropdown]
187
+ Column Name: phone_number
188
+ Column Type: String
189
+ ```
190
+
191
+ ### Beispiel 3: Tabelle umbenennen
192
+
193
+ ```
194
+ Resource: Table
195
+ Operation: Update
196
+ Table: [Waehlen Sie die Tabelle aus dem Dropdown]
197
+ New Table Name: Archived_Customers
198
+ ```
199
+
200
+ ### Beispiel 4: Alle Tabellen auflisten
201
+
202
+ ```
203
+ Resource: Table
204
+ Operation: Get All
205
+ ```
206
+
207
+ Gibt ein Array aller Tabellen mit ID, Name und Metadaten zurueck.
208
+
209
+ ---
210
+
211
+ # English
212
+
213
+ ## Description
214
+
215
+ This n8n community node enables complete management of n8n internal Data Tables directly from your workflows. Unlike the standard version, tables and columns are selected via user-friendly dropdown menus with names - no more manual ID entry required!
216
+
217
+ ### Key advantages over the base version:
218
+
219
+ - **Name-based selection**: Select tables and columns from dropdown lists instead of entering IDs
220
+ - **Dynamic loading**: Available options are loaded live from your n8n instance
221
+ - **Error reduction**: No more typos in IDs
222
+ - **Better overview**: See all available tables and columns at a glance
223
+
224
+ ## Features
225
+
226
+ ### Table Operations
227
+ - **Create**: Create new Data Tables with custom columns
228
+ - **Get All**: List all existing Data Tables
229
+ - **Update**: Rename tables (selection via dropdown)
230
+ - **Delete**: Delete tables (selection via dropdown)
231
+
232
+ ### Column Operations
233
+ - **Add**: Add new columns to existing tables
234
+ - **Get All**: List all columns of a table
235
+ - **Rename**: Rename columns (selection via dropdown)
236
+ - **Delete**: Delete columns (selection via dropdown)
237
+
238
+ ### Supported Column Types
239
+ - String (Text)
240
+ - Number
241
+ - Boolean (Yes/No)
242
+ - Date
243
+
244
+ ## Installation
245
+
246
+ ### Via n8n Community Nodes (recommended)
247
+
248
+ 1. Open n8n
249
+ 2. Go to **Settings** > **Community Nodes**
250
+ 3. Click **Install**
251
+ 4. Enter: `n8n-nodes-datatable-manager-select`
252
+ 5. Click **Install**
253
+ 6. Restart n8n
254
+
255
+ ### Manual Installation
256
+
257
+ ```bash
258
+ # Navigate to n8n installation directory
259
+ cd ~/.n8n
260
+
261
+ # Create custom folder if not exists
262
+ mkdir -p custom
263
+
264
+ # Install the node
265
+ npm install n8n-nodes-datatable-manager-select
266
+
267
+ # Restart n8n
268
+ ```
269
+
270
+ ### Docker
271
+
272
+ Add the package to your Docker configuration:
273
+
274
+ ```yaml
275
+ environment:
276
+ - N8N_CUSTOM_EXTENSIONS=n8n-nodes-datatable-manager-select
277
+ ```
278
+
279
+ Or install in running container:
280
+
281
+ ```bash
282
+ docker exec -it n8n npm install n8n-nodes-datatable-manager-select
283
+ docker restart n8n
284
+ ```
285
+
286
+ ## Usage
287
+
288
+ ### Connection Settings
289
+
290
+ Each node requires the following settings:
291
+
292
+ | Parameter | Description | Example |
293
+ |-----------|-------------|---------|
294
+ | Base URL | The URL of your n8n instance | `http://localhost:5678` |
295
+ | Email | Your n8n login email | `admin@example.com` |
296
+ | Password | Your n8n login password | `********` |
297
+
298
+ ### Create Table
299
+
300
+ 1. Select **Resource**: Table
301
+ 2. Select **Operation**: Create
302
+ 3. Enter the **Table Name**
303
+ 4. Add columns (optional)
304
+ - Column Name: Name of the column
305
+ - Column Type: String, Number, Boolean or Date
306
+
307
+ ### Update/Delete Table
308
+
309
+ 1. Select **Resource**: Table
310
+ 2. Select **Operation**: Update or Delete
311
+ 3. **Select the table from the dropdown** - all available tables are displayed here!
312
+ 4. For Update: Enter the new name
313
+
314
+ ### Add Column
315
+
316
+ 1. Select **Resource**: Column
317
+ 2. Select **Operation**: Add
318
+ 3. **Select the table from the dropdown**
319
+ 4. Enter the column name and type
320
+
321
+ ### Rename/Delete Column
322
+
323
+ 1. Select **Resource**: Column
324
+ 2. Select **Operation**: Rename or Delete
325
+ 3. **Select the table from the dropdown**
326
+ 4. **Select the column from the dropdown** - all columns of the selected table are displayed here!
327
+ 5. For Rename: Enter the new name
328
+
329
+ ## Screenshots
330
+
331
+ ### Node Overview
332
+ [Screenshot: The Data Table Manager node in the n8n node palette with its characteristic table icon]
333
+
334
+ ### Table Dropdown
335
+ [Screenshot: The dropdown menu for table selection shows all available tables with their names]
336
+
337
+ ### Column Dropdown
338
+ [Screenshot: After selecting a table, the column dropdown shows all available columns with name and type]
339
+
340
+ ### Create Table
341
+ [Screenshot: The form for creating a new table with column definition]
342
+
343
+ ### Workflow Example
344
+ [Screenshot: A complete workflow using multiple Data Table Manager nodes]
345
+
346
+ ## Examples
347
+
348
+ ### Example 1: Dynamic Table Creation
349
+
350
+ Create a table with customer data:
351
+
352
+ ```
353
+ Resource: Table
354
+ Operation: Create
355
+ Table Name: Customers
356
+ Columns:
357
+ - name: customer_id, type: string
358
+ - name: email, type: string
359
+ - name: created_at, type: date
360
+ - name: is_active, type: boolean
361
+ ```
362
+
363
+ ### Example 2: Add Column to Existing Table
364
+
365
+ ```
366
+ Resource: Column
367
+ Operation: Add
368
+ Table: [Select "Customers" from dropdown]
369
+ Column Name: phone_number
370
+ Column Type: String
371
+ ```
372
+
373
+ ### Example 3: Rename Table
374
+
375
+ ```
376
+ Resource: Table
377
+ Operation: Update
378
+ Table: [Select table from dropdown]
379
+ New Table Name: Archived_Customers
380
+ ```
381
+
382
+ ### Example 4: List All Tables
383
+
384
+ ```
385
+ Resource: Table
386
+ Operation: Get All
387
+ ```
388
+
389
+ Returns an array of all tables with ID, name and metadata.
390
+
391
+ ---
392
+
393
+ ## Kompatibilitaet / Compatibility
394
+
395
+ - n8n Version: >= 1.0.0
396
+ - Node.js: >= 18.0.0
397
+
398
+ ## Bekannte Einschraenkungen / Known Limitations
399
+
400
+ - Die Dropdown-Optionen erfordern eine erfolgreiche Verbindung zu Ihrer n8n-Instanz
401
+ - Bei vielen Tabellen/Spalten kann das Laden der Optionen einen Moment dauern
402
+ - The dropdown options require a successful connection to your n8n instance
403
+ - With many tables/columns, loading options may take a moment
404
+
405
+ ## Support
406
+
407
+ Bei Fragen oder Problemen erstellen Sie bitte einen Issue.
408
+ For questions or issues, please create an issue.
409
+
410
+ ## License
411
+
412
+ MIT License
413
+
414
+ Copyright (c) 2024 Thomas Braun
415
+
416
+ Permission is hereby granted, free of charge, to any person obtaining a copy
417
+ of this software and associated documentation files (the "Software"), to deal
418
+ in the Software without restriction, including without limitation the rights
419
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
420
+ copies of the Software, and to permit persons to whom the Software is
421
+ furnished to do so, subject to the following conditions:
422
+
423
+ The above copyright notice and this permission notice shall be included in all
424
+ copies or substantial portions of the Software.
425
+
426
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
427
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
428
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
429
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
430
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
431
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
432
+ SOFTWARE.
@@ -0,0 +1,7 @@
1
+ import { ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class DataTableManagerApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DataTableManagerApi = void 0;
4
+ class DataTableManagerApi {
5
+ name = 'dataTableManagerApi';
6
+ displayName = 'Data Table Manager API';
7
+ documentationUrl = 'https://docs.n8n.io/data/data-tables/';
8
+ properties = [
9
+ {
10
+ displayName: 'Base URL',
11
+ name: 'baseUrl',
12
+ type: 'string',
13
+ default: 'http://localhost:5678',
14
+ placeholder: 'http://localhost:5678',
15
+ description: 'Die Base URL deiner n8n Instanz',
16
+ required: true,
17
+ },
18
+ {
19
+ displayName: 'Email',
20
+ name: 'email',
21
+ type: 'string',
22
+ default: '',
23
+ placeholder: 'admin@example.com',
24
+ description: 'Deine n8n Login Email',
25
+ required: true,
26
+ },
27
+ {
28
+ displayName: 'Password',
29
+ name: 'password',
30
+ type: 'string',
31
+ typeOptions: {
32
+ password: true,
33
+ },
34
+ default: '',
35
+ description: 'Dein n8n Login Passwort',
36
+ required: true,
37
+ },
38
+ ];
39
+ }
40
+ exports.DataTableManagerApi = DataTableManagerApi;
@@ -0,0 +1,36 @@
1
+ import { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ /**
3
+ * Data Table Manager Node with Dropdown Selection
4
+ *
5
+ * This node uses a CREDENTIALS-based approach for authentication.
6
+ * This is the KEY FIX for the loadOptions problem:
7
+ *
8
+ * PROBLEM: getNodeParameter() and getCurrentNodeParameter() in loadOptions
9
+ * only work for SAVED parameter values. When a user enters credentials
10
+ * but hasn't executed the node yet, these methods return empty strings.
11
+ *
12
+ * SOLUTION: Use this.getCredentials() instead. n8n's credential system
13
+ * properly provides credential values to loadOptions even before the
14
+ * node is executed, because credentials are saved separately and
15
+ * immediately available once the user selects/creates them.
16
+ */
17
+ export declare class DataTableManager implements INodeType {
18
+ description: INodeTypeDescription;
19
+ methods: {
20
+ loadOptions: {
21
+ /**
22
+ * Load available tables as dropdown options.
23
+ *
24
+ * KEY FIX: Uses this.getCredentials() instead of this.getNodeParameter()
25
+ * This allows the dropdown to work IMMEDIATELY after credentials are selected,
26
+ * without needing to execute the node first.
27
+ */
28
+ getTables(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
29
+ /**
30
+ * Load available columns for selected table as dropdown options.
31
+ */
32
+ getColumns(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
33
+ };
34
+ };
35
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
36
+ }