본문으로 건너뛰기
Skillpedia
일반 코딩48k · #5269

n8n-code-python

하는 일

이 코드는 자동화 도구인 n8n에서 Python 지침을 작성하도록 돕습니다. n8n 안에서 Python으로 무엇을 할 수 있고 할 수 없는지 설명하며, Python 표준 라이브러리에서 쓸 수 있는 것에 중점을 둡니다.

사용하는 경우

  • ✓n8n용 Python 코드를 작성해야 할 때.
  • ✓어떤 Python 라이브러리를 쓸 수 있는지 알고 싶을 때.
  • ✓n8n의 코드 노드 안에서 Python이 어떻게 작동하는지 이해하고 싶을 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/n8n-code-python/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/n8n-code-python/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“n8n Python 코드 노드에서 「json」 모듈을 어떻게 사용하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

n8n에서 Python의 규칙과 제약을 설명하는 방식으로 작동합니다. 사용할 수 있는 라이브러리(「json」, 「datetime」 등)와 사용할 수 없는 라이브러리(「requests」, 「pandas」 등)를 나열합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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 statistics module 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.
자주 묻는 질문

「requests」나 「pandas」 같은 외부 라이브러리를 쓸 수 있나요?

아니요. n8n의 Python 코드 노드에서는 외부 라이브러리를 가져올 수 없습니다. Python 표준 라이브러리만 사용할 수 있습니다.

「표준 라이브러리」란 무엇인가요?

Python을 설치하면 함께 제공되는 모듈 모음입니다. 「json」, 「datetime」, 「math」 등이 예입니다.

n8n에서는 언제 Python 대신 JavaScript를 써야 하나요?

대부분의 작업에는 JavaScript를 쓰는 것이 좋습니다. 특히 HTTP 요청을 보내거나 고급 날짜와 시간 기능을 써야 할 때 그렇습니다.

상세 정보

작성자의 원본 설명

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.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5269
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