Accessing variables
Inside the Code node you can read and write flow variables using predefined global objects.Context ($context)
Variables that persist only during the current flow execution:Memory ($memory)
Variables that persist across workflows, tools, and nodes. They support time-to-live (TTL):Reading
Deletion
Limits by data type
Migration from legacy nodes
- Create a new Code (Memory V2) node.
- Copy and paste the script from the legacy node.
- Use the new available methods (
$memory.setJson,$memory.setFile, etc.) if needed.