Code in n8n#
n8n is a low-code tool. This means you can do a lot without code, then add code when needed.
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 and Data transformation functions.
-
Code node
Use the Code node to add JavaScript or Python to your workflow.
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.
-
Represent complex logic
You can build complex flows, using nodes like If, Switch, and Merge nodes.
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.
-
Self-host
You can self-host n8n. This keeps your data on your own infrastructure.
-
Build your own nodes
You can build custom nodes, install them on your n8n instance, and publish them to npm.