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.
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
- Get shareable download links 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 agent account: Sign up at fast.io/storage-for-agents. The free agent tier includes 50GB of storage, 1GB max file size, and 5,000 monthly credits. No credit card required.
API key: After signing up, create an API key from your workspace settings. 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 files to Fastio and returns a download link. In your Flowise dashboard:
- Go to Tools in the left sidebar
- Click "Add New" to create a custom tool
- Name it
SaveFile(or whatever makes sense for your workflow) - Set the description to "Saves a file to cloud storage and returns a download link"
Add these input variables in the tool schema:
fileName(string, required): The name for the saved file, likereport.pdfcontent(string, required): The text content to saveapiKey(string, required): Your Fastio API keyworkspaceId(string, required): Your Fastio workspace ID
Then paste this JavaScript function:
const fetch = require('node-fetch');
const uploadFile = async (fileName, content, apiKey, workspaceId) => {
const response = await fetch(
`https://api.fast.io/v1/upload/text-file`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
profile_id: workspaceId,
profile_type: 'workspace',
filename: fileName,
content: content,
parent_node_id: 'root'
})
}
);
if (!response.ok) {
const err = await response.text();
return `Upload failed (${response.status}): ${err}`;
}
const data = await response.json();
return `File saved as ${fileName}. Node ID: ${data.node_id}`;
};
return uploadFile($fileName, $content, $apiKey, $workspaceId);
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.
Give Your AI Agents Persistent Storage
Fastio gives teams shared workspaces, MCP tools, and searchable file context to run flowise file storage setup workflows with reliable agent and human handoffs.
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 node ID. You can verify the file exists by checking your Fastio workspace dashboard.
Troubleshooting Common Issues
401 Unauthorized: Your API key is wrong or expired. Double-check the key in your workspace settings.
404 Not Found: The workspace ID doesn't match. Copy it 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 gives you access to 251 tools through a single connection. Flowise 2.0+ has native MCP support through its "MCP Tool" node. To connect:
- Add an MCP Tool node to your chatflow
- Set the server URL to `/storage-for-agents/
- Configure authentication with your Fastio API key
- Select the tools you want to expose to your agent
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
- Search by meaning: Find files using natural language queries like "the Q4 revenue report"
- Create branded shares: Build download portals with your branding for client deliverables
- Set up receive folders: Create upload links where clients can send files to your agent
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.
Frequently Asked Questions
How do I set up file storage in Flowise?
Create a Custom Tool node in Flowise that calls the Fastio upload API. Configure it with your API key and workspace ID, then connect it to your agent node. The agent will call the tool whenever it needs to save a file. 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 download links and sharing, Fastio is the simplest option because it has a free tier built for AI agents and returns shareable URLs automatically.
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 251 file management tools, including upload, download, search, folder management, and RAG-powered document queries.
Related Resources
Give Your AI Agents Persistent Storage
Fastio gives teams shared workspaces, MCP tools, and searchable file context to run flowise file storage setup workflows with reliable agent and human handoffs.