Set Metadata
A Set Metadata node replaces the custom metadata on each incoming file with the keys and values you configure. Use it to record a workflow state on the file, to tag files with values an Extract node read from them, or to write an identifier from a parsed file's payload.
Set Metadata accepts only file items, because custom metadata belongs to a file.
Settings
Metadata is a list of keys and values, and at least one entry is required. Keys are static text, and values accept a TransformScript template, so {{ payload.customer }} writes a value from the file's parsed contents and an expression on attributes.extract writes a value an Extract node read from the file. A key the file had before and the node does not set is removed. Custom Metadata allows 32 keys per file and 1024 characters per value, so write a short value such as a document's title rather than its whole text.
What the Next Node Receives
Set Metadata passes the same file on, and the new values are available to the nodes that follow as attributes.custom_metadata.<key>, so an If node after it can route on the value it wrote.
Errors
A file that no longer exists when the node runs fails with a not-found error. Error Handling rules on the node determine what happens to a failed item.