> For the complete documentation index, see [llms.txt](https://docs.contextual.io/documentation-and-resources/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.contextual.io/documentation-and-resources/components-and-data/flows/node-reference/stream/read-cloud.md).

# Read Cloud

Reads the contents of a file from a connected cloud storage location.

**Read Cloud** retrieves a single file from cloud storage and places its contents on the message, so the rest of the Flow can work with them.

Use a **Read Cloud** node in your Flow to bring stored content in: a data file to process, a template to render, or an export produced by another system. To find out what files are available first, use a *List Cloud* node.

Read Cloud does not open a source stream and does not require *Sink Collect*. It works in an ordinary row.

To configure a **Read Cloud** node in the *Flow Editor*, drag it from the **Stream** group in the Palette to the Workspace canvas, then double-click the node to open and configure its behavior.

## General tab

* **Name** — optional display name for the node in the editor. By default the node shows a label of "Read Cloud"; the value you provide here replaces it.
* **Config** — the tenant configuration. Defaults to the current tenant.
* **Connection** — the storage connection to read from. Selected from the connections configured for the tenant. Required.
* **Remote Path** — the path of the file to read. Required.
* **Output** — where the file contents are written. Defaults to `msg.payload`.
* **Output Type** — how the contents are represented. One of arraybuffer, buffer, stream, or string. Defaults to stream.

## Remote paths

**Remote Path** is interpreted by the selected connection:

* **AWS S3** — when the connection names a bucket, enter the object key. Otherwise, begin the path with the bucket name, followed by the object key.
* **Azure Blob** — when the connection names a container, enter the blob path. Otherwise, begin the path with the container name, followed by the blob path.
* **SFTP** — the full path is passed to the SFTP server.

For AWS S3 or Azure Blob without a configured bucket or container, a one-segment path fails because no bucket or container can be derived.

*List Cloud* returns paths relative to the bucket or container. If the Read Cloud connection already names that bucket or container, use the listed path unchanged. Otherwise, prepend the bucket or container; for example, a listing of `test` that returns `hello.txt` corresponds to `test/hello.txt`.

Missing-file behavior depends on the connection, source mode, and output type.

## Output Type

| Option          | Use for                                                                                                                                                                                                                                            |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **string**      | Text whose stream chunks are independently decodable. A zero-byte object does not currently complete, and UTF-8 characters split across chunks may be corrupted. For boundary-safe decoding, use `buffer` and convert it to text after collection. |
| **buffer**      | Binary files such as images, PDFs and archives. The contents arrive as raw bytes.                                                                                                                                                                  |
| **arraybuffer** | Binary content where a downstream node or function expects an ArrayBuffer.                                                                                                                                                                         |
| **stream**      | Passing large content onward without holding all of it in memory.                                                                                                                                                                                  |

`stream` places the provider's readable stream object on the message rather than the file contents. HTTP Response treats it as an object, not as the response body: depending on the concrete provider stream and runtime, it may serialize stream internals or fail on a circular reference. Do not rely on a specific error message.

A Log node displays a representation of the stream rather than its file contents. Contextual Log catches logging errors and continues forwarding the message. Pass `stream` only to nodes designed to consume it; use `buffer` and decode after collection when text integrity matters.

A Buffer returned by `buffer` is shown in the Debug panel as `[Buffer (38 bytes)]` rather than as its contents. Converting it in a Function node makes it readable:

```js
msg.payload = msg.payload.toString();
return msg;
```

## Source tab

The **Source** tab controls how the node behaves when it is processing a source stream rather than a single message.

* **Parallelism** can be set to None, Ordered, or Unordered
* **Max** — the concurrency ceiling used by Ordered and Unordered

The tab itself notes: *Configurations in this tab are only active when this node is in a source.* Outside a source stream the node processes a single message, and **Parallelism** and **Max** have no effect.

## Example

A Flow reads a stored text file and returns its contents to the caller.

```
[GET] /read → Read Cloud → HTTP Response
```

### Configure the Read Cloud node

Set **Connection** to the storage connection, **Remote Path** to `test/hello.txt`, and **Output Type** to string. Leave **Output** as `msg.payload`.

### Return the contents

Add an HTTP Response node.

### Confirm the result

Place a Log node after Read Cloud and request `/read`. The Debug panel shows the file's contents as text:

```
msg : string[34]
"This is the payload: hello world !"
```

With **Output Type** set to buffer the same file shows as `[Buffer (34 bytes)]` instead, and a browser downloads the response rather than displaying it.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.contextual.io/documentation-and-resources/components-and-data/flows/node-reference/stream/read-cloud.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
