서우 AgentOffice
← 라이브러리
workflow-automation

N8n 코드 자바스크립트

원문: n8n-code-javascript

Write JavaScript code in n8n Code nodes. Use when writing JavaScript in n8n, using $input/$json/$node syntax, making HTTP requests with $helpers, working with dates using DateTime, troubleshooting Code node errors, or choosing between Code node modes.

무엇을 하나요

JavaScript Code Node Expert guidance for writing JavaScript code in n8n Code nodes. Quick Start Essential Rules 1. Choose "Run Once for All Items" mode (recommended for most use cases) 2. Access data : $input.all() , $input.first() , or $input.item 3. CRITICAL : Must return [{json: {...}}] format 4. CRITICAL : Webhook data is under $json.body (not $json directly) 5. Built ins available : $helpers.httpRequest(), DateTime (Luxon), $jmespath() Mode Selection Guide The Code node offers two execution modes. Choose based on your use case: Run Once for All Items (Recommended Default) Use this mode for: 95% of use cases How it works : Code executes once regardless of input count Data access : $input

실행 시 본인 API 키(BYOK)로 동작하며, 모델 비용은 사용자 계정에서 직접 결제됩니다.