{
 "schema_version": 1,
 "generated": "2026-10-25",
 "id": "n8n-io-n8n--add-custom-code-to-an-automation",
 "repo": "n8n-io/n8n",
 "repo_url": "https://github.com/n8n-io/n8n",
 "repo_slug": "n8n-io-n8n",
 "title": "Add JavaScript or Python code where the visual nodes stop",
 "page_title": "How to add JavaScript or Python code where the visual nodes stop with n8n",
 "summary": "Drop a code step into a workflow to reshape data or call a library the integrations do not cover.",
 "who": "A developer who likes visual workflows but needs real code for the tricky step.",
 "problem": "No-code tools hit a wall on custom logic, and full code projects are slow to wire up.",
 "outcome": "One workflow that mixes visual nodes with a JavaScript or Python step and npm packages.",
 "steps": [
  "Open a workflow in the editor",
  "Add a code step and pick JavaScript or Python",
  "Transform the incoming items and return them to the next node",
  "Pull in npm packages for advanced AI workflows if your setup allows it"
 ],
 "agent_prompt": "Add a code step to my n8n-io/n8n workflow <name> that <transformation> on each item, in <JavaScript or Python>, and test it on the last execution's data.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "",
 "category": "Work and operations",
 "tags": [
  "Work and operations"
 ],
 "lang": "typescript",
 "requirements": [
  "Docker for the self-hosted quick start",
  "Accounts or API keys for the apps and models you connect"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/n8n-io-n8n/add-custom-code-to-an-automation/",
 "md": "https://dedupedai.com/use-cases/n8n-io-n8n/add-custom-code-to-an-automation/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/n8n-io-n8n--add-custom-code-to-an-automation.json",
 "api_version": "v1"
}
