# How to Set Up File Storage in Flowise

Flowise is a drag-and-drop UI for building LLM-powered applications, but it doesn't include persistent file storage out of the box. This guide walks through setting up a custom tool node in Flowise that connects to Fastio, giving your chatflows the ability to save, retrieve, and share files as part of automated AI workflows.

Source: https://fast.io/resources/flowise-file-storage-setup/
Last reviewed: 2026-02-10

## What Flowise File Storage Means

Flowise is an open-source tool with over 35,000 GitHub stars that lets you build LLM applications by dragging and connecting nodes. It supports custom tool nodes for external service integration, which is how we'll add file storage. By default, Flowise handles two types of data: chat memory (conversation history) and vector stores (document embeddings for retrieval). Neither of these works as general-purpose file storage. If your agent generates a PDF report, builds a CSV export, or creates an image, there's nowhere to put it. Setting up file storage gives your Flowise agents the ability to:

- Save generated files (reports, exports, code) to a permanent location
- Create branded Send, Receive, or Exchange shares, or a durable fileshare, for anything they create
- Read files uploaded by users or other agents
- Organize outputs into folders for different projects

Without this, your agent's file outputs disappear when the chat session ends.

## Prerequisites and What You'll Need

Before starting, make sure you have these ready:

**Flowise instance**: Running locally (`npx flowise start`), in Docker, or on a cloud host like Railway or Render. Any version from 1.4+ works. Version 2.0+ is needed if you want MCP support later.

**Fastio workspace**: Sign up at [fast.io/storage-for-agents](/storage-for-agents/) and open a workspace. Workspace IDs are 19-digit numeric strings.

**API key**: Go to Settings > Devices & Agents > API Keys and generate a key, or create one with `POST /current/user/auth/key/`. Authenticated calls use `Authorization: Bearer {api_key}` against `https://api.fast.io/current/`. You'll paste this into your Flowise custom tool configuration.

**Basic JavaScript knowledge**: The custom tool uses a short JavaScript function. You don't need to be an expert, but you should be comfortable reading 20 lines of code.

## Step 1: Create the Custom Tool Node

Flowise lets you extend agents through Custom Tools. We'll create one that uploads a small text file to Fastio and returns the new file ID. The same call works on Flowise's HTTP Request node if you prefer a visible node on the canvas. In your Flowise dashboard:

1. **Go to Tools** in the left sidebar
2. **Click "Add New"** to create a custom tool
3. **Name it** `SaveFile` (or whatever makes sense for your workflow)
4. **Set the description** to "Saves a file to cloud storage and returns the new file ID"

Add these input variables in the tool schema:

- `fileName` (string, required): The name for the saved file, like `report.md`
- `content` (string, required): The text content to save
- `apiKey` (string, required): Your Fastio API key
- `workspaceId` (string, required): Your Fastio workspace ID

Then paste this JavaScript function. It posts a small file in one request to `https://api.fast.io/current/upload/`. Uploads are `multipart/form-data`. Keep the trailing slash.

```javascript
const fetch = require('node-fetch');

const uploadFile = async (fileName, content, apiKey, workspaceId) => {
  const bytes = Buffer.from(content, 'utf8');
  const form = new FormData();
  form.append('name', fileName);
  form.append('size', String(bytes.length));
  form.append('chunk', new Blob([bytes]), fileName);
  form.append('action', 'create');
  form.append('instance_id', workspaceId);
  form.append('folder_id', 'root');

const response = await fetch('https://api.fast.io/current/upload/', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${apiKey}`
    },
    body: form
  });

if (!response.ok) {
    const err = await response.text();
    return `Upload failed (${response.status}): ${err}`;
  }

const data = await response.json();
  return `File saved as ${fileName}. File ID: ${data.new_file_id}`;
};

return uploadFile($fileName, $content, $apiKey, $workspaceId);
```

A successful small upload returns HTTP 201: `{"result":true,"id":"<upload_id>","new_file_id":"<node_id>"}`. Same-name upload into the same folder overwrites in place and keeps the old content as a recoverable version. The `node_id` stays stable.

On an HTTP Request node, use the same contract: Method `POST`, URL `https://api.fast.io/current/upload/`, header `Authorization: Bearer {api_key}`, body `multipart/form-data` with `name`, `size`, `chunk` (the bytes), `action=create`, `instance_id` (the workspace ID), and `folder_id=root`.

For a markdown note instead of a file, POST `https://api.fast.io/current/workspace/{workspace_id}/storage/{parent_id}/createnote/`. Use `root` or an existing folder node ID as `{parent_id}`.

Click **Save**. Your tool is now available to use in any chatflow.

## Step 2: Connect the Tool to Your Agent

Now wire the custom tool into a chatflow so your agent can use it. 1. **Open your chatflow** (or create a new one)
2. **Add an Agent node** (like OpenAI Function Agent or Tool Agent)
3. **Add a Custom Tool node** and select `SaveFile` from the dropdown
4. **Connect the tool** to the agent's "tools" input
5.

**Set the static variables**: Paste your API key and workspace ID into the tool's configuration fields. These stay constant across conversations. The agent will decide when to call `SaveFile` based on the conversation. If a user says "save this as a report," the agent recognizes the intent and calls the tool with the right filename and content.

