Zum Hauptinhalt springen

File Writer

Write a value from memory to a file on disk.

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 server's filesystem. For cloud installations, it is a workspace-scoped storage area.

What you configure

FieldWhat it controlsRequiredNotes
File pathFull path of the file to write.requiredMust be reachable from the AI Kit server.
EncodingCharacter encoding for text files.optionalDefaults to UTF-8.
Content (memory input)The data to write.requiredPull from memory. Strings, JSON, or binary all work.
AppendWhen on, content is added at the end of the file instead of overwriting it.optionalOff by default.

📷 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 LLM Prompt 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 \n at 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