Package Information
Documentation
n8n-nodes-data-transformer-pro
A powerful, visual Data Transformer Pro community node for n8n that provides a comprehensive, no-code GUI for common data transformation operations — more user-friendly than n8n's Function node.
Features
- Field Mapping — Map, rename, copy, and restructure fields between input and output
- String Operations — 26+ operations: uppercase, lowercase, trim, replace, slugify, camelCase, base64, md5, sha256, and more
- Math Operations — Arithmetic (add, subtract, multiply, divide), rounding, clamping, percentage
- Regex Operations — Test, match, matchAll, replace, extract with capture groups, split
- Formatting — Date formatting (Luxon), number/currency formatting (Intl), phone formatting
- Type Conversion — Convert between string, number, boolean, array, object, JSON, date
- Conditional Logic — If/then/else rules with 18 operators and AND/OR logic
- Template Rendering — Mustache-style
{{field}}templates with pipe helpers and block logic - JavaScript Sandbox — Safe JS execution with
$json,$input,$items, and_utility library - Rules Pipeline — Chain multiple transformation rules in sequence (advanced mode)
Installation
Community Nodes (Recommended)
- Go to Settings > Community Nodes in your n8n instance
- Select Install
- Enter
n8n-nodes-data-transformer-pro - Agree to the risks and click Install
Manual Installation
cd ~/.n8n/nodes
npm install n8n-nodes-data-transformer-pro
Then restart your n8n instance.
Usage Modes
1. Rules Pipeline (Advanced)
Chain multiple transformation rules in sequence. Each rule is applied to the output of the previous rule. Supports all rule types: field mapping, string, math, regex, formatting, type conversion, conditional, template, JavaScript, remove, rename, copy, and set static value.
2. Field Mapping
Map fields from input to output with optional renaming:
| Source Field | Destination Field |
|---|---|
user.name |
fullName |
address.city |
location |
Enable Clean Output to only include mapped fields (drops unmapped data).
3. String Operations
Apply string transformations to any field:
| Operation | Description |
|---|---|
uppercase / lowercase |
Change case |
trim |
Remove whitespace |
replace / replaceAll |
Find and replace |
substring |
Extract portion |
split / join |
Split to array / Join array |
slugify |
URL-safe slug |
camelCase / snakeCase / kebabCase |
Naming conventions |
capitalize / titleCase |
Capitalize words |
truncate |
Limit length with ... |
base64Encode / base64Decode |
Base64 encoding |
urlEncode / urlDecode |
URL encoding |
md5 / sha256 |
Hashing |
padStart / padEnd |
Pad string |
repeat / reverse |
Repeat or reverse |
4. Math Operations
| Operation | Description |
|---|---|
add / subtract / multiply / divide |
Arithmetic |
modulo / power |
Modulo, exponentiation |
round / ceil / floor |
Rounding (with precision) |
abs / min / max |
Absolute, min, max |
clamp |
Clamp to range |
percentage |
Calculate percentage |
5. Regex Operations
| Operation | Description |
|---|---|
test |
Returns true/false |
match |
Returns first match |
matchAll |
Returns all matches |
replace |
Regex replace with $1 capture groups |
extract |
Extract specific capture group |
split |
Split by regex pattern |
6. Formatting
- Date: Format, parse, add/subtract duration, diff between dates (powered by Luxon)
- Number: Locale-aware formatting via
Intl.NumberFormat - Currency: Currency formatting with configurable currency code
- Phone: Basic phone number formatting
7. Type Conversion
Convert between: string, number, integer, float, boolean, array, object, date, JSON string, with fallback values for failed conversions.
8. Conditional Logic
Create if/then/else rules with these operators:
equals, notEquals, contains, notContains, startsWith, endsWith, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, isEmpty, isNotEmpty, isNull, isNotNull, matches (regex), in, notIn, between, isType
Combine multiple conditions with AND / OR logic.
9. Template Rendering
Use Mustache-style templates with pipe helpers:
Hello {{name | uppercase}}!
Price: {{amount | numberFormat}} ({{currency | default:"USD"}})
{{#if active}}Status: Active{{else}}Status: Inactive{{/if}}
{{#each items}}- {{name}}: {{value}}
{{/each}}
Available Helpers: uppercase, lowercase, capitalize, default, json, length, truncate, replace, numberFormat, date, slug
10. JavaScript Sandbox
Write custom JS with a safe sandboxed environment:
// Available globals: $json, $input, $item, $index, $items, _
// Transform data
return {
fullName: $json.firstName + ' ' + $json.lastName,
total: $json.items.reduce((sum, item) => sum + item.price, 0),
tags: _.uniq($json.tags),
};
_ Utilities: pick, omit, get, set, groupBy, sortBy, uniq, flatten, chunk, sum, mean, min, max, capitalize, camelCase, snakeCase, kebabCase, truncate, isEmpty, isString, isNumber, isArray, isObject, isNil, clamp, round
Error Handling
Each rule and the global node support error handling:
- Stop — Halt execution on first error
- Skip — Skip the failing rule and continue
- Default — Use a fallback value on error
Individual rules can override the global setting with continueOnError.
Development
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Lint
npm run lint
Project Structure
├── nodes/DataTransformerPro/
│ ├── DataTransformerPro.node.ts # Main n8n node definition
│ ├── dataTransformerPro.svg # Node icon
│ └── engine/
│ ├── index.ts # Barrel exports
│ ├── FieldPathParser.ts # Dot-notation path utilities
│ ├── StringOperations.ts # 26+ string operations
│ ├── MathOperations.ts # Math operations
│ ├── RegexOperations.ts # Regex operations
│ ├── FormattingOperations.ts # Date/number formatting
│ ├── TypeConversion.ts # Type conversions
│ ├── ConditionalEvaluator.ts # If/then/else logic
│ ├── TemplateRenderer.ts # Mustache-style templates
│ ├── SafeJsEvaluator.ts # Sandboxed JS execution
│ └── TransformationEngine.ts # Rule pipeline orchestrator
├── tests/engine/ # Comprehensive unit tests
├── index.ts # Package entry point
├── package.json
├── tsconfig.json
└── jest.config.js
License
MIT
Author
Community contribution for n8n.