@ferchy/n8n-nodes-aimc-toolkit 0.1.31 → 0.1.33
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/README.md +74 -225
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ n8n is powerful, but real workflows often need basic utilities (validation, pars
|
|
|
12
12
|
|
|
13
13
|
**Inspiration**: The original idea was sparked by Kenkaii's SuperCode. I'm grateful for that work and built AIMC Toolkit as my own version, tailored to my needs and expanded with improvements over time.
|
|
14
14
|
|
|
15
|
-
**Note**: Of course there will be some bugs - that's obvious! We're aware of them and the best thing is that we will continue to improve, so please be patient!
|
|
15
|
+
**Note**: Of course there will be some bugs - that's obvious! We're aware of them and the best thing is that we will continue to improve, so please be patient!
|
|
16
16
|
|
|
17
17
|
## Who This Is For
|
|
18
18
|
|
|
@@ -46,7 +46,7 @@ npm install @ferchy/n8n-nodes-aimc-toolkit
|
|
|
46
46
|
|
|
47
47
|
---
|
|
48
48
|
|
|
49
|
-
##
|
|
49
|
+
## Important: FFmpeg for Docker/Self-Hosted Users
|
|
50
50
|
|
|
51
51
|
**If you're using AIMC Media node and see "FFmpeg not found" errors, read this!**
|
|
52
52
|
|
|
@@ -55,7 +55,7 @@ npm install @ferchy/n8n-nodes-aimc-toolkit
|
|
|
55
55
|
When you install a community node in n8n, **only the JavaScript code is installed** - not system binaries like FFmpeg. Here's why:
|
|
56
56
|
|
|
57
57
|
1. **npm packages can only include JavaScript** - FFmpeg is a compiled binary program, not JavaScript code
|
|
58
|
-
2. **We include
|
|
58
|
+
2. **We include ffmpeg-static** which tries to download a pre-compiled FFmpeg, but it often fails in Docker because:
|
|
59
59
|
- The binary is compiled for a different architecture (ARM vs x86)
|
|
60
60
|
- Docker containers may block the download
|
|
61
61
|
- The binary may not have execute permissions
|
|
@@ -67,7 +67,7 @@ When you install a community node in n8n, **only the JavaScript code is installe
|
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
69
|
# For Docker (run this command)
|
|
70
|
-
docker exec -it
|
|
70
|
+
docker exec -it your-n8n-container apk add --no-cache ffmpeg
|
|
71
71
|
|
|
72
72
|
# Or add to your Dockerfile for permanent installation
|
|
73
73
|
FROM n8nio/n8n:latest
|
|
@@ -76,7 +76,7 @@ RUN apk add --no-cache ffmpeg
|
|
|
76
76
|
USER node
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
Once installed, AIMC Media will **automatically detect** FFmpeg at
|
|
79
|
+
Once installed, AIMC Media will **automatically detect** FFmpeg at /usr/bin/ffmpeg - no environment variables needed!
|
|
80
80
|
|
|
81
81
|
### Quick Test
|
|
82
82
|
|
|
@@ -92,34 +92,27 @@ http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscape
|
|
|
92
92
|
AIMC Media runs inside your n8n host/container, so FFmpeg must be available there.
|
|
93
93
|
It will use the first available option:
|
|
94
94
|
|
|
95
|
-
1.
|
|
96
|
-
2.
|
|
97
|
-
3.
|
|
95
|
+
1. FFMPEG_PATH / FFPROBE_PATH environment variables
|
|
96
|
+
2. System FFmpeg (e.g., /usr/bin/ffmpeg)
|
|
97
|
+
3. Bundled ffmpeg-static / ffprobe-static
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
### Docker (n8n official image, run inside the container)
|
|
99
|
+
### Docker (n8n official image)
|
|
102
100
|
```bash
|
|
103
|
-
docker exec
|
|
101
|
+
docker exec container apk add --no-cache ffmpeg
|
|
104
102
|
```
|
|
105
103
|
|
|
106
|
-
### Coolify (
|
|
107
|
-
If you deploy n8n via Coolify, install FFmpeg in the container image.
|
|
108
|
-
|
|
109
|
-
Example `Dockerfile`:
|
|
104
|
+
### Coolify (custom Dockerfile)
|
|
110
105
|
```dockerfile
|
|
111
106
|
FROM n8nio/n8n:latest
|
|
112
107
|
RUN apk add --no-cache ffmpeg
|
|
113
108
|
```
|
|
114
109
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
### Debian/Ubuntu (server/VM running n8n)
|
|
110
|
+
### Debian/Ubuntu
|
|
118
111
|
```bash
|
|
119
112
|
apt-get update && apt-get install -y ffmpeg
|
|
120
113
|
```
|
|
121
114
|
|
|
122
|
-
### macOS
|
|
115
|
+
### macOS
|
|
123
116
|
```bash
|
|
124
117
|
brew install ffmpeg
|
|
125
118
|
```
|
|
@@ -131,8 +124,8 @@ brew install ffmpeg
|
|
|
131
124
|
**Features**
|
|
132
125
|
- Run JavaScript or Python.
|
|
133
126
|
- Run once for all items or once per item.
|
|
134
|
-
- Access libraries as globals (
|
|
135
|
-
- Built-in helpers (
|
|
127
|
+
- Access libraries as globals (axios, _, zod) or via libs.
|
|
128
|
+
- Built-in helpers (utils.now, utils.safeJson, utils.toArray).
|
|
136
129
|
- **AIMC Connect Mode**: optional AI connectors for LLMs, tools, memory, and more.
|
|
137
130
|
|
|
138
131
|
**Example: normalize data**
|
|
@@ -148,52 +141,6 @@ return rows.map((row, index) => ({
|
|
|
148
141
|
}));
|
|
149
142
|
```
|
|
150
143
|
|
|
151
|
-
**Prompt starter (for GPT/Claude)**
|
|
152
|
-
If you want AI to generate your node code, paste this prompt into ChatGPT, Claude, or any GPT-style tool and fill in your task:
|
|
153
|
-
```text
|
|
154
|
-
You are writing code for an n8n AIMC Code node.
|
|
155
|
-
Goal: <describe what you want to do>
|
|
156
|
-
Execution mode: <Run Once for Each Item OR Run Once for All Items>
|
|
157
|
-
Inputs: items are available as `items` (all) or `item` (single)
|
|
158
|
-
Return: return a plain object or array of objects (JSON-safe)
|
|
159
|
-
Libraries (globals): axios, lodash (_), zod (z), joi (Joi), yup, Ajv, validator, dayjs, dateFns, dateFnsTz, moment,
|
|
160
|
-
cheerio, papaparse (Papa), yaml (YAML), xml2js, XMLParser, qs, FormData, uuid, nanoid, bytes, cronParser, ms,
|
|
161
|
-
fuzzy, stringSimilarity, slug, pluralize, jsonDiff, htmlToText, marked, qrcode/QRCode, ytdl, ffmpeg, ffmpegStatic, ffprobeStatic.
|
|
162
|
-
Helpers: utils.now(), utils.safeJson(), utils.toArray()
|
|
163
|
-
Please return only the JavaScript code for the AIMC Code node.
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
**Example: fetch + parse XML**
|
|
167
|
-
```javascript
|
|
168
|
-
const response = await axios.get('https://example.com/feed.xml');
|
|
169
|
-
const parsed = await xml2js.parseStringPromise(response.data);
|
|
170
|
-
|
|
171
|
-
return parsed;
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
**Python Example: summarize inputs**
|
|
175
|
-
```python
|
|
176
|
-
# items is a list of dicts, item is the first item
|
|
177
|
-
result = {
|
|
178
|
-
"count": len(items),
|
|
179
|
-
"first": items[0] if items else None
|
|
180
|
-
}
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
**AIMC Connect Mode (AI)**
|
|
184
|
-
Enable **AIMC Connect Mode** to attach AI connectors. When enabled, your code can use:
|
|
185
|
-
|
|
186
|
-
- `ai` (object with all connectors)
|
|
187
|
-
- `aiModel`, `aiTools`, `aiMemory`, `aiVectorStore`, `aiChain`, `aiDocument`
|
|
188
|
-
|
|
189
|
-
Example:
|
|
190
|
-
```javascript
|
|
191
|
-
if (aiModel) {
|
|
192
|
-
const response = await aiModel.invoke('Summarize this input.');
|
|
193
|
-
return { summary: response };
|
|
194
|
-
}
|
|
195
|
-
```
|
|
196
|
-
|
|
197
144
|
### AIMC Media
|
|
198
145
|
|
|
199
146
|
**Operations**
|
|
@@ -209,30 +156,6 @@ if (aiModel) {
|
|
|
209
156
|
- **Output Format**: mp4, webm, mov, mp3, wav, and more
|
|
210
157
|
- **Extra FFmpeg Args**: one per line for advanced control
|
|
211
158
|
|
|
212
|
-
**Example: convert and scale**
|
|
213
|
-
```
|
|
214
|
-
Operation: Convert / Transcode
|
|
215
|
-
Output Format: WebM
|
|
216
|
-
Additional Output Options:
|
|
217
|
-
-vf scale=1280:-2
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
**Example: compress**
|
|
221
|
-
```
|
|
222
|
-
Operation: Compress
|
|
223
|
-
CRF: 24
|
|
224
|
-
Preset: fast
|
|
225
|
-
Audio Bitrate: 128k
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
**Example: merge video + audio**
|
|
229
|
-
```
|
|
230
|
-
Operation: Merge Video + Audio
|
|
231
|
-
Input Mode: File Path
|
|
232
|
-
Video File Path: /path/to/video.mp4
|
|
233
|
-
Audio File Path: /path/to/audio.mp3
|
|
234
|
-
```
|
|
235
|
-
|
|
236
159
|
**Example: download and convert from URL**
|
|
237
160
|
```
|
|
238
161
|
Operation: Convert / Transcode
|
|
@@ -241,163 +164,89 @@ Input URL: https://example.com/video.mp4
|
|
|
241
164
|
Output Format: webm
|
|
242
165
|
```
|
|
243
166
|
|
|
244
|
-
**Large Files**
|
|
245
|
-
Use **Input Mode = File Path** or **URL** to avoid loading big files into memory.
|
|
246
|
-
|
|
247
|
-
**FFmpeg for Docker/Self-Hosted n8n**
|
|
248
|
-
|
|
249
|
-
The `ffmpeg-static` package is included but may not work in Docker containers. If you see "FFmpeg not found" errors, install FFmpeg in your container:
|
|
250
|
-
|
|
251
|
-
**Option 1: Custom Dockerfile**
|
|
252
|
-
```dockerfile
|
|
253
|
-
FROM n8nio/n8n:latest
|
|
254
|
-
|
|
255
|
-
USER root
|
|
256
|
-
RUN apk add --no-cache ffmpeg
|
|
257
|
-
USER node
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
**Option 2: Environment variables** (if FFmpeg is already installed)
|
|
261
|
-
```yaml
|
|
262
|
-
environment:
|
|
263
|
-
- FFMPEG_PATH=/usr/bin/ffmpeg
|
|
264
|
-
- FFPROBE_PATH=/usr/bin/ffprobe
|
|
265
|
-
```
|
|
266
|
-
|
|
267
167
|
### AIMC Social Scraper
|
|
268
168
|
|
|
269
169
|
**Coming Soon!**
|
|
270
170
|
|
|
271
|
-
Social media scraping functionality is currently under development.
|
|
272
|
-
|
|
273
|
-
**Note**: YouTube support is already available via the **AIMC Code** node using the `ytdl` library. See the Media Helpers section for details.
|
|
171
|
+
Social media scraping functionality is currently under development.
|
|
274
172
|
|
|
275
173
|
## Library Reference (AIMC Code)
|
|
276
174
|
|
|
277
|
-
Libraries are available as globals or via
|
|
278
|
-
|
|
279
|
-
## Python Support (AIMC Code)
|
|
280
|
-
|
|
281
|
-
Python executes locally using the configured Python binary (default: `python3`).
|
|
282
|
-
Provide Python code and set a variable named `result` to return output.
|
|
283
|
-
|
|
284
|
-
### Python Settings
|
|
285
|
-
- **Python Path**: path to the Python binary (e.g. `python3` or `/usr/bin/python3`)
|
|
286
|
-
- **Python Packages**: comma-separated list of packages
|
|
287
|
-
- **Auto-install Python Packages**: runs `pip install --user` before execution
|
|
288
|
-
|
|
289
|
-
### Python Tips
|
|
290
|
-
- Use `items` (list of dicts) or `item` (first item) as inputs.
|
|
291
|
-
- Use `params` to access node parameters.
|
|
292
|
-
- Keep results JSON-serializable for best compatibility.
|
|
175
|
+
Libraries are available as globals or via libs.name.
|
|
293
176
|
|
|
294
177
|
### HTTP and Networking
|
|
295
|
-
-
|
|
296
|
-
-
|
|
297
|
-
-
|
|
298
|
-
-
|
|
299
|
-
-
|
|
300
|
-
|
|
301
|
-
### Data Parsing
|
|
302
|
-
-
|
|
303
|
-
-
|
|
304
|
-
-
|
|
305
|
-
-
|
|
306
|
-
-
|
|
307
|
-
-
|
|
308
|
-
|
|
309
|
-
### Validation
|
|
310
|
-
-
|
|
311
|
-
-
|
|
312
|
-
-
|
|
313
|
-
-
|
|
314
|
-
-
|
|
315
|
-
|
|
316
|
-
### Dates
|
|
317
|
-
-
|
|
318
|
-
-
|
|
319
|
-
-
|
|
320
|
-
-
|
|
321
|
-
-
|
|
322
|
-
-
|
|
323
|
-
|
|
324
|
-
### Text
|
|
325
|
-
-
|
|
326
|
-
-
|
|
327
|
-
-
|
|
328
|
-
-
|
|
329
|
-
-
|
|
330
|
-
-
|
|
331
|
-
|
|
332
|
-
### Web Scraping and Content
|
|
333
|
-
- `cheerio` (global `cheerio`): jQuery-like HTML parser. Use for DOM extraction and scraping.
|
|
178
|
+
- axios: HTTP client
|
|
179
|
+
- qs: querystring parsing
|
|
180
|
+
- FormData: multipart form uploads
|
|
181
|
+
- httpProxyAgent: HTTP proxy support
|
|
182
|
+
- socksProxyAgent: SOCKS proxy support
|
|
183
|
+
|
|
184
|
+
### Data Parsing
|
|
185
|
+
- yaml (YAML): parse/stringify YAML
|
|
186
|
+
- toml: parse TOML
|
|
187
|
+
- xml2js: XML to JS objects
|
|
188
|
+
- XMLParser: fast XML parsing
|
|
189
|
+
- papaparse (Papa): CSV parsing
|
|
190
|
+
- protobufjs: Protobuf messages
|
|
191
|
+
|
|
192
|
+
### Validation
|
|
193
|
+
- zod (z): schema validation
|
|
194
|
+
- joi (Joi): expressive validation
|
|
195
|
+
- yup: object schema validation
|
|
196
|
+
- Ajv: JSON Schema validator
|
|
197
|
+
- validator: common validators
|
|
198
|
+
|
|
199
|
+
### Dates and Time
|
|
200
|
+
- dayjs: lightweight dates
|
|
201
|
+
- dateFns: functional date utilities
|
|
202
|
+
- dateFnsTz: timezone helpers
|
|
203
|
+
- moment: timezone-aware dates
|
|
204
|
+
- cronParser: cron expressions
|
|
205
|
+
- ms: duration parsing
|
|
206
|
+
|
|
207
|
+
### Text and Search
|
|
208
|
+
- fuzzy (Fuse.js): fuzzy search
|
|
209
|
+
- stringSimilarity: string comparison
|
|
210
|
+
- marked: Markdown to HTML
|
|
211
|
+
- slug: slugify strings
|
|
212
|
+
- pluralize: pluralization
|
|
213
|
+
- htmlToText: HTML to text
|
|
214
|
+
- cheerio: jQuery-like HTML parser
|
|
334
215
|
|
|
335
216
|
### IDs and Utilities
|
|
336
|
-
-
|
|
337
|
-
-
|
|
338
|
-
-
|
|
339
|
-
|
|
340
|
-
###
|
|
341
|
-
-
|
|
342
|
-
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
-
|
|
346
|
-
- `@distube/ytdl-core` (global `ytdl`): download media from supported sources. Use for media ingestion flows.
|
|
347
|
-
- `fluent-ffmpeg` (global `ffmpeg`): build FFmpeg pipelines in JS when you need custom media logic.
|
|
348
|
-
- `ffmpeg-static` (global `ffmpegStatic`): path to a bundled FFmpeg binary (if available).
|
|
349
|
-
- `ffprobe-static` (global `ffprobeStatic`): path to a bundled ffprobe binary (if available).
|
|
350
|
-
|
|
351
|
-
### Database and Query Helpers
|
|
352
|
-
- `knex` (global `knex`): SQL query builder. Use for lightweight DB queries when allowed by your environment.
|
|
353
|
-
|
|
354
|
-
### Extra Tools
|
|
355
|
-
- `json-diff-ts` (global `jsonDiff`): JSON diff and comparison utilities. Use for change detection.
|
|
356
|
-
- `iban` (global `iban`): validate and format IBAN numbers.
|
|
357
|
-
- `ini` (global `ini`): parse/stringify INI files.
|
|
358
|
-
- `libphonenumber-js` (global `phoneNumber`): phone number parsing/formatting/validation.
|
|
359
|
-
|
|
360
|
-
### Optional Native Helpers
|
|
361
|
-
- `bufferutil` (global `bufferutil`): optional native Buffer helpers if installed.
|
|
362
|
-
- `utf-8-validate` (global `utf8Validate`): optional UTF-8 validation if installed.
|
|
217
|
+
- uuid: UUID generation
|
|
218
|
+
- nanoid: compact IDs
|
|
219
|
+
- bytes: byte size formatting
|
|
220
|
+
|
|
221
|
+
### Media
|
|
222
|
+
- ytdl: YouTube downloads
|
|
223
|
+
- ffmpeg (fluent-ffmpeg): FFmpeg pipelines
|
|
224
|
+
- ffmpegStatic: FFmpeg binary path
|
|
225
|
+
- ffprobeStatic: ffprobe binary path
|
|
226
|
+
- QRCode: QR code generation
|
|
363
227
|
|
|
364
228
|
## Configuration
|
|
365
229
|
|
|
366
230
|
Environment variables:
|
|
367
|
-
|
|
368
|
-
-
|
|
369
|
-
- `FFPROBE_PATH`: custom ffprobe binary path
|
|
231
|
+
- FFMPEG_PATH: custom FFmpeg binary path
|
|
232
|
+
- FFPROBE_PATH: custom ffprobe binary path
|
|
370
233
|
|
|
371
234
|
## Troubleshooting
|
|
372
235
|
|
|
373
|
-
- **FFmpeg not found**: install FFmpeg or set
|
|
236
|
+
- **FFmpeg not found**: install FFmpeg or set FFMPEG_PATH.
|
|
374
237
|
- **Large files**: use File Path input mode.
|
|
375
|
-
- **Binary output missing**: check
|
|
238
|
+
- **Binary output missing**: check Output Mode and Output Binary Property.
|
|
376
239
|
|
|
377
240
|
## Legal Disclaimer
|
|
378
241
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
The AIMC Social Scraper node uses web scraping techniques to extract data from social media platforms. This is **not** an official API integration and is provided for educational and personal use only.
|
|
382
|
-
|
|
383
|
-
**Important Points:**
|
|
384
|
-
- This scraper uses the web interface of platforms, not official APIs
|
|
385
|
-
- Users must comply with each platform's Terms of Service
|
|
386
|
-
- Users must comply with applicable laws and regulations (GDPR, CCPA, etc.)
|
|
387
|
-
- Users are responsible for respecting rate limits and avoiding abusive behavior
|
|
388
|
-
- Users must respect copyright and intellectual property rights
|
|
389
|
-
- Commercial use may require explicit permission from platform owners
|
|
390
|
-
- The authors and maintainers are not responsible for misuse or violations
|
|
242
|
+
The AIMC Social Scraper uses web scraping techniques. This is not an official API integration.
|
|
391
243
|
|
|
392
|
-
**
|
|
393
|
-
-
|
|
394
|
-
-
|
|
395
|
-
-
|
|
396
|
-
- Only scrape publicly available content
|
|
397
|
-
- Do not redistribute scraped content without permission
|
|
398
|
-
- Consider using official APIs when available for production use
|
|
244
|
+
**Important:**
|
|
245
|
+
- Users must comply with platform Terms of Service
|
|
246
|
+
- Users must comply with applicable laws (GDPR, CCPA, etc.)
|
|
247
|
+
- The authors are not responsible for misuse
|
|
399
248
|
|
|
400
|
-
**Use at your own risk.**
|
|
249
|
+
**Use at your own risk.**
|
|
401
250
|
|
|
402
251
|
## License
|
|
403
252
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ferchy/n8n-nodes-aimc-toolkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"description": "AIMC Toolkit nodes for n8n: code execution and media operations.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ferchy",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/ferchy/n8n-nodes-aimc-toolkit"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/ferchy/n8n-nodes-aimc-toolkit#readme",
|
|
7
12
|
"engines": {
|
|
8
13
|
"node": ">=18.0.0"
|
|
9
14
|
},
|