File Writer
Write a value from memory to a file on the AI Kit server.
To save files to WebDAV/Nextcloud, convert them to Word, Excel or CSV, or to copy and move files, use Store file. The File Writer remains the right choice for appending to log or text files.
What it does
Takes a value from memory and writes it to a file path you specify. Can overwrite the file or append to it. Useful for producing reports, exports, log files, or simple persistence between runs.
The file is written from the AI Kit server's perspective — for on-premise installations that is your own server, including any network share mounted there. Use an absolute path such as /mnt/share/exports/sales.xlsx; missing folders are created.
Files that an earlier step produced as a file — for example an Excel workbook — are written unchanged. Text is written in the chosen encoding, structured data as formatted JSON.
What you configure
| Field | What it controls | Required | Notes |
|---|---|---|---|
| File path | Absolute path of the file to write on the server. | required | The AI Kit service needs write access to the folder. |
| Encoding | Character encoding for text files. | optional | Defaults to UTF-8. |
| Content (memory input) | The data to write. | required | Pull from memory. Strings, JSON, or binary all work. |
| Append | When on, content is added at the end of the file instead of overwriting it. | optional | Off by default. |
| File info (output) | Memory key that receives name, type, size and path of the written file. | optional | Useful for later steps that want to refer to the file. |
📷 SCREENSHOT: The File Writer step with the path field, encoding selector, and the append toggle.
Example scenario
Daily export. A cron-triggered workflow queries a database for yesterday's data, formats it as CSV with an AI action or a dedicated step, and writes the CSV to /exports/sales-{{ date }}.csv on the server. A separate process picks the files up.
Recommendations
- ✅ Choose a dedicated directory for AI Kit outputs. Keeps cleanup simple.
- ✅ Use append mode for log-style files where the workflow runs many times per day.
- ✅ Include the date or job ID in the filename if the workflow runs more than once a day. Otherwise each run overwrites the previous one (unless you use append).
- ⚠️ Append mode does not add newlines. If you want one line per run, include
\nat the start of your content or build the line in a prior step. - ❌ Do not write to system-critical paths. Stick to a directory the AI Kit owns.
- ❌ Do not write secrets to disk. Use secured-field references inside the workflow instead.
What to do next
- To react to incoming files: Filesystem Watcher.
- To store files with type conversion or on WebDAV: Store file.