What problem does it solve?
This Skill clarifies how to write Python inside n8n Code nodes while staying within the standard library and safe data access patterns, avoiding external libraries and common pitfalls.
Core Features & Use Cases
- Safe data access using _input.all(), _input.first(), and _input.item to handle batch and per-item processing.
- Webhook data handling with correct access through the body field and safe retrieval patterns for nested data.
- Enforcing the required n8n return format: an array of objects each containing a json key: [{"json": {...}}].
- Error prevention and best practices: safe dictionary access with .get(), guarded list indexing, and thorough testing across All Items and Each Item modes.
- Standard library usage: leverage json, datetime, re, base64, hashlib, urllib.parse, math, random, statistics, and other built-ins without external packages.
Quick Start
Start with a simple transform of all input items using the safe patterns: read all items with _input.all(), apply a minimal transformation, and return the results wrapped as {"json": {...}}. Then consult DATA_ACCESS.md and ERROR_PATTERNS.md for safe access and error avoidance guidelines.