Types
Each input and output in a node has a specific type that defines the kind of data it can handle.
The most common type you’ll encounter is Text
, as most flows involve working with text data.
Types You’ll Encounter
Text
: A single piece of text.List of text
: A collection of multiple text items.List of List of text
: A nested collection of text lists.
Type Matching
For a flow to work correctly, the output type of one node must match the input type of the next node. If the types don’t match, the flow will fail due to a type mismatch error.
Common Type Mismatch Errors
The most frequent issue is mismatching:
Text
→List of text
List of text
→Text
For example, the Gmail Reader node outputs a List of text
, where each item in the list contains the content of an individual email:
If you try to connect this List of text
to a node expecting a single Text
, you’ll see an error.
How to Fix Type Mismatch Errors
-
Use Loop Mode:
Most nodes, like the Gmail Reader or Ask AI, support loop mode, which allows them to process a list of items one at a time.
Enable loop mode in the node to handle each item in the list individually. -
Use List Operations:
If you need to adjust the data to match types, use the List Operations nodes. These include:- Combine Lists: Merge multiple lists into one.
- Flatten List of Lists: Simplify a nested list into a single list.
- Get List Item: Extract a specific item from a list.
- Join List Items: Combine all items in a list into a single text block.
Refer to the list operators documentation for more details on these nodes.