Code in n8n
n8n is a low-code tool. This means you can do a lot without code, then add code when needed.
In this section
Using the Code node: add JavaScript or Python code to your workflow.
Get coding help from AI: use GPT to generate code in the Code node.
Use built-in shortcuts: reference for n8n's built-in methods and variables for use in expressions and code.
Define custom variables: store and reuse values across your workflows.
Cookbook: examples and recipes for common coding tasks.
Code in your workflows
There are two places in your workflows where you can use code:
Expressions
Use expressions to transform data in your nodes. You can use JavaScript in expressions, as well as n8n's Built-in methods and variables.
Other technical resources
These are features that are relevant to technical users.
Technical nodes
n8n provides core nodes, which simplify adding key functionality such as API requests, webhooks, scheduling, and file handling.
Write a backend
The HTTP Request, Webhook, and Code nodes help you make API calls, respond to webhooks, and write any JavaScript in your workflow.
Use this do things like Create an API endpoint.
Other developer resources
The n8n API
n8n provides an API, where you can programmatically perform many of the same tasks as you can in the GUI. There's an n8n API node to access the API in your workflows.
Build your own nodes
You can build custom nodes, install them on your n8n instance, and publish them to npm.
Related resources
Last updated
Was this helpful?