# File creator

<figure><img src="/files/0e8YuqFEmJXk6A4ApTmO" alt=""><figcaption></figcaption></figure>

## Description <a href="#description" id="description"></a>

The **File Creator** node lets you quickly generate a new file in your chosen format. You can manually input text or pull in data from previous nodes, making it easy to turn workflow outputs into shareable documents.

**Field and Function:**

1. **File type\***
   * Select the type of file you want to create.
   * Supported formats include:

* Document:
  * .docx (Microsoft Word 2007 and later)
  * .pdf (Portable Document Format)
  * .txt (Plain Text)
* Spreadsheets:
  * xlsx (Microsoft Excel)
  * csv (Comma-Separated Values)
* Others:
  * .json (JavaScript Object Notation)
  * .html (HyperText Markup Language)
  * .md (Markdown)

<figure><img src="/files/SGdIZLa3SIUP8ar0kqyu" alt=""><figcaption></figcaption></figure>

2. **File name**\*

* Enter the desired name of the file (without extension).
* The correct extension is added automatically based on **File type**.

<figure><img src="/files/fhHyktbmUwsddRMFN250" alt=""><figcaption></figcaption></figure>

3. **Content\***

* Define the content inside the file.
* Options:
  * Type text manually.
  * Use `@` to reference outputs from previous nodes (e.g., AI-generated text, API response, or spreadsheet data).

<figure><img src="/files/7Hb9gmOetdwhCDxosged" alt=""><figcaption></figcaption></figure>

## Example <a href="#description" id="description"></a>

1. Set up "File Creator" node:
   1. File type = .docx
   2. File name = creator file
   3. Content = refer to the output of node "OpenAI"

<figure><img src="/files/b9gE3jCFvUYUOgfCAOI8" alt=""><figcaption></figcaption></figure>

2. After executing the flow

<figure><img src="/files/EFgeaN1AJlz0QT4ne5Bg" alt=""><figcaption></figcaption></figure>

3. At the "Output node", you can download the file

<figure><img src="/files/s2DnB5bsQ4uzMVXrE9jz" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.diaflow.io/workflow-builder/nodes/built-in-tools/file-creator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
