How information travels
In a flow, each connection carries information from one component to the next. Knowing what kind of information travels through each connection helps you choose the right components and understand why two points can or can’t be connected.
Kinds of information
| Kind | What it is | Examples |
|---|---|---|
| Message or text | A piece of text, such as a question or an answer. | What the user types in the chat, an agent’s answer, the body of an email. |
| Record | A named set of data, like an index card. Each piece of data is a field with its value. | A customer with name, email and city; an order with number, amount and status. |
| List | Several records together. | Unread emails, the rows of a spreadsheet, today’s orders. |
| File | A document, an image or an audio file. | An attached PDF, a photo, a call recording. |
Model and agent components work mostly with text. Components for external services, such as spreadsheets, CRMs or databases, usually return records or lists.
Compatible connections
Each connection point accepts certain kinds. While you drag a connection, the editor dims the points that don’t accept what the source component produces, and an invalid connection is not created.
If you need to go from one kind to another, there are components for it. For example, Parse Data turns records into text with a template, and Prompt builds a text from the data it receives.
The fields of a record
To use a specific piece of data from a record, you give the name of its field. When one field is inside another, separate them with a dot: customer.city is the city inside the customer’s data.
Several components name fields this way, for example Switch to choose the path based on a field, or Parse Data where you write {name} in its template.
Process lists
When a component receives a list and you want to handle each item separately, turn on Batch Mode in its settings:
- Connect the list to the component’s Batch Input point.
- With Batch Mode on, each field of the component has three modes:
- Fixed: the same value for every item.
- Mapped: the value comes from a field of each item. You choose or drag the field, for example
email. - Javascript: the value is worked out with a short formula from each item.
- The component processes every item in the list and returns a single list with all the results.
Example: a model component receives the list of unread emails. With Batch Mode on and the text field set to Mapped on the body of each email, the model summarises all the emails in one go and returns the list of summaries.
Some components, such as Agent, have Batch Mode turned on when you add them. If the component should receive a single message, as in a chat, turn it off: its normal connection point appears, for example Input on the agent. See Your first flow.
If instead of a single component you need to repeat several steps in order for each item, use Loop and Loop End. See Flow logic.
Files
Components that read or receive files, such as an email attachment or a document in a shared folder, pass them on to the next step so that another component extracts their content, for example the text of a PDF. You don’t need to convert anything by hand: just connect the file output to a component that accepts it.
The files your flows save can be browsed and downloaded in storage. See Your storage.
How information passes through an agent
An agent with tools always follows the same cycle:
- It receives the request, for example “What is Juan’s latest email?”.
- It decides which tool it needs and with what data, for example searching Gmail for Juan’s emails.
- The tool runs and returns its result to the agent.
- If needed, the agent uses another tool with what it has obtained.
- With all the information, it writes an answer in natural language.
See what travels at each step
To find out what each component received and returned:
- On the canvas, the eye icon on each component shows what it returned in the last run.
- In the playground, Executions lists the steps of each run: select one to see its details.
- Executions Logs has the same details for every run of the flow, including those that come from other applications.
See The flow editor and Execution logs.