Code in n8n#
There are two places in n8n where you need to use code:
- In expressions, for example programmatically setting the value of a field based on incoming data.
- In the Code node, when you need to add JavaScript to your workflow.
This section covers:
- Built-in methods and variables.
- Expressions examples:
- Introduction to expressions in n8n.
- Supported libraries: Luxon (for data and time) and JMESPath (for working with JSON).
- JavaScript examples:
- Introduction to JavaScript in n8n.
- Supported libraries: Luxon (for data and time) and JMESPath (for working with JSON).
- Checking incoming data.
- Get the number of items returned by the last node.
- Working with binary data: Get the binary data buffer and Split binary file data into individual items.