n8n-code-python
What it does
This code helps you write Python instructions for n8n, an automation tool. It explains what you can and cannot do with Python within n8n, focusing on what's available in the standard library.
When to use it
- βWhen you need to write Python code for n8n.
- βIf you want to know which Python libraries can be used.
- βTo understand how Python works inside n8n's code nodes.
Skill link
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/n8n-code-python/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βHow do I use the 'json' module in an n8n Python code node?β
5 new skills a week. 1 minute to read.
How it works
It works by explaining the rules and limitations of Python in n8n. It lists the libraries you can use (like 'json' and 'datetime') and those you cannot (like 'requests' or 'pandas').
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Python Code Node (Beta)
Expert guidance for writing Python code in n8n Code nodes.
Detailed Guide
Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
Critical Limitation: No External Libraries
MOST IMPORTANT PYTHON LIMITATION: Cannot import external packages
What's NOT Available
# β NOT AVAILABLE - Will raise ModuleNotFoundError
import requests # β No
import pandas # β No
import numpy # β No
import scipy # β No
from bs4 import BeautifulSoup # β No
import lxml # β No
What IS Available (Standard Library)
# β
AVAILABLE - Standard library only
import json # β
JSON parsing
import datetime # β
Date/time operations
import re # β
Regular expressions
import base64 # β
Base64 encoding/decoding
import hashlib # β
Hashing functions
import urllib.parse # β
URL parsing
import math # β
Math functions
import random # β
Random numbers
import statistics # β
Statistical functions
Workarounds
Need HTTP requests?
- β Use HTTP Request node before Code node
- β
Or switch to JavaScript and use
$helpers.httpRequest()
Need data analysis (pandas/numpy)?
- β Use Python statistics module for basic stats
- β Or switch to JavaScript for most operations
- β Manual calculations with lists and dictionaries
Need web scraping (BeautifulSoup)?
- β Use HTTP Request node + HTML Extract node
- β Or switch to JavaScript with regex/string methods
See: STANDARD_LIBRARY.md for complete reference
When to Use Python vs JavaScript
Use Python When:
- β
You need
statisticsmodule for statistical operations - β You're significantly more comfortable with Python syntax
- β Your logic maps well to list comprehensions
- β You need specific standard library functions
Use JavaScript When:
- β You need HTTP requests ($helpers.httpRequest())
- β You need advanced date/time (DateTime/Luxon)
- β You want better n8n integration
- β For 95% of use cases (recommended)
Consider Other Nodes When:
- β Simple field mapping β Use Set node
- β Basic filtering β Use Filter node
- β Simple conditionals β Use IF or Switch node
- β HTTP requests only β Use HTTP Request node
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
FAQ
Can I use external libraries like 'requests' or 'pandas'?
No, you cannot import external libraries in n8n's Python code node. Only Python's standard library is available.
What is the 'standard library'?
It's a set of modules that come with Python when you install it. Examples include 'json', 'datetime', 'math', among others.
When should I use JavaScript instead of Python in n8n?
It's recommended to use JavaScript for most tasks in n8n, especially if you need to make HTTP requests or use advanced date and time functionalities.
Details
Original description by the author
Write Python code in n8n Code nodes. Use when writing Python in n8n, using _input/_json/_node syntax, working with standard library, or need to understand Python limitations in n8n Code nodes.
Popularity
- GitHub stars
- 48k
- Ranking position
- #5269
- License
- MIT
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
00-andruia-consultant
48kHelps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
007
48kLets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
10-andruia-skill-smith
48kHelps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
20-andruia-niche-intelligence
48kLets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.