Extract
An Extract node reads the text and the document metadata out of each incoming file and adds them to the item's attributes, and it passes the file on unchanged. Use it to route files by what is inside them, to write values from a document into its custom metadata, or to pass a document's text to a Transform node.
Extract accepts only file items, because it reads a file's contents.
Settings
Include Metadata adds the file's document metadata, the properties recorded inside the file such as its author and title, to the item's attributes. Include Content adds the file's text. Both are on by default, and at least one must stay on, because a node that extracts nothing has nothing to add. Content Mode selects how much of the file's text is extracted, and it is Main Document Text by default. Under Advanced Settings, Maximum Characters caps the length of the extracted text.
What the Next Node Receives
Extract passes the same file on with attributes.extract added, which contains the detected file type, the document metadata, the text, and any warnings from the extraction. The nodes that follow read those values in their expressions. A Switch node routes on attributes.extract.content_text, a Set Metadata node writes a value from attributes.extract.metadata into custom metadata, and a Transform node reshapes the text.
Errors
A file that cannot be read fails that item. Error Handling rules on the node determine what happens to a failed item.
Extract vs. Transform
Extract reads the text and document metadata out of a file, including a PDF or a Word document, and adds them to the item's attributes without changing the file. A Transform node parses a structured data file and produces new data or a new file. Use Extract to route a document by the text or the properties inside it. Use Transform to reshape structured data. To turn a document's text into fields, connect Extract to a Transform node whose script reads attributes.extract.content_text.