**Pro tip**: Set the `apiKey` and `workspaceId` as Flowise environment variables instead of hardcoding them. Use `$vars.FASTIO_API_KEY` in your tool to keep credentials out of the tool definition.

## Step 3: Test the Upload in a Chat

Open the chat window for your chatflow and try these prompts:

- "Write a short summary of today's meeting and save it as meeting-notes.md"
- "Create a Python script that calculates compound interest and save it as calculator.py"
- "Generate a list of 10 blog post ideas and save them as content-ideas.txt"

The agent should respond with a confirmation that includes the file's `new_file_id`. You can verify the file exists by checking your Fastio workspace dashboard. To hand someone a durable single-file link, follow the upload with `POST /current/workspace/{workspace_id}/create/fileshare/`. For a branded folder they can browse, create a Send, Receive, or Exchange share with `POST /current/workspace/{workspace_id}/create/share/`.

### Troubleshooting Common Issues

**401 Unauthorized**: Your API key is wrong or expired. Double-check the key in Settings > Devices & Agents > API Keys.

**404 Not Found**: The workspace ID doesn't match. Copy the 19-digit ID directly from your Fastio dashboard URL.

**Empty file content**: The agent sometimes calls the save tool before finishing its output. Add an instruction in your system prompt: "Always finish generating the full content before calling SaveFile."

**Network errors in Docker**: Make sure your Flowise container can reach external URLs. Check your Docker network configuration and DNS settings.

## Going Further with the MCP Server

The custom tool approach works for basic file saves. But if your agents need to read files, search across documents, manage folders, or handle permissions, the [Fastio MCP server](/storage-for-agents/) gives you access to a consolidated MCP toolset through a single connection. Flowise 2.0+ has native MCP support through its "MCP Tool" node. To connect:

1. **Add an MCP Tool node** to your chatflow
2. **Set the server URL** to `https://mcp.fast.io/mcp/key` (Streamable HTTP is `https://mcp.fast.io/mcp`; legacy SSE is `https://mcp.fast.io/sse`)
3. **Configure authentication** with your Fastio API key as a Bearer header
4. **Select the tools** you want to expose to your agent

Named mode tools include `upload`, `storage`, `find`, `ai`, `share`, `fileshare`, `download`, and `event`. With MCP, your agent can do things the custom tool can't:

- **Read uploaded files**: Let users drop a PDF into a shared folder and have the agent read it with `storage` (`details`) or `download`
- **Search by meaning**: Find files with `find`, or ask Ripley (the built-in RAG agent) with `ai` (`ask`)
- **Create branded shares**: Build Send, Receive, or Exchange portals for client deliverables
- **Set up receive folders**: Create a Receive share where clients can send files to your agent

A tools/call looks like this:

```json
{"jsonrpc":"2.0","id":1,"method":"tools/call",
 "params":{"name":"upload","arguments":{"action":"web-import","url":"https://example.com/report.pdf",
 "profile_type":"workspace","profile_id":"1234567890123456789"}}}
```

The MCP server works with any LLM backend that Flowise supports, including OpenAI, Anthropic Claude, Google Gemini, and local models through Ollama. For the full list of available tools and their parameters, check the [MCP documentation](/storage-for-agents/).

## Frequently asked questions

### How do I set up file storage in Flowise?

Create a Custom Tool node in Flowise that calls POST https://api.fast.io/current/upload/ with multipart fields name, size, chunk, action=create, instance_id, and folder_id. Configure it with your API key and workspace ID, then connect it to your agent node. You can also use Flowise's HTTP Request node with the same route. See the step-by-step guide above for the full code.

### Can Flowise save files to cloud storage?

Yes. Flowise supports local storage and S3 for its own internal files, but agent-generated outputs need a custom tool. You can connect to Fastio, AWS S3, or Google Cloud Storage using the Custom Tool or HTTP Request nodes.

### What storage options work with Flowise?

Flowise natively supports local filesystem and AWS S3 via the STORAGE_TYPE environment variable. For agent-facing storage with sharing, Fastio lets you upload with POST /current/upload/, create a markdown note with POST /current/workspace/{workspace_id}/storage/{parent_id}/createnote/, and connect a consolidated MCP toolset for search, Ripley RAG, and branded Send, Receive, or Exchange shares.

### How do I handle file uploads in Flowise chatflows?

For accepting user uploads, use Flowise's built-in file upload feature which passes files as base64 to your chatflow. For saving agent outputs, create a Custom Tool that calls an external storage API. The combination lets your agent both receive and produce files.

### Does Flowise work with MCP for file management?

Yes. Flowise 2.0+ has native MCP support through the MCP Tool node. You can connect the Fastio MCP server to get a consolidated MCP toolset, including upload, download, search, folder management, and RAG-powered document queries.

## About Fast.io

Fast.io provides shared workspaces where people and AI agents work on the same files, with built-in semantic search and citation-backed chat over what they hold. Agents reach it through a remote MCP server at https://mcp.fast.io/mcp, a REST API at https://api.fast.io/current/, and a command line client published on npm as @vividengine/fastio-cli.
